summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2005-11-19 01:22:12 +0300
committerunknown <konstantin@mysql.com>2005-11-19 01:22:12 +0300
commit6ba79a251681a765f491db1428a467a0a06a69bd (patch)
treeb3966a041dec08af066126b9da901c6c4fdeaf08 /sql/sql_yacc.yy
parenta11caf1e01de600b9212c129903395758dc63378 (diff)
downloadmariadb-git-6ba79a251681a765f491db1428a467a0a06a69bd.tar.gz
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. mysql-test/r/sp-error.result: Test results fixed: a new test for Bug#13510 mysql-test/t/sp-error.test: A new test for Bug#13510 (set names out of an SP) sql/sql_yacc.yy: Bug#13510: fix the case when there is no stored procedure or no 'names' variable declared. Return a syntax error in this case.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 339091ed4e8..2dc06642259 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -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