From 37bf7b195c7a42e7c4bbc05c877147789f7cba29 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Thu, 4 Apr 2019 15:27:16 +0100 Subject: MDEV-17610 Unexpected connection abort after certain operations from within stored procedure Always set SERVER_MORE_RESULTS_EXIST when executing stored procedure. statements If statements produce a result, EOF packet needs this flag (SP ends with an OK packet). IF statetement does not produce a result, affected rows count are part of the final OK packet. --- mysql-test/t/sp.test | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mysql-test/t/sp.test') diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index a24da76602d..0e95fb5c271 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -9073,6 +9073,15 @@ DROP PROCEDURE p1; --echo # End of 5.5 test +#MDEV-17610 +CREATE PROCEDURE sp() ALTER TABLE non_existing_table OPTIMIZE PARTITION p0; +CALL sp; +SELECT 1; +DROP PROCEDURE sp; +CREATE PROCEDURE sp() SHOW USER_STATISTICS; +CALL sp; +SELECT 1; +DROP PROCEDURE sp; --echo # --echo # Bug#12663165 SP DEAD CODE REMOVAL DOESN'T UNDERSTAND CONTINUE HANDLERS -- cgit v1.2.1