Details
-
Bug
-
Status: Done
-
Medium
-
Resolution: Done
-
8.0.25-15 (Q2 2021)
-
Yes
Description
If a query to MyRocks table interrupted due to the option MAX_EXECUTION time wrong error message reported.
How to Repeat
mysql> create table test_table_inno (id int not null primary key, value char(32)) engine=innodb; Query OK, 0 rows affected (0,02 sec) mysql> insert into test_table_inno values(1, 'one'); Query OK, 1 row affected (0,02 sec) <cks (id int not null primary key, value char(32)) engine=rocksdb; Query OK, 0 rows affected (0,01 sec) mysql> insert into test_table_rocks values(1, 'one'); Query OK, 1 row affected (0,01 sec) mysql> SET SESSION innodb_lock_wait_timeout=10; Query OK, 0 rows affected (0,00 sec) mysql> SET SESSION rocksdb_lock_wait_timeout=10; Query OK, 0 rows affected (0,00 sec)
Then open another session and run:
mysql2> begin; Query OK, 0 rows affected (0.00 sec) mysql2> select /*+ MAX_EXECUTION_TIME(5) */ * from test_table_inno where id=1 for update; +----+-------+ | id | value | +----+-------+ | 1 | one | +----+-------+ 1 row in set (0.00 sec) mysql2> select /*+ MAX_EXECUTION_TIME(5) */ * from test_table_rocks where id=1 for update; +----+-------+ | id | value | +----+-------+ | 1 | one | +----+-------+ 1 row in set (0.00 sec)
Do not close the transaction, keep the client open!
In the original session:
mysql> select /*+ MAX_EXECUTION_TIME(5) */ * from test_table_rocks where id=1 for update; ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction mysql> select * from test_table_rocks where id=1 for update; ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
Compare with queries to the InnoDB table:
mysql> select /*+ MAX_EXECUTION_TIME(5) */ * from test_table_inno where id=1 for update; ERROR 3024 (HY000): Query execution was interrupted, maximum statement execution time exceeded mysql> select * from test_table_inno where id=1 for update; ERROR 3024 (HY000): Query execution was interrupted, maximum statement execution time exceeded
Suggested fix
Print correct error message.
Attachments
Issue Links
- mentioned in
-
Page Loading...