~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/cursor.cc

  • Committer: Lee Bieber
  • Date: 2011-02-11 20:30:05 UTC
  • mfrom: (2157.1.3 build)
  • Revision ID: kalebral@gmail.com-20110211203005-757o1y2yf78dxzqr
Merge Stewart - 716848: drizzleimport displays wrong program_name
Merge Stewart - update README file
Merge Andrew and Joe - Exposes the InnoDB SYS_REPLICATION_LOG to data_dictionary so that it is fast and fixes many issues we have been having

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
  Handler-calling-functions
24
24
*/
25
25
 
26
 
#include <config.h>
 
26
#include "config.h"
27
27
 
28
28
#include <fcntl.h>
29
29
 
30
 
#include <drizzled/error.h>
31
 
#include <drizzled/field/epoch.h>
32
 
#include <drizzled/gettext.h>
33
 
#include <drizzled/internal/my_sys.h>
34
 
#include <drizzled/item/empty_string.h>
35
 
#include <drizzled/item/int.h>
36
 
#include <drizzled/lock.h>
37
 
#include <drizzled/message/table.h>
38
 
#include <drizzled/my_hash.h>
39
 
#include <drizzled/optimizer/cost_vector.h>
40
 
#include <drizzled/plugin/client.h>
41
 
#include <drizzled/plugin/event_observer.h>
42
 
#include <drizzled/plugin/storage_engine.h>
43
 
#include <drizzled/probes.h>
44
 
#include <drizzled/session.h>
45
 
#include <drizzled/sql_base.h>
46
 
#include <drizzled/sql_parse.h>
47
 
#include <drizzled/transaction_services.h>
 
30
#include "drizzled/my_hash.h"
 
31
#include "drizzled/error.h"
 
32
#include "drizzled/gettext.h"
 
33
#include "drizzled/probes.h"
 
34
#include "drizzled/sql_parse.h"
 
35
#include "drizzled/optimizer/cost_vector.h"
 
36
#include "drizzled/session.h"
 
37
#include "drizzled/sql_base.h"
 
38
#include "drizzled/transaction_services.h"
 
39
#include "drizzled/lock.h"
 
40
#include "drizzled/item/int.h"
 
41
#include "drizzled/item/empty_string.h"
 
42
#include "drizzled/field/epoch.h"
 
43
#include "drizzled/message/table.pb.h"
 
44
#include "drizzled/plugin/client.h"
 
45
#include "drizzled/internal/my_sys.h"
 
46
#include "drizzled/plugin/event_observer.h"
48
47
 
49
48
using namespace std;
50
49
 
267
266
*/
268
267
int Cursor::read_first_row(unsigned char * buf, uint32_t primary_key)
269
268
{
270
 
  int error;
 
269
  register int error;
271
270
 
272
271
  ha_statistic_increment(&system_status_var::ha_read_first_count);
273
272
 
274
273
  /*
275
274
    If there is very few deleted rows in the table, find the first row by
276
275
    scanning the table.
277
 
    @todo remove the test for HA_READ_ORDER
 
276
    TODO remove the test for HA_READ_ORDER
278
277
  */
279
278
  if (stats.deleted < 10 || primary_key >= MAX_KEY ||
280
279
      !(getTable()->index_flags(primary_key) & HA_READ_ORDER))
1300
1299
 
1301
1300
  bool result= false;
1302
1301
 
1303
 
  switch (session->getLex()->sql_command)
 
1302
  switch (session->lex->sql_command)
1304
1303
  {
1305
1304
  case SQLCOM_CREATE_TABLE:
1306
1305
    /*