diff options
author | Aleksey Midenkov <midenok@gmail.com> | 2021-03-26 11:44:54 +0300 |
---|---|---|
committer | Aleksey Midenkov <midenok@gmail.com> | 2021-04-23 15:20:35 +0300 |
commit | 42f8548ff6aed90439c94a388399e54afc871886 (patch) | |
tree | 3bf4fa12ec854494ec6f6270175c68279e120adc /sql/sql_lex.h | |
parent | 4649ba7493897b3a140ab354b88decd3f0540491 (diff) | |
download | mariadb-git-42f8548ff6aed90439c94a388399e54afc871886.tar.gz |
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.
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 49265accc07..0dab0f0666d 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -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(); + } }; |