Skip to content

Commit 99be46c

Browse files
rockeetOleksandr Kachan
authored andcommitted
set m_read_opts.ignore_range_deletions properly (percona#1218)
Upstream commit ID: facebook/mysql-5.6@238afbb PS-8494: Merge percona-202206 (https://jira.percona.com/browse/PS-8494) Summary: ignore_range_deletions should be set to true when range del is not enabled Pull Request resolved: facebook/mysql-5.6#1218 Reviewed By: Pushapgl Differential Revision: D39115879 Pulled By: yoshinorim fbshipit-source-id: 40e7bcb86590c8f9be44dfa3f74277fb3f49a6d5
1 parent 3121c9b commit 99be46c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎storage/rocksdb/ha_rocksdb.cc‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4031,7 +4031,10 @@ class Rdb_transaction {
40314031
}
40324032

40334033
explicit Rdb_transaction(THD *const thd)
4034-
: m_thd(thd), m_tbl_io_perf(nullptr) {}
4034+
: m_thd(thd), m_tbl_io_perf(nullptr) {
4035+
m_read_opts.ignore_range_deletions =
4036+
!rocksdb_enable_delete_range_for_drop_index;
4037+
}
40354038

40364039
virtual ~Rdb_transaction() {
40374040
#ifndef DEBUG_OFF
@@ -4398,6 +4401,8 @@ class Rdb_transaction_impl : public Rdb_transaction {
43984401
m_rocksdb_reuse_tx = nullptr;
43994402

44004403
m_read_opts = rocksdb::ReadOptions();
4404+
m_read_opts.ignore_range_deletions =
4405+
!rocksdb_enable_delete_range_for_drop_index;
44014406

44024407
set_initial_savepoint();
44034408

@@ -4509,6 +4514,8 @@ class Rdb_writebatch_impl : public Rdb_transaction {
45094514
void reset() {
45104515
m_batch->Clear();
45114516
m_read_opts = rocksdb::ReadOptions();
4517+
m_read_opts.ignore_range_deletions =
4518+
!rocksdb_enable_delete_range_for_drop_index;
45124519
m_ddl_transaction = false;
45134520
}
45144521

0 commit comments

Comments
 (0)