Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1(EOL), 10.2(EOL), 10.3(EOL)
-
None
-
10.3.6-1
Description
I run this script, it correctly returns an "Unknown system variable" error:
DELIMITER $$
|
BEGIN NOT ATOMIC |
SET GLOBAL a=10; |
END; |
$$
|
DELIMITER ;
|
ERROR 1193 (HY000): Unknown system variable 'a'
|
Now I modify the script slightly: additionally declare a local variable with name a:
DELIMITER $$
|
BEGIN NOT ATOMIC |
DECLARE a INT; |
SET GLOBAL a=10; |
END; |
$$
|
DELIMITER ;
|
ERROR 1064 (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 ';
|
The error message looks confusing. The expected error message would be to return "Unknown system variable".
Attachments
Issue Links
- relates to
-
MDEV-15316 Assertion `(thd->lex)->var_list.is_empty()' failed in MYSQLparse
- Closed
-
MDEV-15620 Crash when using "SET @@NEW.a=expr" inside a trigger
- Closed