[MDEV-20681] Aria temptable used for grouping may have key longer than maria_max_key_length() Created: 2019-09-26 Updated: 2021-02-17 Resolved: 2021-02-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Aria |
| Affects Version/s: | 10.3, 10.4 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Consider this testcase:
Put a breakpoint in create_internal_tmp_table_from_heap, then run
when the Aria table is created, one can see:
So, key_length larger than maria_max_key_length(). I didn't see this produce any problem, except that it might be confusing for |
| Comments |
| Comment by Michael Widenius [ 2021-02-14 ] |
|
This is because if a key for an internal temporary is longer than maria_max_key_length, it changes the key to an internal unique key, which can have any size. This is why we can DISTINCT and GROUP BY over anything without any size limitations. |
| Comment by Michael Widenius [ 2021-02-14 ] |
|
See comment |
| Comment by Sergei Golubchik [ 2021-02-17 ] |
|
SJ-Materialization, as an internal optimization, perhaps could be able to use that too |