revision-id: a6f8db1393735066a8334dcc2abb42999435561a (fb-prod8-202009-55-ga6f8db13937) parent(s): fb90597917ae0587373596704d9a39ea4b9e6038 author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2020-12-08 00:08:50 +0300 message: Update test results after merge range_locking_seek_for_update range_locking_deadlock_tracking (unfinished) --- .../r/range_locking_deadlock_tracking.result | 144 ++++++++++++++++++++- .../rocksdb/r/range_locking_seek_for_update.result | 12 +- 2 files changed, 148 insertions(+), 8 deletions(-) diff --git a/mysql-test/suite/rocksdb/r/range_locking_deadlock_tracking.result b/mysql-test/suite/rocksdb/r/range_locking_deadlock_tracking.result index 1cfbfeb8f13..58bef2aa091 100644 --- a/mysql-test/suite/rocksdb/r/range_locking_deadlock_tracking.result +++ b/mysql-test/suite/rocksdb/r/range_locking_deadlock_tracking.result @@ -50,6 +50,26 @@ SNAPSHOTS --------- LIST OF SNAPSHOTS FOR EACH SESSION: ----------LATEST DETECTED DEADLOCKS---------- + +*** DEADLOCK PATH +========================================= +TSTAMP +TXN_ID +COLUMN FAMILY NAME: default +KEY +LOCK TYPE: EXCLUSIVE +INDEX NAME: PRIMARY +TABLE NAME: test.t +---------------WAITING FOR--------------- +TSTAMP +TXN_ID +COLUMN FAMILY NAME: default +KEY +LOCK TYPE: EXCLUSIVE +INDEX NAME: PRIMARY +TABLE NAME: test.t + +--------TXN_ID GOT DEADLOCK--------- ----------------------------------------- END OF ROCKSDB TRANSACTION MONITOR OUTPUT ========================================= @@ -81,6 +101,46 @@ SNAPSHOTS --------- LIST OF SNAPSHOTS FOR EACH SESSION: ----------LATEST DETECTED DEADLOCKS---------- + +*** DEADLOCK PATH +========================================= +TSTAMP +TXN_ID +COLUMN FAMILY NAME: default +KEY +LOCK TYPE: EXCLUSIVE +INDEX NAME: PRIMARY +TABLE NAME: test.t +---------------WAITING FOR--------------- +TSTAMP +TXN_ID +COLUMN FAMILY NAME: default +KEY +LOCK TYPE: EXCLUSIVE +INDEX NAME: PRIMARY +TABLE NAME: test.t + +--------TXN_ID GOT DEADLOCK--------- + +*** DEADLOCK PATH +========================================= +TSTAMP +TXN_ID +COLUMN FAMILY NAME: default +KEY +LOCK TYPE: EXCLUSIVE +INDEX NAME: PRIMARY +TABLE NAME: test.t +---------------WAITING FOR--------------- +TSTAMP +TXN_ID +COLUMN FAMILY NAME: default +KEY +LOCK TYPE: EXCLUSIVE +INDEX NAME: PRIMARY +TABLE NAME: test.t + +--------TXN_ID GOT DEADLOCK--------- ----------------------------------------- END OF ROCKSDB TRANSACTION MONITOR OUTPUT ========================================= @@ -113,6 +173,66 @@ SNAPSHOTS --------- LIST OF SNAPSHOTS FOR EACH SESSION: ----------LATEST DETECTED DEADLOCKS---------- + +*** DEADLOCK PATH +========================================= +TSTAMP +TXN_ID +COLUMN FAMILY NAME: default +KEY +LOCK TYPE: EXCLUSIVE +INDEX NAME: PRIMARY +TABLE NAME: test.t +---------------WAITING FOR--------------- +TSTAMP +TXN_ID +COLUMN FAMILY NAME: default +KEY +LOCK TYPE: EXCLUSIVE +INDEX NAME: PRIMARY +TABLE NAME: test.t + +--------TXN_ID GOT DEADLOCK--------- + +*** DEADLOCK PATH +========================================= +TSTAMP +TXN_ID +COLUMN FAMILY NAME: default +KEY +LOCK TYPE: EXCLUSIVE +INDEX NAME: PRIMARY +TABLE NAME: test.t +---------------WAITING FOR--------------- +TSTAMP +TXN_ID +COLUMN FAMILY NAME: default +KEY +LOCK TYPE: EXCLUSIVE +INDEX NAME: PRIMARY +TABLE NAME: test.t + +--------TXN_ID GOT DEADLOCK--------- + +*** DEADLOCK PATH +========================================= +TSTAMP +TXN_ID +COLUMN FAMILY NAME: default +KEY +LOCK TYPE: EXCLUSIVE +INDEX NAME: PRIMARY +TABLE NAME: test.t +---------------WAITING FOR--------------- +TSTAMP +TXN_ID +COLUMN FAMILY NAME: default +KEY +LOCK TYPE: EXCLUSIVE +INDEX NAME: PRIMARY +TABLE NAME: test.t + +--------TXN_ID GOT DEADLOCK--------- ----------------------------------------- END OF ROCKSDB TRANSACTION MONITOR OUTPUT ========================================= @@ -129,6 +249,26 @@ SNAPSHOTS --------- LIST OF SNAPSHOTS FOR EACH SESSION: ----------LATEST DETECTED DEADLOCKS---------- + +*** DEADLOCK PATH +========================================= +TSTAMP +TXN_ID +COLUMN FAMILY NAME: default +KEY +LOCK TYPE: EXCLUSIVE +INDEX NAME: PRIMARY +TABLE NAME: test.t +---------------WAITING FOR--------------- +TSTAMP +TXN_ID +COLUMN FAMILY NAME: default +KEY +LOCK TYPE: EXCLUSIVE +INDEX NAME: PRIMARY +TABLE NAME: test.t + +--------TXN_ID GOT DEADLOCK--------- ----------------------------------------- END OF ROCKSDB TRANSACTION MONITOR OUTPUT ========================================= @@ -149,10 +289,10 @@ i 3 select * from t where i=2 for update; select * from t where i=3 for update; -select variable_value into @a from information_schema.global_status where variable_name='rocksdb_row_lock_deadlocks'; +select variable_value into @a from performance_schema.global_status where variable_name='rocksdb_row_lock_deadlocks'; select * from t where i=1 for update; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction -select case when variable_value-@a = 1 then 'true' else 'false' end as deadlocks from information_schema.global_status where variable_name='rocksdb_row_lock_deadlocks'; +select case when variable_value-@a = 1 then 'true' else 'false' end as deadlocks from performance_schema.global_status where variable_name='rocksdb_row_lock_deadlocks'; deadlocks true rollback; diff --git a/mysql-test/suite/rocksdb/r/range_locking_seek_for_update.result b/mysql-test/suite/rocksdb/r/range_locking_seek_for_update.result index 54559d7d0a3..514916eaa22 100644 --- a/mysql-test/suite/rocksdb/r/range_locking_seek_for_update.result +++ b/mysql-test/suite/rocksdb/r/range_locking_seek_for_update.result @@ -28,7 +28,7 @@ pk a # Now, we will just see locks on 10=0xA and 11=0xB: # select * from information_schema.rocksdb_locks; # With replacements by select_from_is_rowlocks.inc COLUMN_FAMILY_ID TRANSACTION_ID KEY mode -$cf_id $trx_id 00${indexnr}8000000b X +$cf_id $trx_id ${indexnr}8000000b X # # SeekForUpdate Test #1: A query with type=range (without upper bound) and LIMIT # @@ -45,8 +45,8 @@ pk a 502 502 # select * from information_schema.rocksdb_locks; # With replacements by select_from_is_rowlocks.inc COLUMN_FAMILY_ID TRANSACTION_ID KEY mode -$cf_id $trx_id 00${indexnr}8000000b X -$cf_id $trx_id 00${indexnr}800001f4 - 00${indexnr}800001f6 X +$cf_id $trx_id ${indexnr}8000000b X +$cf_id $trx_id ${indexnr}800001f4-${indexnr}800001f6 X rollback; begin; select * from t1 where pk=11 for update; @@ -65,8 +65,8 @@ pk a 2 2 # select * from information_schema.rocksdb_locks; # With replacements by select_from_is_rowlocks.inc COLUMN_FAMILY_ID TRANSACTION_ID KEY mode -$cf_id $trx_id 00${indexnr} - 00${indexnr}80000002 X -$cf_id $trx_id 00${indexnr}8000000b X +$cf_id $trx_id ${indexnr}-${indexnr}80000002 X +$cf_id $trx_id ${indexnr}8000000b X rollback; connection con1; rollback; @@ -148,7 +148,7 @@ pk a 8 8 # select * from information_schema.rocksdb_locks; # With replacements by select_from_is_rowlocks.inc COLUMN_FAMILY_ID TRANSACTION_ID KEY mode -$cf_id $trx_id 00${indexnr}80000005 - 00${indexnr}8000000a X +$cf_id $trx_id ${indexnr}80000005-${indexnr}8000000a X rollback; delete from t1 where pk=8; #