diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2021-09-30 10:56:45 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2021-10-12 10:16:07 +0200 |
commit | 8f7edb784f695293f69ea58211df985775f8a42a (patch) | |
tree | 3733e62c23d4330c8378fa01a99c6218416181a7 /plugin/user_variables | |
parent | af8b2c6cec995c82d5a764717c954739ff125473 (diff) | |
download | mariadb-git-8f7edb784f695293f69ea58211df985775f8a42a.tar.gz |
MDEV-26637: (variables) ASAN: main.metadata and user_variables.basic MTR failures after MDEV-26572
Prohibit user variables without name
Diffstat (limited to 'plugin/user_variables')
-rw-r--r-- | plugin/user_variables/mysql-test/user_variables/basic.result | 5 | ||||
-rw-r--r-- | plugin/user_variables/mysql-test/user_variables/basic.test | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/plugin/user_variables/mysql-test/user_variables/basic.result b/plugin/user_variables/mysql-test/user_variables/basic.result index 6d59233c993..3acfb525ba5 100644 --- a/plugin/user_variables/mysql-test/user_variables/basic.result +++ b/plugin/user_variables/mysql-test/user_variables/basic.result @@ -29,13 +29,13 @@ SET @dec_var=CAST(1 AS DECIMAL(20, 10)); SET @time_var=CAST('2016-02-25' AS DATE); SET @' @#^%'='Value of variable with odd name'; SET @''='Value of variable with empty name'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '='Value of variable with empty name'' at line 1 SET @null_var=NULL; SELECT COUNT(*) FROM INFORMATION_SCHEMA.USER_VARIABLES; COUNT(*) -10 +9 SELECT * FROM INFORMATION_SCHEMA.USER_VARIABLES ORDER BY VARIABLE_NAME; VARIABLE_NAME VARIABLE_VALUE VARIABLE_TYPE CHARACTER_SET_NAME - Value of variable with empty name VARCHAR latin1 @#^% Value of variable with odd name VARCHAR latin1 dec_var 1.0000000000 DECIMAL latin1 double_var 1 DOUBLE latin1 @@ -47,7 +47,6 @@ uint_var 2 INT UNSIGNED latin1 utf8str_var UTF8 string value VARCHAR utf8mb3 SHOW USER_VARIABLES; Variable_name Value - Value of variable with empty name @#^% Value of variable with odd name dec_var 1.0000000000 double_var 1 diff --git a/plugin/user_variables/mysql-test/user_variables/basic.test b/plugin/user_variables/mysql-test/user_variables/basic.test index 7e67e4fa5af..7432f6537a9 100644 --- a/plugin/user_variables/mysql-test/user_variables/basic.test +++ b/plugin/user_variables/mysql-test/user_variables/basic.test @@ -12,6 +12,7 @@ SET @double_var=CAST(1 AS DOUBLE); SET @dec_var=CAST(1 AS DECIMAL(20, 10)); SET @time_var=CAST('2016-02-25' AS DATE); SET @' @#^%'='Value of variable with odd name'; +--error ER_PARSE_ERROR SET @''='Value of variable with empty name'; SET @null_var=NULL; |