Commit 429c5b1
committed
MDEV-35049 fixup: Avoid useless rebuild if cmp=0
btr_search_info_update_hash(): Avoid useless rebuild if cmp==0.
Consider index(col) on a VARCHAR column for which we have the values
col='prefix1' and col='prefix2'. In WHERE col LIKE 'prefix%',
page_cur_search_with_match_bytes() would return 0 as well as
0 matched fields and bytes on each side.
It turns out that page_cur_search_with_match_bytes() can only return
nonzero matched bytes when a binary comparison can be used, such as
with VARBINARY or INT columns.
Co-developed by: Alessandro Vetere1 parent 83a48d2 commit 429c5b1
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
565 | | - | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
566 | 574 | | |
567 | 575 | | |
568 | 576 | | |
| |||
0 commit comments