~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/alter_table.cc

  • Committer: Brian Aker
  • Date: 2009-10-27 09:10:21 UTC
  • mto: (1183.1.23 merge)
  • mto: This revision was merged to the branch mainline in revision 1198.
  • Revision ID: brian@114.2.46.10.in-addr.arpa.noptr.antlabs.com-20091027091021-31lms4lujk9wwoaz
Extended definition interface (filename building should now be moved
"closer" to the engine).

Note: Innodb has a bug in it requiring that a / be in the "tablename" passed
to it.

YEs... lame.

Show diffs side-by-side

added added

removed removed

Lines of Context:
769
769
 
770
770
        build_table_filename(new_name_buff, sizeof(new_name_buff), new_db, new_name_buff, false);
771
771
 
772
 
        if (plugin::StorageEngine::getTableDefinition(new_name_buff, NULL) == EEXIST)
 
772
        if (plugin::StorageEngine::getTableDefinition(new_name_buff, new_db, new_name_buff, false) == EEXIST)
773
773
        {
774
774
          /* Table will be closed by Session::executeCommand() */
775
775
          my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_alias);
896
896
        we don't take this name-lock and where this order really matters.
897
897
        TODO: Investigate if we need this access() check at all.
898
898
      */
899
 
      if (plugin::StorageEngine::getTableDefinition(new_name, NULL) == EEXIST)
 
899
      if (plugin::StorageEngine::getTableDefinition(new_name, db, table_name, false) == EEXIST)
900
900
      {
901
901
        my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_name);
902
902
        error= -1;