[MDEV-19352] Server crash in alloc_histograms_for_table_share upon query from information schema Created: 2019-04-28 Updated: 2019-05-08 Resolved: 2019-05-01 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.1, 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.2.24, 10.1.41, 10.3.15, 10.4.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Varun Gupta (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
All of debug, ASAN and non-debug builds are affected. The problem appeared in 10.4 after this merge:
Note: Even though the problem appeared after the merge above, I can't reproduce it on 10.3 even with all 10.4-specific optimizer options I can think of:
|
| Comments |
| Comment by Varun Gupta (Inactive) [ 2019-04-29 ] | ||||||||||||||||||||||||||||||||||||||||
|
After Igor's fix for This case should be reproducible on all versions starting from 10.1 . Looks like this would also solve the issue of | ||||||||||||||||||||||||||||||||||||||||
| Comment by Varun Gupta (Inactive) [ 2019-04-29 ] | ||||||||||||||||||||||||||||||||||||||||
|
A small patch needs to be applied, we need to set the correct sql_command, aligning this with higher versions, sort of a side effect of
For all versions the test case that fails after applying the above patch (needed for 10.1 and 10.2)
What we needed for in the test case was that for one table we have allocated statistics (that is table t1 in this case, with insert we allocate statistics to the TABLE_SHARE object) For table t2 we don't allocate statistics, as no statement(no insert) that calls alloc_statistics_for_table_share() | ||||||||||||||||||||||||||||||||||||||||
| Comment by Varun Gupta (Inactive) [ 2019-04-29 ] | ||||||||||||||||||||||||||||||||||||||||
|
Patch | ||||||||||||||||||||||||||||||||||||||||
| Comment by Varun Gupta (Inactive) [ 2019-04-30 ] | ||||||||||||||||||||||||||||||||||||||||
|
Updated Patch as @igor requested http://lists.askmonty.org/pipermail/commits/2019-April/013715.html | ||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2019-05-01 ] | ||||||||||||||||||||||||||||||||||||||||
|
Ok to push into 10.1 |