Details
-
Technical task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Done
-
None
-
None
Description
Development issue: MDEV-13694
While it was a bug report, apparently the change was considered too big for a GA releases, and then it fell through the cracks in 10.5, so it went to 10.6.
The story of the bug report is confusing. It was originally reported for 10.1, and the problem is still reproducible on the current 10.1 – not exactly the same actual result, but still obvious difference with and without the orderby_uses_equalities switch.
Then the affected versions field on the bug report was changed several times and eventually was set to 10.5 only. However, it isn't reproducible for me with the current 10.5 (neither with the current or even older 10.2-10.4). The test case committed with the fix also returns the same result sets on all versions, differences are only in the EXPLAIN output.
It causes concerns about the fix – whether there was still a real problem to fix, and if there was, whether it was fixed.
TODO:
- investigation and getting back to the real problem
UPD: The initially reported wrong result was fixed in 10.2+ by the patch forMDEV-13994.
UPD: At the end it was a performance patch which didn't fix any wrong results. - GCOV for random tests to make sure they hit the changed code;
misses:sql/sql_select.cc
21544 : : +
21545 : : +
21546 : 9236940 : + if (!tab->preread_init_done && tab->preread_init())
21547 : 0 : + return 1;
21548 : : +
21569 : 9237290 : + if (init_read_record(&tab->read_record, tab->join->thd, tab->table,
21570 : : + tab->select, tab->filesort_result, 1, 1, FALSE))
21571 : 0 : + return 1;
- GCOV for MTR to see if the test tests the change
misses:sql/sql_select.cc
21544 : : +
21545 : : +
21546 : 423 : + if (!tab->preread_init_done && tab->preread_init())
21547 : 0 : + return 1;
21548 : : +
21569 : 423 : + if (init_read_record(&tab->read_record, tab->join->thd, tab->table,
21570 : : + tab->select, tab->filesort_result, 1, 1, FALSE))
21571 : 0 : + return 1;
- comparison testing between the last affected version and 10.6 with the fix;
- comparison testing between 10.6 with orderby_uses_equalities and without;
- rough comparative latency test.