[MDEV-8632] Segmentation fault on INSERT Created: 2015-08-17 Updated: 2015-11-09 Resolved: 2015-11-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Affects Version/s: | 5.3.12, 5.5.45, 10.0.21, 10.1.6 |
| Fix Version/s: | 5.5.47, 10.0.23, 10.1.9 |
| Type: | Bug | Priority: | Major |
| Reporter: | Konstantin | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Debian 7.8 (kernel=3.2.0-4-amd64), 16GB RAM |
||
| Attachments: |
|
| Sprint: | 10.1.9-2 |
| Description |
|
I have got a segmentation fault error with query.
Table _tmp has a structure:
But if simplify query the error will go away. The error is repeatable on MariaDB 5.5.45, 10.0.21, 10.1.6. Error log shows:
------------------------------------------ Binary log mariadb-bin.000001 is in the private uploads. |
| Comments |
| Comment by Elena Stepanova [ 2015-08-18 ] | |||||||||||||||||
|
Thanks for the report and the test case.
| |||||||||||||||||
| Comment by Oleksandr Byelkin [ 2015-11-06 ] | |||||||||||||||||
|
Problem is memory overrun. ref_pointer_array_size is 50 but all_fields has 51 element. | |||||||||||||||||
| Comment by Oleksandr Byelkin [ 2015-11-06 ] | |||||||||||||||||
|
Problem made by Item_field::update_value_transformer which leads to huge Item_ref chain... | |||||||||||||||||
| Comment by Oleksandr Byelkin [ 2015-11-06 ] | |||||||||||||||||
|
every transformation of field d generate longer and longer chain of fields r | |||||||||||||||||
| Comment by Oleksandr Byelkin [ 2015-11-06 ] | |||||||||||||||||
|
revision-id: 22150288580624fd22407897faaf0b93c71a22b6 (mariadb-5.5.46-3-g2215028) DEV-8632 Segmentation fault on INSERT View/derived fields should be taken into account when we build ref_pointer_array constructed. DBUG_ASSERTs added to avoid memory overrun. — | |||||||||||||||||
| Comment by Sergey Vojtovich [ 2015-11-09 ] | |||||||||||||||||
|
Looks good. |