[MDEV-6745] Wrong result (NULLs instead of real values) with TEMPTABLE view, LEFT JOIN Created: 2014-09-16 Updated: 2016-02-05 Resolved: 2016-02-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 5.5, 10.0 |
| Fix Version/s: | 5.5.41 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Oleksandr Byelkin |
| Resolution: | Cannot Reproduce | Votes: | 1 |
| Labels: | optimizer, regression | ||
| Issue Links: |
|
||||||||
| Sprint: | 5.5.48-0 | ||||||||
| Description |
|
The problem appeared in 5.3 tree with the following revision:
Test case:
Expected result:
Actual result:
|
| Comments |
| Comment by Oleksandr Byelkin [ 2014-09-17 ] | ||||||||||||||||||
|
The same problem exists for derived tables (AKA subquery in the FROM clause): | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2014-09-19 ] | ||||||||||||||||||
|
The problem connected with varchar length (997 works, 998 and above does not). So it should be something with temporary table limitations. | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2014-09-19 ] | ||||||||||||||||||
|
The limit is field related (adding new fields do not lead to wrong result). | ||||||||||||||||||
| Comment by Patryk Pomykalski [ 2014-09-19 ] | ||||||||||||||||||
|
1000 byte index size limit? | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2014-09-19 ] | ||||||||||||||||||
|
No, it uses HASH index which takes 8 bytes. | ||||||||||||||||||
| Comment by Patryk Pomykalski [ 2014-09-19 ] | ||||||||||||||||||
|
good: bad: | ||||||||||||||||||
| Comment by Patryk Pomykalski [ 2014-09-20 ] | ||||||||||||||||||
|
A fix maybe?
| ||||||||||||||||||
| Comment by Patryk Pomykalski [ 2014-09-20 ] | ||||||||||||||||||
|
It's still possible to get "Internal error: 'Using too big key for internal temp tables'" with the following test case:
Due to differences in: | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2014-09-21 ] | ||||||||||||||||||
|
Thank you! I'll dig here. (I compared explain and debug output before and it looked the same and I have not noted this debug output difference) | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2014-09-30 ] | ||||||||||||||||||
|
It looks like problem is here. It should exclude allkeys, but exclude none. | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2014-10-03 ] | ||||||||||||||||||
|
The second test suite is a different bug you can report it separately or I will. | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2014-10-03 ] | ||||||||||||||||||
|
Sent for review. | ||||||||||||||||||
| Comment by Daniel Black [ 2015-03-17 ] | ||||||||||||||||||
|
http://lists.askmonty.org/pipermail/commits/2014-October/006694.html looks like this hasn't been committed yet (not in 5.5 or 10.0 trunk/10.0 branch) | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2015-03-22 ] | ||||||||||||||||||
|
yes | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2016-02-04 ] | ||||||||||||||||||
|
it was fixed between 5.5.40 and 5.5.41 | ||||||||||||||||||
| Comment by Elena Stepanova [ 2016-02-05 ] | ||||||||||||||||||
|
The problem disappeared from 5.5 tree after 5.3=>5.5 merge, particularly this change:
Whether it really fixed this bug or just hid it is another question, I don't know that. | ||||||||||||||||||
| Comment by Sergei Golubchik [ 2016-02-05 ] | ||||||||||||||||||
|
sanja, please close this bug if it's really fixed or reassign back to me if there's something to review. | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2016-02-05 ] | ||||||||||||||||||
|
It was fixed by the Petrunia commit. |