~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/tableprototester/tableprototester.cc

  • Committer: Brian Aker
  • Date: 2010-09-20 00:00:20 UTC
  • Revision ID: brian@tangent.org-20100920000020-s6x30brpajr83pkr
Update session/memory to use boost specific.

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(Table &table)
 
60
  virtual Cursor *create(TableShare &table)
61
61
  {
62
62
    return new TableProtoTesterCursor(*this, table);
63
63
  }
100
100
 
101
101
  void doGetTableIdentifiers(drizzled::CachedDirectory &directory,
102
102
                             const drizzled::SchemaIdentifier &schema_identifier,
103
 
                             drizzled::TableIdentifier::vector &set_of_identifiers);
 
103
                             drizzled::TableIdentifiers &set_of_identifiers);
104
104
};
105
105
 
106
106
void TableProtoTesterEngine::doGetTableIdentifiers(drizzled::CachedDirectory&,
107
107
                                                   const drizzled::SchemaIdentifier &schema_identifier,
108
 
                                                   drizzled::TableIdentifier::vector &set_of_identifiers)
 
108
                                                   drizzled::TableIdentifiers &set_of_identifiers)
109
109
{
110
110
  if (schema_identifier.compare("test"))
111
111
  {
117
117
 
118
118
bool TableProtoTesterEngine::doDoesTableExist(Session&, const drizzled::TableIdentifier &identifier)
119
119
{
120
 
  if (not identifier.getPath().compare("test/t1"))
121
 
    return true;
122
 
  if (not identifier.getPath().compare("test/too_many_enum_values"))
123
 
    return true;
124
 
  if (not identifier.getPath().compare("test/invalid_table_collation"))
 
120
  if (not identifier.getPath().compare("./test/t1"))
 
121
    return true;
 
122
  if (not identifier.getPath().compare("./test/too_many_enum_values"))
 
123
    return true;
 
124
  if (not identifier.getPath().compare("./test/invalid_table_collation"))
125
125
    return true;
126
126
 
127
127
  return false;
128
128
}
129
129
 
130
130
TableProtoTesterCursor::TableProtoTesterCursor(drizzled::plugin::StorageEngine &engine_arg,
131
 
                                               Table &table_arg) :
 
131
                           TableShare &table_arg) :
132
132
  Cursor(engine_arg, table_arg)
133
133
{ }
134
134
 
238
238
                                                 const drizzled::TableIdentifier &identifier,
239
239
                                                 drizzled::message::Table &table_proto)
240
240
{
241
 
  if (not identifier.getPath().compare("test/t1"))
 
241
  if (not identifier.getPath().compare("./test/t1"))
242
242
  {
243
243
    fill_table1(table_proto);
244
244
    return EEXIST;
245
245
  }
246
 
  else if (not identifier.getPath().compare("test/too_many_enum_values"))
 
246
  else if (not identifier.getPath().compare("./test/too_many_enum_values"))
247
247
  {
248
248
    fill_table_too_many_enum_values(table_proto);
249
249
    return EEXIST;
250
250
  }
251
 
  else if (not identifier.getPath().compare("test/invalid_table_collation"))
 
251
  else if (not identifier.getPath().compare("./test/invalid_table_collation"))
252
252
  {
253
253
    fill_table_invalid_table_collation(table_proto);
254
254
    return EEXIST;
263
263
 
264
264
int TableProtoTesterCursor::doInsertRecord(unsigned char *)
265
265
{
266
 
  return(getTable()->next_number_field ? update_auto_increment() : 0);
 
266
  return(table->next_number_field ? update_auto_increment() : 0);
267
267
}
268
268
 
269
269
int TableProtoTesterCursor::doStartTableScan(bool)