diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2019-04-04 15:27:16 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2019-04-04 15:27:16 +0100 |
commit | 37bf7b195c7a42e7c4bbc05c877147789f7cba29 (patch) | |
tree | f6c24d4ebc8d755f13cfd839be713084a3072d5d /mysql-test | |
parent | 6e71dde8b8f70087f06beb7d6fa172a7580a80c2 (diff) | |
download | mariadb-git-37bf7b195c7a42e7c4bbc05c877147789f7cba29.tar.gz |
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.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/sp.result | 16 | ||||
-rw-r--r-- | mysql-test/t/sp.test | 9 |
2 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index cd818ed22b8..e39754159fb 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -7635,6 +7635,22 @@ c1 c2 count(c3) 2012-03-01 02:00:00 3 1 DROP PROCEDURE p1; # End of 5.5 test +CREATE PROCEDURE sp() ALTER TABLE non_existing_table OPTIMIZE PARTITION p0; +CALL sp; +Table Op Msg_type Msg_text +test.non_existing_table optimize Error Table 'test.non_existing_table' doesn't exist +test.non_existing_table optimize status Operation failed +SELECT 1; +1 +1 +DROP PROCEDURE sp; +CREATE PROCEDURE sp() SHOW USER_STATISTICS; +CALL sp; +User Total_connections Concurrent_connections Connected_time Busy_time Cpu_time Bytes_received Bytes_sent Binlog_bytes_written Rows_read Rows_sent Rows_deleted Rows_inserted Rows_updated Select_commands Update_commands Other_commands Commit_transactions Rollback_transactions Denied_connections Lost_connections Access_denied Empty_queries Total_ssl_connections Max_statement_time_exceeded +SELECT 1; +1 +1 +DROP PROCEDURE sp; # # Bug#12663165 SP DEAD CODE REMOVAL DOESN'T UNDERSTAND CONTINUE HANDLERS # 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 |