Skip to content

Commit 8628c58

Browse files
committed
Fix ha_rocksdb::calc_eq_cond_len() to handle HA_READ_PREFIX_LAST_OR_PREV correctly
1 parent e7efc79 commit 8628c58

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

storage/rocksdb/ha_rocksdb.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7464,6 +7464,13 @@ int ha_rocksdb::calc_eq_cond_len(const Rdb_key_def &kd,
74647464
*/
74657465
return slice.size() - bytes_changed_by_succ;
74667466
}
7467+
if (find_flag == HA_READ_PREFIX_LAST_OR_PREV) {
7468+
/*
7469+
We are interested in records with or without the specified prefix, so
7470+
the only limit is that records are from this index
7471+
*/
7472+
return Rdb_key_def::INDEX_NUMBER_SIZE;
7473+
}
74677474

74687475
if (end_key) {
74697476
*end_key_packed_size =

0 commit comments

Comments
 (0)