diff options
author | unknown <pem@mysql.comhem.se> | 2005-06-01 15:42:40 +0200 |
---|---|---|
committer | unknown <pem@mysql.comhem.se> | 2005-06-01 15:42:40 +0200 |
commit | ae28b3bd07e2931e5badb8972521d4a3f87bc341 (patch) | |
tree | 57a07e5aa1af0e8cb1bf6f58e54c42f9d89c3a6f /mysql-test/t/sp-error.test | |
parent | 77bd9d36e6c703045e01de655952f98f79e6332a (diff) | |
download | mariadb-git-ae28b3bd07e2931e5badb8972521d4a3f87bc341.tar.gz |
Fixed BUG#10969: Stored procedures: crash if default() function
Return an error if default() is used on a local variable.
This is actaully a side-effect of BUG#5967: Stored procedure declared
variable used instead of column (to be fixed later), so this is really a
workaround until that is fixed.
mysql-test/r/sp-error.result:
New test case for BUG#10969.
mysql-test/t/sp-error.test:
New test case for BUG#10969.
sql/item.h:
Get name of local variable for error messages.
sql/sql_yacc.yy:
Return an error if default() is applied on a local SP variable.
Diffstat (limited to 'mysql-test/t/sp-error.test')
-rw-r--r-- | mysql-test/t/sp-error.test | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test index a2a43110b54..891e282e335 100644 --- a/mysql-test/t/sp-error.test +++ b/mysql-test/t/sp-error.test @@ -931,6 +931,29 @@ end| # +# BUG#10969: Stored procedures: crash if default() function +# +--disable_warnings +drop procedure if exists bug10969| +--enable_warnings +--error ER_WRONG_COLUMN_NAME +create procedure bug10969() +begin + declare s1 int default 0; + select default(s1) from t30; +end| + +# This should work +create procedure bug10969() +begin + declare s1 int default 0; + select default(t30.s1) from t30; +end| + +drop procedure bug10969| + + +# # BUG#NNNN: New bug synopsis # #--disable_warnings |