Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing index_merge query returning wrong results (#624)
Summary: This diff fixed MyRocks returning missing rows if index merge query plan was used. When index merge is selected, table->read_map is cleared at QUICK_RANGE_SELECT::init_ror_merged_scan(). Then ha_rocksdb::setup_read_decoders() wrongly decided not to decode all fields, which made MySQL layer decide that keys did not match. This diff changes ha_rocksdb::setup_read_decoders() to always decode if read_map is cleared. A side effect is decoding all fetched fields on index merge. There is a slight performance penalty but much better than returning wrong results. This diff reuses index_merge_ror.inc and index_merge_2sweeps.inc test cases for MyRocks. Since MyRocks query plan is less stable than InnoDB, it skips using explain and just verifies data correctness. Closes facebook/mysql-5.6#626 Reviewed By: hermanlee Differential Revision: D5088547 Pulled By: yoshinorim fbshipit-source-id: f025617
- Loading branch information