[MDEV-9232] Fulltext index on a given column causes empty set for 'distinct' query Created: 2015-12-02 Updated: 2023-04-27 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Full-text Search, Optimizer, Storage Engine - InnoDB, Storage Engine - XtraDB |
| Affects Version/s: | 10.0, 10.1, 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Joao Osorio | Assignee: | Thirunarayanan Balathandayuthapani |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | upstream | ||
| Environment: |
Ubuntu Server 14.04 64bit |
||
| Issue Links: |
|
||||||||||||||||
| Description |
|
After creating a full text targeting a column on a table, a "select distinct" query to retrieve the range of values returns an empty set. If you use the count operator, it returns the real number of distinct occurences. If you apply a function, like "UCASE", it returns the correct record set. How to repeat: Query the titles table with the following query:
Then create a fulltext index on the titles table, over the title column:
Issue the same query again:
Repeat the query, but with COUNT:
Repeat the query with UCASE:
So, how come the first query returns an empty set, when there are 7 records to display. If you drop the FT index, the query returns the correct result set. |
| Comments |
| Comment by Elena Stepanova [ 2015-12-03 ] |
|
Thanks for the report. It appears to be an upstream issue, reproducible on current 5.6 and 5.7. In such cases we normally also report bugs at bugs.mysql.com to inform MySQL. Are you willing to do it, or should we do it on your behalf? It's possible that the bug has already been filed there, but things like that are not easy to find. I tried and couldn't. |
| Comment by Joao Osorio [ 2015-12-03 ] |
|
Hi Elena, I already filed this on MySQL also: Kind regards, |
| Comment by Alice Sherepa [ 2020-01-07 ] |
|
still reproducible with Mysql (8.0.18) |