[MDEV-3810] Item in condition with destroyed virtual table Created: 2012-10-15 Updated: 2012-11-09 Resolved: 2012-11-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.27, 5.3.9 |
| Fix Version/s: | 5.5.28a, 5.3.10 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Oleksandr Byelkin | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
If add to setup_without_group call of condition virtual method it will kill server during virew.test:
The problematic test suite is
|
| Comments |
| Comment by Oleksandr Byelkin [ 2012-10-17 ] |
|
Valgrind complains about it: |
| Comment by Oleksandr Byelkin [ 2012-10-18 ] |
|
It might be problem of certain compiler libraries. It can't be repeated on laptop (same linux distribution). |
| Comment by Oleksandr Byelkin [ 2012-10-24 ] |
|
Here is independent of --debug patch: thd->lex->allow_sum_func&= ~(1 << thd->lex->current_select->nest_level); /* it's not wrong to have non-aggregated columns in a WHERE */ |
| Comment by Oleksandr Byelkin [ 2012-10-24 ] |
|
now it fails on both my computer so there is something wrong. |
| Comment by Oleksandr Byelkin [ 2012-10-24 ] |
|
It looks like memory corruprion, because if the bug repeatable depends on vuild, it repeatable oin debug build, but do not repetable on valgrind build. |
| Comment by Oleksandr Byelkin [ 2012-10-26 ] |
|
Memory on which *conds points was allocated in previous statement execution call of reinit_stmt_before_use. |
| Comment by Oleksandr Byelkin [ 2012-10-26 ] |
|
the problem is that on second execution SELECT_LEX::first_execution is not set to TRUE. |
| Comment by Oleksandr Byelkin [ 2012-10-26 ] |
|
SELECT_LEX::first_execution is correct. |
| Comment by Oleksandr Byelkin [ 2012-10-26 ] |
|
Real problem is that every reinit_stmt_before_use should copy WHERE, but on second execution lex->all_select_list changed by mysql_derived_merge (of first execution), so second reinit_stmt_before_use reinit only one SELECT when then used non reinited one. |
| Comment by Oleksandr Byelkin [ 2012-10-26 ] |
|
mysql_derived_prepare() prepare finds removed SELECT_LEX via derived table reference. |
| Comment by Oleksandr Byelkin [ 2012-10-31 ] |
|
fix commited, all tests passed. |
| Comment by Timour Katchaounov (Inactive) [ 2012-11-09 ] |
|
Sanja confirmed that the patch was reviewed by Igor. |