~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Monty Taylor
  • Date: 2011-04-06 21:23:45 UTC
  • mfrom: (2268.1.4 build)
  • Revision ID: mordred@inaugust.com-20110406212345-a7w7nkcuq60ybi4z
Merge Monty: Windows Fixes
Merge Olaf: open_table refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
    {
139
139
      identifier::Table tmp_identifier(table->getSchemaName(), table->getTableName());
140
140
 
141
 
      error= session->drop_temporary_table(tmp_identifier);
 
141
      error= session->open_tables.drop_temporary_table(tmp_identifier);
142
142
 
143
143
      switch (error) {
144
144
      case  0:
1365
1365
    /* Open table and put in temporary table list */
1366
1366
    if (not (session->open_temporary_table(identifier)))
1367
1367
    {
1368
 
      (void) session->rm_temporary_table(identifier);
 
1368
      (void) session->open_tables.rm_temporary_table(identifier);
1369
1369
      return error;
1370
1370
    }
1371
1371
  }
1700
1700
 
1701
1701
  wait_while_table_is_used(this, table, HA_EXTRA_FORCE_REOPEN);
1702
1702
  /* Close lock if this is not got with LOCK TABLES */
1703
 
  if (lock)
 
1703
  if (open_tables.lock)
1704
1704
  {
1705
 
    unlockTables(lock);
1706
 
    lock= NULL;                 // Start locked threads
 
1705
    unlockTables(open_tables.lock);
 
1706
    open_tables.lock= NULL;                     // Start locked threads
1707
1707
  }
1708
1708
  /* Close all copies of 'table'.  This also frees all LOCK TABLES lock */
1709
1709
  unlink_open_table(table);
2076
2076
  */
2077
2077
  if (destination_identifier.isTmp())
2078
2078
  {
2079
 
    if (session->find_temporary_table(destination_identifier))
 
2079
    if (session->open_tables.find_temporary_table(destination_identifier))
2080
2080
    {
2081
2081
      table_exists= true;
2082
2082
    }
2089
2089
                                             is_engine_set);
2090
2090
      if (not was_created) // This is pretty paranoid, but we assume something might not clean up after itself
2091
2091
      {
2092
 
        (void) session->rm_temporary_table(destination_identifier, true);
 
2092
        (void) session->open_tables.rm_temporary_table(destination_identifier, true);
2093
2093
      }
2094
2094
      else if (not session->open_temporary_table(destination_identifier))
2095
2095
      {
2096
2096
        // We created, but we can't open... also, a hack.
2097
 
        (void) session->rm_temporary_table(destination_identifier, true);
 
2097
        (void) session->open_tables.rm_temporary_table(destination_identifier, true);
2098
2098
      }
2099
2099
      else
2100
2100
      {