From 4d2a36e8bcaeced7095a5d4b40b87d6ffcfeafb1 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Mon, 14 May 2018 20:25:02 +0300 Subject: Post-merge fix for rocksdb.add_index_inplace_sstfilewriter MariaDB has a scaled-down version of the test so we need to set @@rocksdb_max_row_locks lower to trigger the desired error (didn't catch this on test BB run because this test is marked as "big") --- .../mysql-test/rocksdb/r/add_index_inplace_sstfilewriter.result | 3 +++ .../rocksdb/mysql-test/rocksdb/t/add_index_inplace_sstfilewriter.test | 3 +++ 2 files changed, 6 insertions(+) (limited to 'storage') diff --git a/storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace_sstfilewriter.result b/storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace_sstfilewriter.result index 18365338d0c..08f2329f688 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace_sstfilewriter.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace_sstfilewriter.result @@ -14,11 +14,14 @@ select count(b) from t1; count(b) 300000 ALTER TABLE t1 ADD INDEX kb(b), ALGORITHM=INPLACE; +set @tmp= @@rocksdb_max_row_locks; +set session rocksdb_max_row_locks=1000; ALTER TABLE t1 ADD INDEX kb_copy(b), ALGORITHM=COPY; ERROR HY000: Status error 10 received from RocksDB: Operation aborted: Failed to acquire lock due to max_num_locks limit set session rocksdb_bulk_load=1; ALTER TABLE t1 ADD INDEX kb_copy(b), ALGORITHM=COPY; set session rocksdb_bulk_load=0; +set session rocksdb_max_row_locks=@tmp; SELECT COUNT(*) as c FROM (SELECT COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `b`, CONCAT(ISNULL(`b`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `t1` FORCE INDEX(`kb`) UNION DISTINCT diff --git a/storage/rocksdb/mysql-test/rocksdb/t/add_index_inplace_sstfilewriter.test b/storage/rocksdb/mysql-test/rocksdb/t/add_index_inplace_sstfilewriter.test index 3977b38d725..5eac8595f7b 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/add_index_inplace_sstfilewriter.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/add_index_inplace_sstfilewriter.test @@ -66,12 +66,15 @@ ALTER TABLE t1 ADD INDEX kb(b), ALGORITHM=INPLACE; --disable_warnings # now do same index using copy algorithm # hitting max row locks (1M) +set @tmp= @@rocksdb_max_row_locks; +set session rocksdb_max_row_locks=1000; --error ER_RDB_STATUS_GENERAL ALTER TABLE t1 ADD INDEX kb_copy(b), ALGORITHM=COPY; set session rocksdb_bulk_load=1; ALTER TABLE t1 ADD INDEX kb_copy(b), ALGORITHM=COPY; set session rocksdb_bulk_load=0; --enable_warnings +set session rocksdb_max_row_locks=@tmp; # checksum testing SELECT COUNT(*) as c FROM -- cgit v1.2.1