1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-5438 A view can mask a table that supports discovery

This commit is contained in:
Sergei Golubchik
2013-12-13 14:26:10 +01:00
parent 0c0fe7a862
commit ff485d2dc4
5 changed files with 41 additions and 8 deletions

View File

@ -7840,7 +7840,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
Table maybe does not exist, but we got an exclusive lock
on the name, now we can safely try to find out for sure.
*/
if (!access(alter_ctx.get_new_filename(), F_OK))
if (ha_table_exists(thd, alter_ctx.new_db, alter_ctx.new_name, 0))
{
/* Table will be closed in do_command() */
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), alter_ctx.new_alias);