~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/db.cc

  • Committer: Siddharth Prakash Singh
  • Date: 2010-03-26 19:25:23 UTC
  • mfrom: (1410 drizzle)
  • mto: This revision was merged to the branch mainline in revision 1425.
  • Revision ID: spsneo@spsneo-laptop-20100326192523-ibjlbt1p692vobtj
merging with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
231
231
    return -1;
232
232
  }
233
233
 
 
234
  // Lets delete the temporary tables first outside of locks.  
 
235
  set<string> set_of_names;
 
236
  session->doGetTableNames(schema_name, set_of_names);
 
237
 
 
238
  for (set<string>::iterator iter= set_of_names.begin(); iter != set_of_names.end(); iter++)
 
239
  {
 
240
    TableIdentifier identifier(schema_name, *iter, TEMP_TABLE);
 
241
    Table *table= session->find_temporary_table(identifier);
 
242
    session->close_temporary_table(table);
 
243
  }
 
244
 
234
245
  pthread_mutex_lock(&LOCK_create_db);
235
246
 
236
247
 
348
359
 
349
360
  for (table= tables; table; table= table->next_local)
350
361
  {
 
362
    TableIdentifier identifier(table->db, table->table_name);
351
363
    TableShare *share;
352
364
    table->db_type= NULL;
353
 
    if ((share= TableShare::getShare(table->db, table->table_name)))
 
365
    if ((share= TableShare::getShare(identifier)))
 
366
    {
354
367
      table->db_type= share->db_type();
 
368
    }
355
369
  }
356
370
 
357
371
  if (lock_table_names_exclusively(session, tables))