[MDEV-5740] Assertion `!derived->first_select()->exclude_from_table_unique_test || derived->outer_select()-> exclude_from_table_unique_test' failed on 2nd execution of PS with derived_merge Created: 2014-02-26 Updated: 2014-03-11 Resolved: 2014-03-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.3.12, 5.5.36, 10.0.8 |
| Fix Version/s: | 5.5.37, 10.0.10, 5.3.13 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Description |
|
Stack trace from:
|
| Comments |
| Comment by Oleksandr Byelkin [ 2014-02-27 ] |
|
probably exclude_from_table_unique_test is not reset. |
| Comment by Oleksandr Byelkin [ 2014-02-28 ] |
|
Above is not reset because mysql_derived_fill was never called despite switching to materialized derived. |
| Comment by Oleksandr Byelkin [ 2014-03-03 ] |
|
The problem is that after set_materialized_derived() call the table still merged |
| Comment by Oleksandr Byelkin [ 2014-03-03 ] |
|
set_materialized_derived() run in one execution, then nothing was done to execute, the derived, reinitialization do not call unit->cleanup() so exclude_from_table_unique_test is not reset which was detected by set_merged_derived() on the next execution. Adding unit->cleanup() to mysql_derived_reinit() leads to crash (there is even unit->unclean() call in mysql_derived_reinit()). |
| Comment by Oleksandr Byelkin [ 2014-03-05 ] |
|
Decision to materialize derived appeared when UNION already executed during "fake select" execution. |
| Comment by Oleksandr Byelkin [ 2014-03-06 ] |
|
Sent for review... |