diff options
author | unknown <dlenev@mysql.com> | 2005-08-10 10:31:32 +0400 |
---|---|---|
committer | unknown <dlenev@mysql.com> | 2005-08-10 10:31:32 +0400 |
commit | 8ae80c39db894a4ffb7530ece22693459c161fe0 (patch) | |
tree | c88db3649fdcba130d7af9b97d86210c4c5ed3da /sql/share | |
parent | 512ac1d3a0c7e8373a7b596695267bc046b16cba (diff) | |
download | mariadb-git-8ae80c39db894a4ffb7530ece22693459c161fe0.tar.gz |
Fix for bug #12280 "Triggers: crash if flush tables".
We should not allow FLUSH statement to be executed inside both triggers
and stored functions.
mysql-test/r/sp-error.result:
Updated test after replacing error, which is thrown when one uses FLUSH
statement inside of stored function, with more specific.
Also now we issue more general error when we barking about USE command
in stored routines.
mysql-test/r/trigger.result:
Added test for bug #12280 "Triggers: crash if flush tables"
mysql-test/t/sp-error.test:
Updated test after replacing error, which is thrown when one uses FLUSH
statement inside of stored function, with more specific.
Also now we issue more general error when we barking about USE command
in stored routines.
mysql-test/t/trigger.test:
Added test for bug #12280 "Triggers: crash if flush tables"
sql/share/errmsg.txt:
Removed ER_SP_NO_USE error. Now we use more general ER_SP_BADSTATEMENT in this
case. Instead added error message for barking about statements which should not
be allowed inside of stored functions or triggers.
It is safe to do this since it is highly unprobable that someone will upgrade
first to the new 5.0 release and then downgrade back to the old one.
sql/sql_parse.cc:
reload_acl_and_cache():
FLUSH TABLES and FLUSH PRIVILEGES should not be allowed if we are inside
of stored function or trigger.
sql/sql_yacc.yy:
We should not allow FLUSH statement inside both triggers and stored
functions. Replaced error which is thrown in this case with more
specific.
Also now we issue more general ER_SP_BADSTATEMENT error when one tries
to use USE command inside of stored routine.
Diffstat (limited to 'sql/share')
-rw-r--r-- | sql/share/errmsg.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 5dd5cd9c775..dd9cbd8d500 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -5137,8 +5137,8 @@ ER_SP_CANT_ALTER eng "Failed to ALTER %s %s" ER_SP_SUBSELECT_NYI 0A000 eng "Subselect value not supported" -ER_SP_NO_USE 42000 - eng "USE is not allowed in a stored procedure" +ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG 0A000 + eng "%s is not allowed in stored function or trigger" ER_SP_VARCOND_AFTER_CURSHNDLR 42000 eng "Variable or condition declaration after cursor or handler declaration" ER_SP_CURSOR_AFTER_HANDLER 42000 |