Skip to content

Commit ef94cbb

Browse files
rockeetinikep
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 f14f832 commit ef94cbb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

storage/rocksdb/ha_rocksdb.cc

+8-1
Original file line numberDiff line numberDiff line change
@@ -4043,7 +4043,10 @@ class Rdb_transaction {
40434043
}
40444044

40454045
explicit Rdb_transaction(THD *const thd)
4046-
: m_thd(thd), m_tbl_io_perf(nullptr) {}
4046+
: m_thd(thd), m_tbl_io_perf(nullptr) {
4047+
m_read_opts.ignore_range_deletions =
4048+
!rocksdb_enable_delete_range_for_drop_index;
4049+
}
40474050

40484051
virtual ~Rdb_transaction() {
40494052
#ifndef DEBUG_OFF
@@ -4410,6 +4413,8 @@ class Rdb_transaction_impl : public Rdb_transaction {
44104413
m_rocksdb_reuse_tx = nullptr;
44114414

44124415
m_read_opts = rocksdb::ReadOptions();
4416+
m_read_opts.ignore_range_deletions =
4417+
!rocksdb_enable_delete_range_for_drop_index;
44134418

44144419
set_initial_savepoint();
44154420

@@ -4521,6 +4526,8 @@ class Rdb_writebatch_impl : public Rdb_transaction {
45214526
void reset() {
45224527
m_batch->Clear();
45234528
m_read_opts = rocksdb::ReadOptions();
4529+
m_read_opts.ignore_range_deletions =
4530+
!rocksdb_enable_delete_range_for_drop_index;
45244531
m_ddl_transaction = false;
45254532
}
45264533

0 commit comments

Comments
 (0)