revision-id: b3fb7f7674a9cd1df3931aa1121247713af75a89 (fb-prod201903-258-gb3fb7f7674a) parent(s): 8599cfdb73e671ef867b2eec1a911cb461b9e5ec author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2019-11-24 22:19:55 +0300 message: Fix rocksdb.range_locking_seek_for_update test Make it work when ran after other tests --- mysql-test/suite/rocksdb/include/select_from_is_rowlocks.inc | 3 ++- mysql-test/suite/rocksdb/r/range_locking_seek_for_update.result | 3 --- mysql-test/suite/rocksdb/t/range_locking_seek_for_update.test | 1 + 3 files changed, 3 insertions(+), 4 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 cb95b149bae..74330efca21 100644 --- a/mysql-test/suite/rocksdb/include/select_from_is_rowlocks.inc +++ b/mysql-test/suite/rocksdb/include/select_from_is_rowlocks.inc @@ -20,7 +20,8 @@ set @rtrx_id=(select transaction_id from information_schema.rocksdb_trx set @indexnr= (select lower(lpad(hex(index_number),6,'0')) from information_schema.rocksdb_ddl where table_name='t1' and index_name='PRIMARY'); -set @indexnr_next= (select lpad(hex(index_number+1),6,'0') from information_schema.rocksdb_ddl +set @indexnr_next= (select lower(lpad(hex(index_number+1),6,'0')) + from information_schema.rocksdb_ddl where table_name='t1' and index_name='PRIMARY'); let $extra_where = where 1; 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 b31be59d35a..aa6f52a02bc 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 @@ -29,7 +29,6 @@ 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}8000000b X -$cf_id 6 0000${indexnr}8000000a X # # SeekForUpdate Test #1: A query with type=range (without upper bound) and LIMIT # @@ -46,7 +45,6 @@ pk a 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 6 0000${indexnr}8000000a X rollback; begin; select * from t1 where pk=11 for update; @@ -65,7 +63,6 @@ pk a 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 6 0000${indexnr}8000000a X rollback; connection con1; rollback; diff --git a/mysql-test/suite/rocksdb/t/range_locking_seek_for_update.test b/mysql-test/suite/rocksdb/t/range_locking_seek_for_update.test index edef8ac5bfa..0230113eeb1 100644 --- a/mysql-test/suite/rocksdb/t/range_locking_seek_for_update.test +++ b/mysql-test/suite/rocksdb/t/range_locking_seek_for_update.test @@ -33,6 +33,7 @@ connection default; begin; select * from t1 where pk=11 for update; +let $select_from_is_rowlocks_current_trx_only=1; --echo # Now, we will just see locks on 10=0xA and 11=0xB: --source suite/rocksdb/include/select_from_is_rowlocks.inc