~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Brian Aker
  • Date: 2010-10-23 22:28:30 UTC
  • mto: This revision was merged to the branch mainline in revision 1875.
  • Revision ID: brian@tangent.org-20101023222830-em4idhbau96l37zt
Encapsulate schema_name it table_list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
 
161
161
  for (table= tables; table; table= table->next_local)
162
162
  {
163
 
    char *db= table->db;
164
 
    TableIdentifier tmp_identifier(table->db, table->table_name);
 
163
    TableIdentifier tmp_identifier(table->getSchemaName(), table->table_name);
165
164
 
166
165
    error= session->drop_temporary_table(tmp_identifier);
167
166
 
197
196
        goto err_with_placeholders;
198
197
      }
199
198
    }
200
 
    TableIdentifier identifier(db, table->table_name, table->getInternalTmpTable() ? message::Table::INTERNAL : message::Table::STANDARD);
 
199
    TableIdentifier identifier(table->getSchemaName(), table->table_name, table->getInternalTmpTable() ? message::Table::INTERNAL : message::Table::STANDARD);
201
200
 
202
201
    if (drop_temporary || not plugin::StorageEngine::doesTableExist(*session, identifier))
203
202
    {
229
228
    if (error == 0 || (if_exists && foreign_key_error == false))
230
229
    {
231
230
      TransactionServices &transaction_services= TransactionServices::singleton();
232
 
      transaction_services.dropTable(session, string(db), string(table->table_name), if_exists);
 
231
      transaction_services.dropTable(session, string(table->getSchemaName()), string(table->table_name), if_exists);
233
232
    }
234
233
 
235
234
    if (error)
1759
1758
  for (table= tables; table; table= table->next_local)
1760
1759
  {
1761
1760
    char table_name[NAME_LEN*2+2];
1762
 
    char* db = table->db;
1763
1761
    bool fatal_error=0;
1764
1762
 
1765
 
    snprintf(table_name, sizeof(table_name), "%s.%s",db,table->table_name);
 
1763
    snprintf(table_name, sizeof(table_name), "%s.%s", table->getSchemaName(),table->table_name);
1766
1764
    table->lock_type= lock_type;
1767
1765
    /* open only one table from local list of command */
1768
1766
    {