Loading mysql-test/r/sp-prelocking.result +18 −0 Original line number Diff line number Diff line Loading @@ -237,3 +237,21 @@ deallocate prepare stmt; drop table t1; drop view v1, v2, v3; drop function bug15683; drop table if exists t1, t2, t3; drop function if exists bug19634; create table t1 (id int, data int); create table t2 (id int); create table t3 (data int); create function bug19634() returns int return (select count(*) from t3); prepare stmt from "delete t1 from t1, t2 where t1.id = t2.id and bug19634()"; execute stmt; execute stmt; deallocate prepare stmt; create trigger t1_bi before delete on t1 for each row insert into t3 values (old.data); prepare stmt from "delete t1 from t1, t2 where t1.id = t2.id"; execute stmt; execute stmt; deallocate prepare stmt; drop function bug19634; drop table t1, t2, t3; End of 5.0 tests mysql-test/r/sp.result +21 −0 Original line number Diff line number Diff line Loading @@ -4990,4 +4990,25 @@ CALL bug18037_p2()| DROP FUNCTION bug18037_f1| DROP PROCEDURE bug18037_p1| DROP PROCEDURE bug18037_p2| drop table if exists t3| drop procedure if exists bug15217| create table t3 as select 1| create procedure bug15217() begin declare var1 char(255); declare cur1 cursor for select * from t3; open cur1; fetch cur1 into var1; select concat('data was: /', var1, '/'); close cur1; end | call bug15217()| concat('data was: /', var1, '/') data was: /1/ flush tables | call bug15217()| concat('data was: /', var1, '/') data was: /1/ drop table t3| drop procedure bug15217| drop table t1,t2; mysql-test/t/sp-prelocking.test +31 −0 Original line number Diff line number Diff line Loading @@ -272,3 +272,34 @@ drop table t1; drop view v1, v2, v3; drop function bug15683; # # Bug#19634 "Re-execution of multi-delete which involve trigger/stored # function crashes server" # --disable_warnings drop table if exists t1, t2, t3; drop function if exists bug19634; --enable_warnings create table t1 (id int, data int); create table t2 (id int); create table t3 (data int); create function bug19634() returns int return (select count(*) from t3); prepare stmt from "delete t1 from t1, t2 where t1.id = t2.id and bug19634()"; # This should not crash server execute stmt; execute stmt; deallocate prepare stmt; create trigger t1_bi before delete on t1 for each row insert into t3 values (old.data); prepare stmt from "delete t1 from t1, t2 where t1.id = t2.id"; execute stmt; execute stmt; deallocate prepare stmt; drop function bug19634; drop table t1, t2, t3; --echo End of 5.0 tests mysql-test/t/sp.test +27 −0 Original line number Diff line number Diff line Loading @@ -5888,6 +5888,33 @@ DROP FUNCTION bug18037_f1| DROP PROCEDURE bug18037_p1| DROP PROCEDURE bug18037_p2| # # Bug#15217 "Using a SP cursor on a table created with PREPARE fails with # weird error". Check that the code that is supposed to work at # the first execution of a stored procedure actually works for # sp_instr_copen. --disable_warnings drop table if exists t3| drop procedure if exists bug15217| --enable_warnings create table t3 as select 1| create procedure bug15217() begin declare var1 char(255); declare cur1 cursor for select * from t3; open cur1; fetch cur1 into var1; select concat('data was: /', var1, '/'); close cur1; end | # Returns expected result call bug15217()| flush tables | # Returns error with garbage as column name call bug15217()| drop table t3| drop procedure bug15217| # # BUG#NNNN: New bug synopsis Loading ndb/include/kernel/GlobalSignalNumbers.h +6 −4 Original line number Diff line number Diff line Loading @@ -507,16 +507,12 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_TEST_ORD 407 #define GSN_TESTSIG 408 #define GSN_TIME_SIGNAL 409 /* 410 unused */ /* 411 unused */ /* 412 unused */ #define GSN_TUP_ABORTREQ 414 #define GSN_TUP_ADD_ATTCONF 415 #define GSN_TUP_ADD_ATTRREF 416 #define GSN_TUP_ADD_ATTRREQ 417 #define GSN_TUP_ATTRINFO 418 #define GSN_TUP_COMMITREQ 419 /* 420 unused */ #define GSN_TUP_LCPCONF 421 #define GSN_TUP_LCPREF 422 #define GSN_TUP_LCPREQ 423 Loading Loading @@ -938,4 +934,10 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_ACC_LOCKREQ 711 #define GSN_READ_PSUEDO_REQ 712 /* DICT LOCK signals */ #define GSN_DICT_LOCK_REQ 410 #define GSN_DICT_LOCK_CONF 411 #define GSN_DICT_LOCK_REF 412 #define GSN_DICT_UNLOCK_ORD 420 #endif Loading
mysql-test/r/sp-prelocking.result +18 −0 Original line number Diff line number Diff line Loading @@ -237,3 +237,21 @@ deallocate prepare stmt; drop table t1; drop view v1, v2, v3; drop function bug15683; drop table if exists t1, t2, t3; drop function if exists bug19634; create table t1 (id int, data int); create table t2 (id int); create table t3 (data int); create function bug19634() returns int return (select count(*) from t3); prepare stmt from "delete t1 from t1, t2 where t1.id = t2.id and bug19634()"; execute stmt; execute stmt; deallocate prepare stmt; create trigger t1_bi before delete on t1 for each row insert into t3 values (old.data); prepare stmt from "delete t1 from t1, t2 where t1.id = t2.id"; execute stmt; execute stmt; deallocate prepare stmt; drop function bug19634; drop table t1, t2, t3; End of 5.0 tests
mysql-test/r/sp.result +21 −0 Original line number Diff line number Diff line Loading @@ -4990,4 +4990,25 @@ CALL bug18037_p2()| DROP FUNCTION bug18037_f1| DROP PROCEDURE bug18037_p1| DROP PROCEDURE bug18037_p2| drop table if exists t3| drop procedure if exists bug15217| create table t3 as select 1| create procedure bug15217() begin declare var1 char(255); declare cur1 cursor for select * from t3; open cur1; fetch cur1 into var1; select concat('data was: /', var1, '/'); close cur1; end | call bug15217()| concat('data was: /', var1, '/') data was: /1/ flush tables | call bug15217()| concat('data was: /', var1, '/') data was: /1/ drop table t3| drop procedure bug15217| drop table t1,t2;
mysql-test/t/sp-prelocking.test +31 −0 Original line number Diff line number Diff line Loading @@ -272,3 +272,34 @@ drop table t1; drop view v1, v2, v3; drop function bug15683; # # Bug#19634 "Re-execution of multi-delete which involve trigger/stored # function crashes server" # --disable_warnings drop table if exists t1, t2, t3; drop function if exists bug19634; --enable_warnings create table t1 (id int, data int); create table t2 (id int); create table t3 (data int); create function bug19634() returns int return (select count(*) from t3); prepare stmt from "delete t1 from t1, t2 where t1.id = t2.id and bug19634()"; # This should not crash server execute stmt; execute stmt; deallocate prepare stmt; create trigger t1_bi before delete on t1 for each row insert into t3 values (old.data); prepare stmt from "delete t1 from t1, t2 where t1.id = t2.id"; execute stmt; execute stmt; deallocate prepare stmt; drop function bug19634; drop table t1, t2, t3; --echo End of 5.0 tests
mysql-test/t/sp.test +27 −0 Original line number Diff line number Diff line Loading @@ -5888,6 +5888,33 @@ DROP FUNCTION bug18037_f1| DROP PROCEDURE bug18037_p1| DROP PROCEDURE bug18037_p2| # # Bug#15217 "Using a SP cursor on a table created with PREPARE fails with # weird error". Check that the code that is supposed to work at # the first execution of a stored procedure actually works for # sp_instr_copen. --disable_warnings drop table if exists t3| drop procedure if exists bug15217| --enable_warnings create table t3 as select 1| create procedure bug15217() begin declare var1 char(255); declare cur1 cursor for select * from t3; open cur1; fetch cur1 into var1; select concat('data was: /', var1, '/'); close cur1; end | # Returns expected result call bug15217()| flush tables | # Returns error with garbage as column name call bug15217()| drop table t3| drop procedure bug15217| # # BUG#NNNN: New bug synopsis Loading
ndb/include/kernel/GlobalSignalNumbers.h +6 −4 Original line number Diff line number Diff line Loading @@ -507,16 +507,12 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_TEST_ORD 407 #define GSN_TESTSIG 408 #define GSN_TIME_SIGNAL 409 /* 410 unused */ /* 411 unused */ /* 412 unused */ #define GSN_TUP_ABORTREQ 414 #define GSN_TUP_ADD_ATTCONF 415 #define GSN_TUP_ADD_ATTRREF 416 #define GSN_TUP_ADD_ATTRREQ 417 #define GSN_TUP_ATTRINFO 418 #define GSN_TUP_COMMITREQ 419 /* 420 unused */ #define GSN_TUP_LCPCONF 421 #define GSN_TUP_LCPREF 422 #define GSN_TUP_LCPREQ 423 Loading Loading @@ -938,4 +934,10 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_ACC_LOCKREQ 711 #define GSN_READ_PSUEDO_REQ 712 /* DICT LOCK signals */ #define GSN_DICT_LOCK_REQ 410 #define GSN_DICT_LOCK_CONF 411 #define GSN_DICT_LOCK_REF 412 #define GSN_DICT_UNLOCK_ORD 420 #endif