1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

Merge bk-internal.mysql.com:/home/bk/mysql-5.1

into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge


sql/sql_table.cc:
  Auto merged
This commit is contained in:
unknown
2006-07-26 21:48:45 +04:00
3 changed files with 51 additions and 1 deletions

View File

@@ -3321,7 +3321,19 @@ bool mysql_create_table_internal(THD *thd,
my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name);
goto unlock_and_end;
}
DBUG_ASSERT(get_cached_table_share(db, alias) == 0);
/*
We don't assert here, but check the result, because the table could be
in the table definition cache and in the same time the .frm could be
missing from the disk, in case of manual intervention which deletes
the .frm file. The user has to use FLUSH TABLES; to clear the cache.
Then she could create the table. This case is pretty obscure and
therefore we don't introduce a new error message only for it.
*/
if (get_cached_table_share(db, alias))
{
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), table_name);
goto unlock_and_end;
}
}
/*