~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/tableprototester/tableprototester.cc

  • Committer: Brian Aker
  • Date: 2010-10-22 23:33:58 UTC
  • mfrom: (1869.1.7 refactor)
  • Revision ID: brian@tangent.org-20101022233358-kmtrpm1yvmmyaame
Merge in overhaul to how cursor and table are handled. Cursor now only knows
about table, and will always have a table and engine reference.

This cleans up a number of ownership issues, the biggest being that it now
creates the space needed for the next big refactor in locks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
    table_definition_ext= TABLEPROTOTESTER_EXT;
58
58
  }
59
59
 
60
 
  virtual Cursor *create(TableShare &table)
 
60
  virtual Cursor *create(Table &table)
61
61
  {
62
62
    return new TableProtoTesterCursor(*this, table);
63
63
  }
128
128
}
129
129
 
130
130
TableProtoTesterCursor::TableProtoTesterCursor(drizzled::plugin::StorageEngine &engine_arg,
131
 
                           TableShare &table_arg) :
 
131
                                               Table &table_arg) :
132
132
  Cursor(engine_arg, table_arg)
133
133
{ }
134
134
 
263
263
 
264
264
int TableProtoTesterCursor::doInsertRecord(unsigned char *)
265
265
{
266
 
  return(table->next_number_field ? update_auto_increment() : 0);
 
266
  return(getTable()->next_number_field ? update_auto_increment() : 0);
267
267
}
268
268
 
269
269
int TableProtoTesterCursor::doStartTableScan(bool)