~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Lee Bieber
  • Date: 2010-12-24 01:39:31 UTC
  • mfrom: (2016.3.4 bug674471)
  • Revision ID: kalebral@gmail.com-20101224013931-tcyhvk5kfomg27k6
Merge Shrews - fix bug  674471: DROP SCHEMA/TABLE IF EXISTS being logged even if the object didn't exis

Show diffs side-by-side

added added

removed removed

Lines of Context:
214
214
      {
215
215
        error= plugin::StorageEngine::dropTable(*session, identifier);
216
216
 
 
217
        /* Generate transaction event ONLY when we successfully drop */ 
 
218
        if (error == 0)
 
219
        {
 
220
          TransactionServices &transaction_services= TransactionServices::singleton();
 
221
          transaction_services.dropTable(session, string(table->getSchemaName()), string(table->getTableName()));
 
222
        }
 
223
 
217
224
        if ((error == ENOENT || error == HA_ERR_NO_SUCH_TABLE) && if_exists)
218
225
        {
219
226
          error= 0;
227
234
        }
228
235
      }
229
236
 
230
 
      if (error == 0 || (if_exists && foreign_key_error == false))
231
 
      {
232
 
        TransactionServices &transaction_services= TransactionServices::singleton();
233
 
        transaction_services.dropTable(session, string(table->getSchemaName()), string(table->getTableName()), if_exists);
234
 
      }
235
 
 
236
237
      if (error)
237
238
      {
238
239
        if (wrong_tables.length())