1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-25091 CREATE TABLE: field references qualified by a wrong table name succeed

Before FRM is written walk vcol expressions through
check_table_name_processor() and check if field items match (db,
table_name) qualifier.

We cannot do this in check_vcol_func_processor() as there is already
no table name qualifiers in expressions of written and loaded FRM.
This commit is contained in:
Aleksey Midenkov
2021-03-26 11:44:54 +03:00
parent 4649ba7493
commit 42f8548ff6
5 changed files with 188 additions and 5 deletions

View File

@ -3207,6 +3207,23 @@ public:
}
return false;
}
bool create_like() const
{
DBUG_ASSERT(!create_info.like() || !select_lex.item_list.elements);
return create_info.like();
}
bool create_select() const
{
DBUG_ASSERT(!create_info.like() || !select_lex.item_list.elements);
return select_lex.item_list.elements;
}
bool create_simple() const
{
return !create_like() && !create_select();
}
};