[MDEV-14862] Server crashes in Bitmap<64u>::merge / add_key_field Created: 2018-01-03 Updated: 2020-05-11 Resolved: 2018-02-01 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer, Views |
| Affects Version/s: | 10.0, 10.1, 10.2 |
| Fix Version/s: | 10.0.35, 10.1.31, 10.2.13, 10.3.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream-fixed | ||
| Issue Links: |
|
||||||||
| Sprint: | 10.0.34 | ||||||||
| Description |
|
Reproducible with MariaDB 10.x; not reproducible with MariaDB 5.5, MySQL 5.6. Note: I think it can be the same problem as was filed quite long ago for MySQL as https://bugs.mysql.com/bug.php?id=73556 (private report, but its header was "fatal_signal in add_key_equal_fields() with UPDATE VIEW using outer subquery", and apparently its internal clone was #19434916. If it's indeed the same, there is a fix for it in MySQL 5.6 tree:
However, it's just my guess, I didn't check whether MySQL 5.6 fails with the provided test case before the fix, and whether it's the patch above that fixes it. |
| Comments |
| Comment by Oleksandr Byelkin [ 2018-01-23 ] |
|
somehow it stuck in the code which create possible indexes... why it went there is not clear (I do not see possible temporary tables here). And it try to process field a of table t1. |
| Comment by Oleksandr Byelkin [ 2018-01-23 ] |
|
Problem is probably in "merge for insert"... |
| Comment by Oleksandr Byelkin [ 2018-01-23 ] |
|
The problem appeared during optimization the subquery, so the question is why it try to find key of a.t1 i.e. outer field. |
| Comment by Oleksandr Byelkin [ 2018-01-23 ] |
|
So the MySQL bug and this one is the same and it looks like analysis in the bug is right. Fix of the bug solves the problem. |
| Comment by Oleksandr Byelkin [ 2018-01-23 ] |
|
revision-id: 6f78e6f98e470c874f691e130a5d74968af06063 (mariadb-10.0.33-50-g6f78e6f98e4)
It is backport of MySQL fix: Bug #19434916: FATAL_SIGNAL IN ADD_KEY_EQUAL_FIELDS() WITH Issue: While resolving a column which refers to a table/view in an This creates a problem with the IN-TO-EXISTS optmization. SOLUTION: The testcase and comments added as part of the fix for — |
| Comment by Oleksandr Byelkin [ 2018-01-23 ] |
|
github: bb-10.0- |
| Comment by Igor Babaev [ 2018-01-28 ] |
|
Sent my analysis to Sanja: In the function Item_in_subselect::create_single_in_to_exists_cond() at the line we have gdb) p (Item*) select_lex->item_list.head()->used_tables() (gdb) p (Item*) select_lex->item_list.head() This is the cause of the problem: we have to build the expressions with |
| Comment by Oleksandr Byelkin [ 2018-01-29 ] |
|
revision-id: d337368470eb935ed69ecc441626e021b70aba0d (mariadb-10.0.33-69-gd337368470e)
Do not unwrapp view references to keep table info. — |