~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Brian Aker
  • Date: 2009-11-24 20:50:09 UTC
  • mto: (1226.1.4 push)
  • mto: This revision was merged to the branch mainline in revision 1228.
  • Revision ID: brian@gaz-20091124205009-312uixo5fefrxwt2
Split remove table into 2 parts. The piece for dropDatabase() needs to be
completely rethought out after TableIdentifier is done.

Show diffs side-by-side

added added

removed removed

Lines of Context:
336
336
 
337
337
 
338
338
/* Should should be refactored to go away */
339
 
static void write_bin_log_drop_table(Session *session, bool if_exists, const char *db_name, const char *table_name)
 
339
void write_bin_log_drop_table(Session *session, bool if_exists, const char *db_name, const char *table_name)
340
340
{
341
341
  ReplicationServices &replication_services= ReplicationServices::singleton();
342
342
  string built_query;
368
368
    if_exists           If set, don't give an error if table doesn't exists.
369
369
                        In this case we give an warning of level 'NOTE'
370
370
    drop_temporary      Only drop temporary tables
371
 
    dont_log_query      Don't write query to log files. This will also not
372
 
                        generate warnings if the Cursor files doesn't exists
373
371
 
374
372
  TODO:
375
373
    When logging to the binary log, we should log
388
386
*/
389
387
 
390
388
int mysql_rm_table_part2(Session *session, TableList *tables, bool if_exists,
391
 
                         bool drop_temporary, bool dont_log_query)
 
389
                         bool drop_temporary)
392
390
{
393
391
  TableList *table;
394
392
  char path[FN_REFLEN];
484
482
    else
485
483
    {
486
484
      error= plugin::StorageEngine::dropTable(*session, path, db,
487
 
                                                table->table_name,
488
 
                                                ! dont_log_query);
 
485
                                              table->table_name,
 
486
                                              true);
489
487
      if ((error == ENOENT || error == HA_ERR_NO_SUCH_TABLE) && if_exists)
490
488
      {
491
489
        error= 0;