-
Marko Mäkelä authored
When there is a secondary index on a column prefix of an externally stored column and an entry in the secondary index is shorter than the reserved prefix length, it should mean that the secondary index entry is holding the complete column value. When comparing this secondary index column value to the column in the clustered index row, we must compare the entire prefix that was fetched from the clustered index. The bug was that we would just compare that the column in the clustered index starts with the value found in the secondary index column. This bug affects only the InnoDB Barracuda formats (ROW_FORMAT=DYNAMIC and ROW_FORMAT=COMPRESSED), in which columns that are stored off-page in the clustered index do not contain any prefix in the clustered index record. row_sel_sec_rec_is_for_blob(): Add the parameter prefix_len, for ifield->prefix_len. Add some assertions. Sorry, I did not manage to produce a test case. This patch does produce correct results on the data set that Michael isolated on our test machine. That was with the purge and background rollback suspended, because they would make the bug go away. rb:760 approved by Sunny Bains
ae68af40
To find the state of this project's repository at the time of any of these versions, check out
the tags.