~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/db.cc

  • Committer: Brian Aker
  • Date: 2010-10-24 01:44:25 UTC
  • mfrom: (1874.1.2 catalogs)
  • Revision ID: brian@tangent.org-20101024014425-exsst7015tqgbw7x
TableĀ encapsulateĀ merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
371
371
 
372
372
  for (table= tables; table; table= table->next_local)
373
373
  {
374
 
    char *db=table->db;
375
 
    TableIdentifier identifier(table->db, table->table_name);
 
374
    const char *db=table->getSchemaName();
 
375
    TableIdentifier identifier(table->getSchemaName(), table->getTableName());
376
376
 
377
377
    plugin::StorageEngine *table_type;
378
378
 
426
426
      // Table was not found on disk and table can't be created from engine
427
427
      push_warning_printf(session, DRIZZLE_ERROR::WARN_LEVEL_NOTE,
428
428
                          ER_BAD_TABLE_ERROR, ER(ER_BAD_TABLE_ERROR),
429
 
                          table->table_name);
 
429
                          table->getTableName());
430
430
    }
431
431
    else
432
432
    {
447
447
 
448
448
    if (error == 0 || (foreign_key_error == false))
449
449
    {
450
 
      transaction_services.dropTable(session, string(db), string(table->table_name), true);
 
450
      transaction_services.dropTable(session, string(db), string(table->getTableName()), true);
451
451
    }
452
452
 
453
453
    if (error)
454
454
    {
455
455
      if (wrong_tables.length())
456
456
        wrong_tables.append(',');
457
 
      wrong_tables.append(String(table->table_name,system_charset_info));
 
457
      wrong_tables.append(String(table->getTableName(),system_charset_info));
458
458
    }
459
459
  }
460
460
  /*
514
514
    if (not table_list)
515
515
      return -1;
516
516
 
517
 
    table_list->db= (char*) (table_list+1);
518
 
    table_list->table_name= strcpy(table_list->db, schema_identifier.getSchemaName().c_str()) + db_len + 1;
519
 
    TableIdentifier::filename_to_tablename((*it).getTableName().c_str(), table_list->table_name, (*it).getTableName().size() + 1);
520
 
    table_list->alias= table_list->table_name;  // If lower_case_table_names=2
 
517
    table_list->setSchemaName((char*) (table_list+1));
 
518
    table_list->setTableName(strcpy((char*) (table_list+1), schema_identifier.getSchemaName().c_str()) + db_len + 1);
 
519
    TableIdentifier::filename_to_tablename((*it).getTableName().c_str(), const_cast<char *>(table_list->getTableName()), (*it).getTableName().size() + 1);
 
520
    table_list->alias= table_list->getTableName();  // If lower_case_table_names=2
521
521
    table_list->setInternalTmpTable((strncmp((*it).getTableName().c_str(),
522
522
                                             TMP_FILE_PREFIX,
523
523
                                             strlen(TMP_FILE_PREFIX)) == 0));