~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/csv/ha_tina.cc

  • Committer: Stewart Smith
  • Date: 2009-06-03 01:12:56 UTC
  • mto: This revision was merged to the branch mainline in revision 1053.
  • Revision ID: stewart@flamingspork.com-20090603011256-8cun4p3kcu6tua7c
Move handler::create to StorageEngine::create_table

Some workarounds in HEAP for creating table on ::open and internal tables

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
    return ha_tina_exts;
133
133
  }
134
134
 
 
135
  int create_table(Session *, const char *table_name, Table *table_arg,
 
136
                   HA_CREATE_INFO *);
 
137
 
135
138
};
136
139
 
137
140
static Tina *tina_engine= NULL;
1455
1458
  this (the database will call ::open() if it needs to).
1456
1459
*/
1457
1460
 
1458
 
int ha_tina::create(const char *name, Table *table_arg, HA_CREATE_INFO *)
 
1461
int Tina::create_table(Session *, const char *table_name, Table *table_arg,
 
1462
                       HA_CREATE_INFO *)
1459
1463
{
1460
1464
  char name_buff[FN_REFLEN];
1461
1465
  File create_file;
1473
1477
  }
1474
1478
 
1475
1479
 
1476
 
  if ((create_file= my_create(fn_format(name_buff, name, "", CSM_EXT,
 
1480
  if ((create_file= my_create(fn_format(name_buff, table_name, "", CSM_EXT,
1477
1481
                                        MY_REPLACE_EXT|MY_UNPACK_FILENAME), 0,
1478
1482
                              O_RDWR | O_TRUNC,MYF(MY_WME))) < 0)
1479
1483
    return(-1);
1481
1485
  write_meta_file(create_file, 0, false);
1482
1486
  my_close(create_file, MYF(0));
1483
1487
 
1484
 
  if ((create_file= my_create(fn_format(name_buff, name, "", CSV_EXT,
 
1488
  if ((create_file= my_create(fn_format(name_buff, table_name, "", CSV_EXT,
1485
1489
                                        MY_REPLACE_EXT|MY_UNPACK_FILENAME),0,
1486
1490
                              O_RDWR | O_TRUNC,MYF(MY_WME))) < 0)
1487
1491
    return(-1);