Activity log for bug #1388533

Date Who What changed Old value New value Message
2014-11-02 10:35:29 Elena Stepanova bug added bug
2014-11-02 10:36:25 Elena Stepanova description In the procedure below, SELECT SLEEP(..) is interrupted as expected; but SELECT COUNT(*) takes clearly longer that 1 millisecond, however it is not interrupted. MySQL [test]> create table t1 (i int) engine=InnoDB; Query OK, 0 rows affected (1.12 sec) MySQL [test]> insert into t1 values (1),(2),(3),(4); Query OK, 4 rows affected (0.56 sec) Records: 4 Duplicates: 0 Warnings: 0 MySQL [test]> insert into t1 select a.* from t1 a, t1 b, t1 c, t1 d, t1 e, t1 f, t1 g; Query OK, 16384 rows affected (4.47 sec) Records: 16384 Duplicates: 0 Warnings: 0 MySQL [test]> MySQL [test]> delimiter | MySQL [test]> create procedure pr() -> begin -> select sleep(0.5); -> select sql_no_cache count(*) from t1; -> select sql_no_cache count(*) from t1; -> end | Query OK, 0 rows affected (0.00 sec) MySQL [test]> delimiter ; MySQL [test]> MySQL [test]> set max_statement_time = 1; Query OK, 0 rows affected (0.00 sec) MySQL [test]> call pr(); +------------+ | sleep(0.5) | +------------+ | 1 | +------------+ 1 row in set (0.00 sec) +----------+ | count(*) | +----------+ | 16388 | +----------+ 1 row in set (0.29 sec) +----------+ | count(*) | +----------+ | 16388 | +----------+ 1 row in set (0.58 sec) Query OK, 0 rows affected (0.58 sec) Compare with this: MySQL [test]> delimiter | MySQL [test]> create procedure pr2() -> begin -> select 1; -> select sql_no_cache count(*) from t1; -> select sql_no_cache count(*) from t1; -> end | Query OK, 0 rows affected (0.00 sec) MySQL [test]> delimiter ; MySQL [test]> MySQL [test]> set max_statement_time = 1; Query OK, 0 rows affected (0.00 sec) MySQL [test]> call pr2(); +---+ | 1 | +---+ | 1 | +---+ 1 row in set (0.00 sec) ERROR 1885 (70101): Query execution was interrupted, max_statement_time exceeded In the procedure below, SELECT SLEEP(..) is interrupted as expected; but SELECT COUNT(*) takes clearly longer that 1 millisecond, however it is not interrupted. #---------------------------------- MySQL [test]> create table t1 (i int) engine=InnoDB; Query OK, 0 rows affected (1.12 sec) MySQL [test]> insert into t1 values (1),(2),(3),(4); Query OK, 4 rows affected (0.56 sec) Records: 4 Duplicates: 0 Warnings: 0 MySQL [test]> insert into t1 select a.* from t1 a, t1 b, t1 c, t1 d, t1 e, t1 f, t1 g; Query OK, 16384 rows affected (4.47 sec) Records: 16384 Duplicates: 0 Warnings: 0 MySQL [test]> MySQL [test]> delimiter | MySQL [test]> create procedure pr()     -> begin     -> select sleep(0.5);     -> select sql_no_cache count(*) from t1;     -> select sql_no_cache count(*) from t1;     -> end | Query OK, 0 rows affected (0.00 sec) MySQL [test]> delimiter ; MySQL [test]> MySQL [test]> set max_statement_time = 1; Query OK, 0 rows affected (0.00 sec) MySQL [test]> call pr(); +------------+ | sleep(0.5) | +------------+ | 1 | +------------+ 1 row in set (0.00 sec) +----------+ | count(*) | +----------+ | 16388 | +----------+ 1 row in set (0.29 sec) +----------+ | count(*) | +----------+ | 16388 | +----------+ 1 row in set (0.58 sec) Query OK, 0 rows affected (0.58 sec) #---------------------------------- Compare with this: #---------------------------------- MySQL [test]> delimiter | MySQL [test]> create procedure pr2()     -> begin     -> select 1;     -> select sql_no_cache count(*) from t1;     -> select sql_no_cache count(*) from t1;     -> end | Query OK, 0 rows affected (0.00 sec) MySQL [test]> delimiter ; MySQL [test]> MySQL [test]> set max_statement_time = 1; Query OK, 0 rows affected (0.00 sec) MySQL [test]> call pr2(); +---+ | 1 | +---+ | 1 | +---+ 1 row in set (0.00 sec) ERROR 1885 (70101): Query execution was interrupted, max_statement_time exceeded
2014-11-03 04:43:56 Laurynas Biveinis tags max-statement-time
2014-11-10 10:50:11 Valerii Kravchuk nominated for series percona-server/5.6
2014-11-10 10:50:11 Valerii Kravchuk bug task added percona-server/5.6
2014-11-12 07:07:19 Nilnandan Joshi percona-server/5.6: status New Confirmed
2014-11-12 07:08:10 Nilnandan Joshi bug added subscriber Nilnandan Joshi
2014-11-13 04:25:27 Laurynas Biveinis percona-server/5.6: importance Undecided Medium
2014-11-13 04:25:29 Laurynas Biveinis percona-server/5.6: status Confirmed Triaged
2016-03-25 14:33:28 Laurynas Biveinis nominated for series percona-server/5.7
2016-03-25 14:33:28 Laurynas Biveinis bug task added percona-server/5.7
2016-03-25 14:33:51 Laurynas Biveinis percona-server/5.7: status Triaged Invalid
2016-03-25 14:33:53 Laurynas Biveinis percona-server/5.7: importance Medium Undecided