[MDEV-12547] InnoDB FULLTEXT index has too strict innodb_ft_result_cache_limit max limit Created: 2017-04-21 Updated: 2020-08-25 Resolved: 2018-10-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Full-text Search, Optimizer, Storage Engine - InnoDB |
| Affects Version/s: | 10.0.30, 10.1.23 |
| Fix Version/s: | 10.0.37, 10.1.37, 10.2.19 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Valerii Kravchuk | Assignee: | Thirunarayanan Balathandayuthapani |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream | ||
| Issue Links: |
|
||||||||||||
| Description |
|
This is a variation of upstream https://bugs.mysql.com/bug.php?id=86036 on MariaDB 10.x.y. The maximum value of innodb_ft_result_cache_limit for all platform types and bit sizes is 2**32-1. This limit applies to all recent versions (inclusing upstream MySQL 5.6.x and MariaDB 10.x.y as well). This is a problem because it seems internally this limit is checked even for the queries that should not need that much memory. Consider the following test case:
Moreover, we get the same error even if we select juts id column (primary key). The result though is only 5 rows:
In practice it means that if we need just few rows out of many that matches from the big enough table (>4G in total size), FULLTEXT InnoDB index is of limited use. We should either increase the limit, or do some change in optimizer so that LIMIT N clause and columns in SELECT list are taken into account. |
| Comments |
| Comment by Marko Mäkelä [ 2017-12-12 ] |
|
valerii, in MySQL 5.7 the LIMIT is being pushed down to the InnoDB fulltext search engine: If we implement LIMIT pushdown to the InnoDB fulltext search engine, we have to be very careful. The implementation in MySQL 5.7 looks error-prone. |
| Comment by Marko Mäkelä [ 2018-01-18 ] |
|
We can do a few things in MariaDB without risking breaking correctness, roughly in increasing order of difficulty:
|
| Comment by Thirunarayanan Balathandayuthapani [ 2018-10-19 ] |
|
Pushed the fix that makes innodb_ft_result_cache_limit 64 bits on 64-bit platforms. |