[MDEV-5721] Using too big key for internal temp tables MariaDB 5.5.35 Created: 2014-02-24 Updated: 2014-10-11 Resolved: 2014-08-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 5.3.12, 5.5.35, 5.5.36, 10.0.8 |
| Fix Version/s: | 5.5.40, 10.0.14, 5.3.13 |
| Type: | Bug | Priority: | Major |
| Reporter: | Meik Suchlich | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
debian 7 wheezy mysql_multi environment |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
We got this error: Using too big key for internal temp tables it seems that the bug described in https://bugs.launchpad.net/maria/+bug/957409 is not fixed for all cases. the testcase described there works. The statement is a complex statement on innodb-tables with inner selects and substring_index-fkt and group by/order by having count. belonging to three tables. |
| Comments |
| Comment by Elena Stepanova [ 2014-02-24 ] | |||||||||||||||||||||||||||||||||
|
Hi, A complete test case would be perfect, but meanwhile, could you please provide
Thanks. | |||||||||||||||||||||||||||||||||
| Comment by Meik Suchlich [ 2014-02-25 ] | |||||||||||||||||||||||||||||||||
|
i'll do an upload for config | |||||||||||||||||||||||||||||||||
| Comment by Meik Suchlich [ 2014-02-25 ] | |||||||||||||||||||||||||||||||||
|
Example-Data for the test-tables to recreate the error. | |||||||||||||||||||||||||||||||||
| Comment by Meik Suchlich [ 2014-02-25 ] | |||||||||||||||||||||||||||||||||
|
Here are the comments as file: config and tables. | |||||||||||||||||||||||||||||||||
| Comment by Meik Suchlich [ 2014-02-25 ] | |||||||||||||||||||||||||||||||||
|
new testdata reduced on the only necessary information | |||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-02-27 ] | |||||||||||||||||||||||||||||||||
|
Thanks for the reproducible test case. The reported test case is attached as mdev5721.test. It is the exact same data and query, just all together in one file in the proper order. I have also reduced and somewhat modified it a little more, below is what's left. It might be a bit more convenient for initial debugging, but it's absolutely necessary to also check the initial test case after the fix, because it the one below uses MyISAM, while the initial one InnoDB, and there might be some other important differences.
| |||||||||||||||||||||||||||||||||
| Comment by Christian Quast [ 2014-06-06 ] | |||||||||||||||||||||||||||||||||
|
Hi... I also encounter this problem and disabling derived keys works for me as well. My test case is similar to that of the OP as I am also using sub selects and 'group by' statements. Interestingly the size of the tables matters. Having a few more entries in tables 'b' (+1) and 'c' (+2) triggers the error. Table 'a' is not used in the select and I haven't tested if this table is strictly necessary to reproduce the error. I also created a reproducible test case. Which I will attach to this bug report as well. | |||||||||||||||||||||||||||||||||
| Comment by Christian Quast [ 2014-06-06 ] | |||||||||||||||||||||||||||||||||
|
ups... forgot to mention the rows that reference the additional entry 'pa = AB098503' in table 'b' that is only present in the broken example is excluded by the 'rt is NULL' part when joining table 'b'. Also, decreasing the width of the varchar fields a, i, t that are used in the group by statement to a combined width of less then 700 characters solves the problem without the need to disable derived keys. | |||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2014-08-05 ] | |||||||||||||||||||||||||||||||||
|
The fix for this bug was pushed into the 5.3 tree (rev 3793). |