List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:June 25 2009 3:09pm
Subject:bzr commit into mysql-5.4 branch (alik:2810) Bug#21422 Bug#45716
View as plain text  
#At file:///mnt/raid/alik/MySQL/bzr/disabled/azalea-bf-disabled_tests/ based on
revid:alik@stripped

 2810 Alexander Nozdrin	2009-06-25
      Fix for Bug#45716: enable a test case for Bug#21422.

    modified:
      mysql-test/r/ps.result
      mysql-test/t/ps.test
=== modified file 'mysql-test/r/ps.result'
--- a/mysql-test/r/ps.result	2009-05-29 08:09:00 +0000
+++ b/mysql-test/r/ps.result	2009-06-25 13:09:51 +0000
@@ -2728,13 +2728,28 @@ Table	Op	Msg_type	Msg_text
 test.t2	preload_keys	status	OK
 deallocate prepare abc;
 drop table t1, t2;
+create procedure proc_1() grant all on *.* to abc@host;
+drop procedure proc_1;
+create function func_1() returns int
+begin grant all on *.* to abc@host; return 1; end|
+ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
+prepare abc from "grant all on *.* to abc@host";
+create procedure proc_1() revoke all on *.* from abc@host;
+drop procedure proc_1;
+create function func_1() returns int
+begin revoke all on *.* from abc@host; return 1; end|
+ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
+prepare abc from "revoke all on *.* from abc@host";
 create procedure proc_1() show errors;
 call proc_1();
 Level	Code	Message
+Error	1422	Explicit or implicit commit is not allowed in stored function or trigger.
 call proc_1();
 Level	Code	Message
+Error	1422	Explicit or implicit commit is not allowed in stored function or trigger.
 call proc_1();
 Level	Code	Message
+Error	1422	Explicit or implicit commit is not allowed in stored function or trigger.
 drop procedure proc_1;
 create function func_1() returns int begin show errors; return 1; end|
 ERROR 0A000: Not allowed to return a result set from a function

=== modified file 'mysql-test/t/ps.test'
--- a/mysql-test/t/ps.test	2009-06-24 19:39:33 +0000
+++ b/mysql-test/t/ps.test	2009-06-25 13:09:51 +0000
@@ -2795,25 +2795,34 @@ execute abc;
 deallocate prepare abc;
 drop table t1, t2;
 
-# -- [DISABLED Bug#45716]
-# Bug #21422: GRANT/REVOKE possible inside stored function, probably in a trigger
-# This is disabled for now till it is resolved in 5.0
-#
-
-#create procedure proc_1() grant all on *.* to abc@host;
-#drop procedure proc_1;
-#delimiter |;
-#--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
-#create function func_1() returns int begin grant all on *.* to abc@host; return 1; end|
-#delimiter ;|
-#prepare abc from "grant all on *.* to abc@host";
-#
-#create procedure proc_1() revoke all on *.* from abc@host;
-#drop procedure proc_1;
-#delimiter |;#--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
-#create function func_1() returns int begin revoke all on *.* from abc@host; return 1;
end|
-#delimiter ;|
-#prepare abc from "revoke all on *.* from abc@host";
+# Bug #21422: GRANT/REVOKE possible inside stored function, probably in a
+# trigger.
+
+create procedure proc_1() grant all on *.* to abc@host;
+drop procedure proc_1;
+
+delimiter |;
+
+--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
+create function func_1() returns int
+  begin grant all on *.* to abc@host; return 1; end|
+
+delimiter ;|
+
+prepare abc from "grant all on *.* to abc@host";
+
+create procedure proc_1() revoke all on *.* from abc@host;
+drop procedure proc_1;
+
+delimiter |;
+
+--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
+create function func_1() returns int
+  begin revoke all on *.* from abc@host; return 1; end|
+
+delimiter ;|
+
+prepare abc from "revoke all on *.* from abc@host";
 
 create procedure proc_1() show errors;
 call proc_1();


Attachment: [text/bzr-bundle] bzr/alik@sun.com-20090625130951-7ygij9tl80r1bxbh.bundle
Thread
bzr commit into mysql-5.4 branch (alik:2810) Bug#21422 Bug#45716Alexander Nozdrin25 Jun 2009