Commit be73c7ee authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

MDEV-6951: Erroneous SET STATEMENT produces two identical errors

Double error reporting removed.
parent 9f4ee16b
......@@ -1138,3 +1138,11 @@ password(a)
deallocate prepare stmt1;
drop table t1;
set @@old_passwords=@save_old_passwords;
#
#MDEV-6951:Erroneous SET STATEMENT produces two identical errors
#
set statement non_existing=1 for select 1;
ERROR HY000: Unknown system variable 'non_existing'
show errors;
Level Code Message
Error 1193 Unknown system variable 'non_existing'
......@@ -1068,3 +1068,11 @@ execute stmt1;
deallocate prepare stmt1;
drop table t1;
set @@old_passwords=@save_old_passwords;
--echo #
--echo #MDEV-6951:Erroneous SET STATEMENT produces two identical errors
--echo #
--error ER_UNKNOWN_SYSTEM_VARIABLE
set statement non_existing=1 for select 1;
show errors;
......@@ -367,9 +367,7 @@ find_sys_var_null_base(THD *thd, struct sys_var_with_base *tmp)
{
tmp->var= find_sys_var(thd, tmp->base_name.str, tmp->base_name.length);
if (tmp->var == NULL)
my_error(ER_UNKNOWN_SYSTEM_VARIABLE, MYF(0), tmp->base_name.str);
else
if (tmp->var != NULL)
tmp->base_name= null_lex_str;
return thd->is_error();
......
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