[MDEV-2400] LP:860580 - Sporadic crash / valgrind warning in register_field_in_read_map() with semijoin Created: 2011-09-27 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The attached test case produces the following warning. Unfortunately, no simplification is available for sporadically crashing valgrind bugs. If you can convert the warning into a repeatable crash or an assertion, I will be able to provide a simpler test case. ==3574== Thread 4: Optimizer switch for the particular example semijoin=ON,materialization=ON,firstmatch=OFF,loosescan=OFF bzr version-info |
| Comments |
| Comment by Philip Stoev (Inactive) [ 2011-09-27 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Re: Sporadic crash / valgrind warning in register_field_in_read_map() with semijoin | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Philip Stoev (Inactive) [ 2011-09-27 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
unsimplified test case | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2011-10-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Re: Sporadic crash / valgrind warning in register_field_in_read_map() with semijoin SET SESSION optimizer_switch='semijoin=ON,materialization=ON,firstmatch=OFF,loosescan=OFF'; SELECT GROUP BY drop table t1,t2,t3,t4; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2011-10-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Re: Sporadic crash / valgrind warning in register_field_in_read_map() with semijoin
---
--- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2011-10-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Re: Sporadic crash / valgrind warning in register_field_in_read_map() with semijoin == Query == select Things to note:
== Execution ==
= single_row_subselect has a non-mergeable semi-join which is executed = After the subquery has finished executing, the code for materialized table->pos_in_table_list->jtbm_subselect->cleanup(); the stack trace at this point looks as follows: #1 in Item_in_subselect::cleanup = single_row_subselect execution is completed. The code for top-level select
select->cond->walk(&Item::register_field_in_read_map, 1, where where field3 is the single_row_subselect. field3->Item_subselect::walk is called which will at some point invoke Item_field::register_field_in_read_map for the field object that refers to already-freed temporary table. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Launchpad bug id: 860580 |