revision-id: 86500865916f729216b7081f4bdc2cd9c0c37e70 (fb-prod201903-259-g86500865916) parent(s): b3fb7f7674a9cd1df3931aa1121247713af75a89 author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2019-11-24 22:29:47 +0300 message: Cleanup in tests: "${indexnr}" takes 8 hex digits, not 6. --- .../suite/rocksdb/include/select_from_is_rowlocks.inc | 4 ++-- mysql-test/suite/rocksdb/r/range_locking.result | 18 +++++++++--------- mysql-test/suite/rocksdb/r/range_locking_rev_cf.result | 18 +++++++++--------- .../rocksdb/r/range_locking_seek_for_update.result | 16 ++++++++-------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/mysql-test/suite/rocksdb/include/select_from_is_rowlocks.inc b/mysql-test/suite/rocksdb/include/select_from_is_rowlocks.inc index 74330efca21..e5f54d68914 100644 --- a/mysql-test/suite/rocksdb/include/select_from_is_rowlocks.inc +++ b/mysql-test/suite/rocksdb/include/select_from_is_rowlocks.inc @@ -17,10 +17,10 @@ set @cf_id=(select column_family from information_schema.rocksdb_ddl where table_name='t1' and index_name='PRIMARY'); set @rtrx_id=(select transaction_id from information_schema.rocksdb_trx where thread_id=connection_id()); -set @indexnr= (select lower(lpad(hex(index_number),6,'0')) from information_schema.rocksdb_ddl +set @indexnr= (select lower(lpad(hex(index_number),8,'0')) from information_schema.rocksdb_ddl where table_name='t1' and index_name='PRIMARY'); -set @indexnr_next= (select lower(lpad(hex(index_number+1),6,'0')) +set @indexnr_next= (select lower(lpad(hex(index_number+1),8,'0')) from information_schema.rocksdb_ddl where table_name='t1' and index_name='PRIMARY'); diff --git a/mysql-test/suite/rocksdb/r/range_locking.result b/mysql-test/suite/rocksdb/r/range_locking.result index bee37926ddf..5a58ddf148e 100644 --- a/mysql-test/suite/rocksdb/r/range_locking.result +++ b/mysql-test/suite/rocksdb/r/range_locking.result @@ -99,12 +99,12 @@ pk a 10 10 # 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 0000${indexnr}8000000a X +$cf_id $trx_id 00${indexnr}8000000a X delete from t1 where pk between 25 and 40; # 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 0000${indexnr}8000000a X -$cf_id $trx_id 0000${indexnr}80000019 - 0100${indexnr}80000028 X +$cf_id $trx_id 00${indexnr}8000000a X +$cf_id $trx_id 00${indexnr}80000019 - 01${indexnr}80000028 X rollback; begin; # The following will show a range lock on 2-9 and also a point lock on 10. @@ -113,8 +113,8 @@ select * from t1 where pk between 2 and 9 for update; pk a # 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 0000${indexnr}80000002 - 0100${indexnr}80000009 X -$cf_id $trx_id 0000${indexnr}8000000a X +$cf_id $trx_id 00${indexnr}80000002 - 01${indexnr}80000009 X +$cf_id $trx_id 00${indexnr}8000000a X rollback; drop table t1; connection con1; @@ -437,8 +437,8 @@ pk1 pk2 a 3 0 30 # 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 0000${indexnr}8000000280000009 X -$cf_id $trx_id 0000${indexnr}80000003 - 0100${indexnr}80000003 X +$cf_id $trx_id 00${indexnr}8000000280000009 X +$cf_id $trx_id 00${indexnr}80000003 - 01${indexnr}80000003 X rollback; # # Test range locking for ranges with HA_READ_PREFIX_LAST_OR_PREV @@ -463,8 +463,8 @@ pk1 pk2 a 4 5 45 # 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 0000${indexnr}8000000480000004 X -$cf_id $trx_id 0000${indexnr}8000000480000005 - 0100${indexnr}8000000480000008 X +$cf_id $trx_id 00${indexnr}8000000480000004 X +$cf_id $trx_id 00${indexnr}8000000480000005 - 01${indexnr}8000000480000008 X rollback; connection con1; rollback; diff --git a/mysql-test/suite/rocksdb/r/range_locking_rev_cf.result b/mysql-test/suite/rocksdb/r/range_locking_rev_cf.result index 04f88ab656a..811ad88e91b 100644 --- a/mysql-test/suite/rocksdb/r/range_locking_rev_cf.result +++ b/mysql-test/suite/rocksdb/r/range_locking_rev_cf.result @@ -99,12 +99,12 @@ pk a 10 10 # 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 0000${indexnr}8000000a X +$cf_id $trx_id 00${indexnr}8000000a X delete from t1 where pk between 25 and 40; # 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 0000${indexnr}8000000a X -$cf_id $trx_id 0000${indexnr}80000028 - 0100${indexnr}80000019 X +$cf_id $trx_id 00${indexnr}8000000a X +$cf_id $trx_id 00${indexnr}80000028 - 01${indexnr}80000019 X rollback; begin; # The following will show a range lock on 2-9 and also a point lock on 10. @@ -113,8 +113,8 @@ select * from t1 where pk between 2 and 9 for update; pk a # 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 0000${indexnr}80000009 - 0100${indexnr}80000002 X -$cf_id $trx_id 0000${indexnr}8000000a X +$cf_id $trx_id 00${indexnr}80000009 - 01${indexnr}80000002 X +$cf_id $trx_id 00${indexnr}8000000a X rollback; drop table t1; connection con1; @@ -397,8 +397,8 @@ pk1 pk2 a 3 0 30 # 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 0000${indexnr}8000000280000009 X -$cf_id $trx_id 0000${indexnr}80000003 - 0100${indexnr}80000003 X +$cf_id $trx_id 00${indexnr}8000000280000009 X +$cf_id $trx_id 00${indexnr}80000003 - 01${indexnr}80000003 X rollback; # # Test range locking for ranges with HA_READ_PREFIX_LAST_OR_PREV @@ -423,8 +423,8 @@ pk1 pk2 a 4 5 45 # 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 0000${indexnr}8000000480000004 X -$cf_id $trx_id 0000${indexnr}8000000480000008 - 0100${indexnr}8000000480000005 X +$cf_id $trx_id 00${indexnr}8000000480000004 X +$cf_id $trx_id 00${indexnr}8000000480000008 - 01${indexnr}8000000480000005 X rollback; connection con1; 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 aa6f52a02bc..2614e8ce66e 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 0000${indexnr}8000000b X +$cf_id $trx_id 00${indexnr}8000000b X # # SeekForUpdate Test #1: A query with type=range (without upper bound) and LIMIT # @@ -43,8 +43,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 0000${indexnr}8000000b X -$cf_id $trx_id 0000${indexnr}800001f4 - 0000${indexnr}800001f6 X +$cf_id $trx_id 00${indexnr}8000000b X +$cf_id $trx_id 00${indexnr}800001f4 - 00${indexnr}800001f6 X rollback; begin; select * from t1 where pk=11 for update; @@ -61,8 +61,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 0000${indexnr} - 0000${indexnr}80000002 X -$cf_id $trx_id 0000${indexnr}8000000b X +$cf_id $trx_id 00${indexnr} - 00${indexnr}80000002 X +$cf_id $trx_id 00${indexnr}8000000b X rollback; connection con1; rollback; @@ -140,7 +140,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 0000${indexnr}80000005 - 0000${indexnr}8000000a X +$cf_id $trx_id 00${indexnr}80000005 - 00${indexnr}8000000a X rollback; delete from t1 where pk=8; # @@ -200,7 +200,7 @@ pk a # The below will lock from pk=1007 (0x3ef) till the end of the table: # 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 0000${indexnr}800003ef - 0000${indexnr+1} X +$cf_id $trx_id 00${indexnr}800003ef - 00${indexnr+1} X rollback; begin; select * from t1 where pk <1007 order by pk desc limit 2 for update; @@ -209,7 +209,7 @@ pk a 1001 1001 # 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 0000${indexnr}800003e9 - 0000${indexnr}800003ef X +$cf_id $trx_id 00${indexnr}800003e9 - 00${indexnr}800003ef X connection con1; rollback; connection default;