1create table t (a int primary key) engine=rocksdb;
2begin;
3insert into t values (0);
4set @@rocksdb_lock_wait_timeout=1;
5select ROW_LOCK_WAIT_TIMEOUTS from information_schema.table_statistics where table_name="t";
6ROW_LOCK_WAIT_TIMEOUTS
70
8begin;
9set @@rocksdb_lock_wait_timeout=1;
10begin;
11select variable_value into @a from information_schema.global_status where variable_name='rocksdb_row_lock_wait_timeouts';
12insert into t values(0);
13ERROR HY000: Lock wait timeout exceeded; try restarting transaction: Timeout on index: test.t.PRIMARY
14select ROW_LOCK_WAIT_TIMEOUTS from information_schema.table_statistics where table_name="t";
15ROW_LOCK_WAIT_TIMEOUTS
161
17select ROW_LOCK_WAIT_TIMEOUTS from information_schema.table_statistics where table_name="t";
18ROW_LOCK_WAIT_TIMEOUTS
191
20select case when variable_value-@a = 1 then 'true' else 'false' end as waits from information_schema.global_status where variable_name='rocksdb_row_lock_wait_timeouts';
21waits
22true
23select variable_value into @a from information_schema.global_status where variable_name='rocksdb_row_lock_wait_timeouts';
24insert into t values(0);
25ERROR HY000: Lock wait timeout exceeded; try restarting transaction: Timeout on index: test.t.PRIMARY
26select ROW_LOCK_WAIT_TIMEOUTS from information_schema.table_statistics where table_name="t";
27ROW_LOCK_WAIT_TIMEOUTS
282
29select ROW_LOCK_WAIT_TIMEOUTS from information_schema.table_statistics where table_name="t";
30ROW_LOCK_WAIT_TIMEOUTS
312
32select case when variable_value-@a = 1 then 'true' else 'false' end as waits from information_schema.global_status where variable_name='rocksdb_row_lock_wait_timeouts';
33waits
34true
35drop table t;
36