[Commits] 8628c58: Fix ha_rocksdb::calc_eq_cond_len() to handle HA_READ_PREFIX_LAST_OR_PREV correctly
revision-id: 8628c589f69aea164ec1865f52eb0f5bc5154ed8 parent(s): e7efc793504c0cd9d8b6cf9198314ae9b3c58988 committer: Sergei Petrunia branch nick: 10.2-r10 timestamp: 2018-04-09 15:27:35 +0300 message: Fix ha_rocksdb::calc_eq_cond_len() to handle HA_READ_PREFIX_LAST_OR_PREV correctly --- storage/rocksdb/ha_rocksdb.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc index 5f19fac..9d3d07e 100644 --- a/storage/rocksdb/ha_rocksdb.cc +++ b/storage/rocksdb/ha_rocksdb.cc @@ -7464,6 +7464,13 @@ int ha_rocksdb::calc_eq_cond_len(const Rdb_key_def &kd, */ return slice.size() - bytes_changed_by_succ; } + if (find_flag == HA_READ_PREFIX_LAST_OR_PREV) { + /* + We are interested in records with or without the specified prefix, so + the only limit is that records are from this index + */ + return Rdb_key_def::INDEX_NUMBER_SIZE; + } if (end_key) { *end_key_packed_size =
participants (1)
-
psergey@askmonty.org