Commit 86f1896f authored by konstantin@mysql.com's avatar konstantin@mysql.com

Bug#13510 "Setting password local variable changes current

password": additional fix, also make sure that a syntax error is 
returned for set names="foo" when there is no such variable or no
stored procedure.
parent a86eaaf5
......@@ -845,6 +845,8 @@ set password = 'foo1';
select password;
end|
ERROR 42000: Variable 'password' must be quoted with `...`, or renamed
set names='foo2'|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
create procedure bug13510_2()
begin
declare names varchar(10);
......
......@@ -1233,6 +1233,10 @@ begin
select password;
end|
# Check that an error message is sent
--error ER_PARSE_ERROR
set names='foo2'|
--error ER_SP_BAD_VAR_SHADOW
create procedure bug13510_2()
begin
......
......@@ -7925,6 +7925,9 @@ option_value:
names.length= 5;
if (spc && spc->find_pvar(&names))
my_error(ER_SP_BAD_VAR_SHADOW, MYF(0), names.str);
else
yyerror(ER(ER_SYNTAX_ERROR));
YYABORT;
}
| NAMES_SYM charset_name_or_default opt_collate
......
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