[MDEV-21735] Rocksdb text prefix indexes return wrong results Created: 2020-02-14 Updated: 2023-04-27 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Character Sets, Storage Engine - RocksDB |
| Affects Version/s: | 10.3.22, 10.4.12, 10.2, 10.3, 10.4, 10.5 |
| Fix Version/s: | 10.4, 10.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Michal Povinsky | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Tested on 10.3 on Debian and 10.4 on Gentoo |
||
| Description |
|
Rows are missing from the output when searching by indexed text column when the value is longer than the index's prefix length. Using "like 'prefix%'" only works when the prefix is shorter than the index's length (or equal, if value=prefix).
|
| Comments |
| Comment by Elena Stepanova [ 2020-03-07 ] | |||||||||||||||||||||||||||||||
|
Please paste or attach your config file(s).
| |||||||||||||||||||||||||||||||
| Comment by Michal Povinsky [ 2020-03-08 ] | |||||||||||||||||||||||||||||||
|
Here's the content of my config files (with removed comments and irrelevant sections.) It's an almost unmodified Gentoo config (except for enabling rocksdb) and commenting out the character set options doesn't make any difference. I did a little more testing, and the bug seems to depend on database collation - I didn't test all collations, but it seems that running the test in a fresh database using ascii/latin1/ucs2 collations works correctly, but utf8/utf8mb4/utf16/utf32 shows this bug. I didn't know that the official MariaDB builds default to latin1, but I can reproduce it there with no config changes, as long as I use utf8mb4_bin database collation.
| |||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2020-04-05 ] | |||||||||||||||||||||||||||||||
|
Reproducible as described:
Please note that index creation in this case throws a warning:
|