Commit d831cefb authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-16465 Invalid (old?) table or database name or hang in...

MDEV-16465 Invalid (old?) table or database name or hang in ha_innobase::delete_table and log semaphore wait upon concurrent DDL with foreign keys

Disable "Invalid (old?) table or database name" warning when
converting table names in InnoDB's get_foreign_key_info().

Because a name can be a temporary table name during the ALTER TABLE,
and some other thread can do SHOW CREATE TABLE for the other table
in the FK relationships _anytime_.
parent 9180e866
......@@ -12429,7 +12429,7 @@ get_foreign_key_info(
/* Referenced (parent) table name */
ptr = dict_remove_db_name(foreign->referenced_table_name);
len = filename_to_tablename(ptr, name_buff, sizeof(name_buff));
len = filename_to_tablename(ptr, name_buff, sizeof(name_buff), 1);
f_key_info.referenced_table = thd_make_lex_string(
thd, 0, name_buff, static_cast<unsigned int>(len), 1);
......@@ -12445,7 +12445,7 @@ get_foreign_key_info(
/* Dependent (child) table name */
ptr = dict_remove_db_name(foreign->foreign_table_name);
len = filename_to_tablename(ptr, name_buff, sizeof(name_buff));
len = filename_to_tablename(ptr, name_buff, sizeof(name_buff), 1);
f_key_info.foreign_table = thd_make_lex_string(
thd, 0, name_buff, static_cast<unsigned int>(len), 1);
......
......@@ -13295,7 +13295,7 @@ get_foreign_key_info(
/* Referenced (parent) table name */
ptr = dict_remove_db_name(foreign->referenced_table_name);
len = filename_to_tablename(ptr, name_buff, sizeof(name_buff));
len = filename_to_tablename(ptr, name_buff, sizeof(name_buff), 1);
f_key_info.referenced_table = thd_make_lex_string(
thd, 0, name_buff, static_cast<unsigned int>(len), 1);
......@@ -13311,7 +13311,7 @@ get_foreign_key_info(
/* Dependent (child) table name */
ptr = dict_remove_db_name(foreign->foreign_table_name);
len = filename_to_tablename(ptr, name_buff, sizeof(name_buff));
len = filename_to_tablename(ptr, name_buff, sizeof(name_buff), 1);
f_key_info.foreign_table = thd_make_lex_string(
thd, 0, name_buff, static_cast<unsigned int>(len), 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment