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 | f6fff55eb01baf5830db23198cd9d0c2bdeb4bb5 (patch) | |
tree | c88db3649fdcba130d7af9b97d86210c4c5ed3da /mysql-test/r/sp-error.result | |
parent | 2b41471429d9db41d64bfb214e29ba57cb3db381 (diff) | |
download | mariadb-git-f6fff55eb01baf5830db23198cd9d0c2bdeb4bb5.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 'mysql-test/r/sp-error.result')
-rw-r--r-- | mysql-test/r/sp-error.result | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result index 13f46e507ba..bd383379abc 100644 --- a/mysql-test/r/sp-error.result +++ b/mysql-test/r/sp-error.result @@ -247,7 +247,7 @@ end| ERROR 42000: Duplicate cursor: c create procedure u() use sptmp| -ERROR 42000: USE is not allowed in a stored procedure +ERROR 0A000: USE is not allowed in stored procedures create procedure p() begin declare c cursor for select * from t1; @@ -616,7 +616,7 @@ begin flush tables; return 5; end| -ERROR 0A000: FLUSH is not allowed in stored procedures +ERROR 0A000: FLUSH is not allowed in stored function or trigger create procedure bug9529_90123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123() begin end| |