File tree Expand file tree Collapse file tree 4 files changed +33
-8
lines changed Expand file tree Collapse file tree 4 files changed +33
-8
lines changed Original file line number Diff line number Diff line change @@ -7635,6 +7635,22 @@ c1 c2 count(c3)
7635
7635
2012-03-01 02:00:00 3 1
7636
7636
DROP PROCEDURE p1;
7637
7637
# End of 5.5 test
7638
+ CREATE PROCEDURE sp() ALTER TABLE non_existing_table OPTIMIZE PARTITION p0;
7639
+ CALL sp;
7640
+ Table Op Msg_type Msg_text
7641
+ test.non_existing_table optimize Error Table 'test.non_existing_table' doesn't exist
7642
+ test.non_existing_table optimize status Operation failed
7643
+ SELECT 1;
7644
+ 1
7645
+ 1
7646
+ DROP PROCEDURE sp;
7647
+ CREATE PROCEDURE sp() SHOW USER_STATISTICS;
7648
+ CALL sp;
7649
+ 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
7650
+ SELECT 1;
7651
+ 1
7652
+ 1
7653
+ DROP PROCEDURE sp;
7638
7654
#
7639
7655
# Bug#12663165 SP DEAD CODE REMOVAL DOESN'T UNDERSTAND CONTINUE HANDLERS
7640
7656
#
Original file line number Diff line number Diff line change @@ -9073,6 +9073,15 @@ DROP PROCEDURE p1;
9073
9073
9074
9074
--echo # End of 5.5 test
9075
9075
9076
+ #MDEV-17610
9077
+ CREATE PROCEDURE sp() ALTER TABLE non_existing_table OPTIMIZE PARTITION p0;
9078
+ CALL sp;
9079
+ SELECT 1;
9080
+ DROP PROCEDURE sp;
9081
+ CREATE PROCEDURE sp() SHOW USER_STATISTICS;
9082
+ CALL sp;
9083
+ SELECT 1;
9084
+ DROP PROCEDURE sp;
9076
9085
9077
9086
--echo #
9078
9087
--echo # Bug#12663165 SP DEAD CODE REMOVAL DOESN'T UNDERSTAND CONTINUE HANDLERS
Original file line number Diff line number Diff line change @@ -243,6 +243,7 @@ sp_get_flags_for_command(LEX *lex)
243
243
case SQLCOM_SHOW_EXPLAIN:
244
244
case SQLCOM_SHOW_FIELDS:
245
245
case SQLCOM_SHOW_FUNC_CODE:
246
+ case SQLCOM_SHOW_GENERIC:
246
247
case SQLCOM_SHOW_GRANTS:
247
248
case SQLCOM_SHOW_ENGINE_STATUS:
248
249
case SQLCOM_SHOW_ENGINE_LOGS:
Original file line number Diff line number Diff line change @@ -2442,15 +2442,14 @@ static bool do_execute_sp(THD *thd, sp_head *sp)
2442
2442
my_error (ER_SP_BADSELECT, MYF (0 ), sp->m_qname .str );
2443
2443
return 1 ;
2444
2444
}
2445
- /*
2446
- If SERVER_MORE_RESULTS_EXISTS is not set,
2447
- then remember that it should be cleared
2448
- */
2449
- bits_to_be_cleared= (~thd->server_status &
2450
- SERVER_MORE_RESULTS_EXISTS);
2451
- thd->server_status |= SERVER_MORE_RESULTS_EXISTS;
2452
2445
}
2453
-
2446
+ /*
2447
+ If SERVER_MORE_RESULTS_EXISTS is not set,
2448
+ then remember that it should be cleared
2449
+ */
2450
+ bits_to_be_cleared= (~thd->server_status &
2451
+ SERVER_MORE_RESULTS_EXISTS);
2452
+ thd->server_status |= SERVER_MORE_RESULTS_EXISTS;
2454
2453
ha_rows select_limit= thd->variables .select_limit ;
2455
2454
thd->variables .select_limit = HA_POS_ERROR;
2456
2455
You can’t perform that action at this time.
0 commit comments