Skip to content

Commit d4f5f2f

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 a32635b commit d4f5f2f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

storage/rocksdb/ha_rocksdb.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4042,7 +4042,10 @@ class Rdb_transaction {
40424042
}
40434043

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

40474050
virtual ~Rdb_transaction() {
40484051
#ifndef DEBUG_OFF
@@ -4409,6 +4412,8 @@ class Rdb_transaction_impl : public Rdb_transaction {
44094412
m_rocksdb_reuse_tx = nullptr;
44104413

44114414
m_read_opts = rocksdb::ReadOptions();
4415+
m_read_opts.ignore_range_deletions =
4416+
!rocksdb_enable_delete_range_for_drop_index;
44124417

44134418
set_initial_savepoint();
44144419

@@ -4520,6 +4525,8 @@ class Rdb_writebatch_impl : public Rdb_transaction {
45204525
void reset() {
45214526
m_batch->Clear();
45224527
m_read_opts = rocksdb::ReadOptions();
4528+
m_read_opts.ignore_range_deletions =
4529+
!rocksdb_enable_delete_range_for_drop_index;
45234530
m_ddl_transaction = false;
45244531
}
45254532

0 commit comments

Comments
 (0)