summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/sp.result16
-rw-r--r--mysql-test/t/sp.test10
2 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 52b52fbbd24..dcf13e8bc4c 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -8106,3 +8106,19 @@ DROP PROCEDURE sp;
DROP VIEW v1;
DROP TABLE t1, t2;
# 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
+SELECT 1;
+1
+1
+DROP PROCEDURE sp;
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index fb9da936fdb..58bffab462d 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -9416,3 +9416,13 @@ DROP VIEW v1;
DROP TABLE t1, t2;
--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;