~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
485
485
{
486
486
  for (; table; table= table->*link )
487
487
  {
488
 
    if ((table->table == 0 || table->table->s->tmp_table == NO_TMP_TABLE) &&
 
488
    if ((table->table == 0 || table->table->s->tmp_table == STANDARD_TABLE) &&
489
489
        strcmp(table->db, db_name) == 0 &&
490
490
        strcmp(table->table_name, table_name) == 0)
491
491
      break;
549
549
  if (table->table)
550
550
  {
551
551
    /* temporary table is always unique */
552
 
    if (table->table && table->table->s->tmp_table != NO_TMP_TABLE)
 
552
    if (table->table && table->table->s->tmp_table != STANDARD_TABLE)
553
553
      return 0;
554
554
    table= table->find_underlying_table(table->table);
555
555
    /*
787
787
      that something has happened.
788
788
    */
789
789
    unlink_open_table(table);
790
 
    TableIdentifier identifier(db_name, table_name, NO_TMP_TABLE);
 
790
    TableIdentifier identifier(db_name, table_name, STANDARD_TABLE);
791
791
    quick_rm_table(*this, identifier);
792
792
    pthread_mutex_unlock(&LOCK_open);
793
793
  }
1283
1283
 
1284
1284
    if (table_list->create)
1285
1285
    {
1286
 
      TableIdentifier  lock_table_identifier(table_list->db, table_list->table_name, NO_TMP_TABLE);
 
1286
      TableIdentifier  lock_table_identifier(table_list->db, table_list->table_name, STANDARD_TABLE);
1287
1287
 
1288
1288
      if (not plugin::StorageEngine::doesTableExist(*this, lock_table_identifier))
1289
1289
      {
1337
1337
  table->reginfo.lock_type= TL_READ; /* Assume read */
1338
1338
 
1339
1339
reset:
1340
 
  assert(table->s->ref_count > 0 || table->s->tmp_table != NO_TMP_TABLE);
 
1340
  assert(table->s->ref_count > 0 || table->s->tmp_table != STANDARD_TABLE);
1341
1341
 
1342
1342
  if (lex->need_correct_ident())
1343
1343
    table->alias_name_used= my_strcasecmp(table_alias_charset,
2068
2068
    {
2069
2069
      if (tables->lock_type == TL_WRITE_DEFAULT)
2070
2070
        tables->table->reginfo.lock_type= update_lock_default;
2071
 
      else if (tables->table->s->tmp_table == NO_TMP_TABLE)
 
2071
      else if (tables->table->s->tmp_table == STANDARD_TABLE)
2072
2072
        tables->table->reginfo.lock_type= tables->lock_type;
2073
2073
    }
2074
2074
  }