[MDEV-3021] LP:952372 - Server crashes on 2nd execution of PS in find_field_in_tables with semijoin+materialization, DISTINCT, view, aggregate function in IN subquery Created: 2012-03-11 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: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
See also https://bugs.launchpad.net/maria/+bug/952297, they might be related, both came from the same original query. #4 <signal handler called> bzr version-info Also reproducible on MariaDB 5.5 (revno 3316). EXPLAIN: id select_type table type possible_keys key key_len ref rows filtered Extra Minimal optimizer_switch: materialization=on,semijoin=on Test case: SET optimizer_switch = 'materialization=on,semijoin=on'; CREATE TABLE t1 ( a INT ); CREATE TABLE t2 ( b VARCHAR(1) ); PREPARE pstmt FROM EXECUTE pstmt; |
| Comments |
| Comment by Sergei Petrunia [ 2012-03-12 ] |
|
Re: Server crashes on 2nd execution of PS in find_field_in_tables with semijoin+materialization, DISTINCT, view, aggregate function in IN subquery |
| Comment by Sergei Petrunia [ 2012-03-12 ] |
|
Re: Server crashes on 2nd execution of PS in find_field_in_tables with semijoin+materialization, DISTINCT, view, aggregate function in IN subquery This bug is a manifestation of a different problem than #952297. |
| Comment by Sergei Petrunia [ 2012-03-12 ] |
|
Re: Server crashes on 2nd execution of PS in find_field_in_tables with semijoin+materialization, DISTINCT, view, aggregate function in IN subquery we're running that fix_fields(), because we're inside this code in if (table_list->jtbm_subselect) (gdb) p table_list->alias It seems wrong that we have reached the SJM nest while running setup_tables() |
| Comment by Sergei Petrunia [ 2012-03-18 ] |
|
Re: Server crashes on 2nd execution of PS in find_field_in_tables with semijoin+materialization, DISTINCT, view, aggregate function in IN subquery v1 – t2a - sjm(t2b) t1 When the subquery is converted to JTBM nest in convert_subq_to_jtbm():
(t1)->next_local= NULL then we run this code: /* which does: and this is the reason why a subsequent call of setup_tables() for the contents |
| Comment by Sergei Petrunia [ 2012-03-18 ] |
|
Re: Server crashes on 2nd execution of PS in find_field_in_tables with semijoin+materialization, DISTINCT, view, aggregate function in IN subquery for (tl= parent_lex->leaf_tables.head(); tl->next_local; tl= tl->next_local) in convert_subq_to_jtbm() does the wrong thing. I am not currently sure what that should be replaced with. |
| Comment by Sergei Petrunia [ 2012-03-18 ] |
|
Re: Server crashes on 2nd execution of PS in find_field_in_tables with semijoin+materialization, DISTINCT, view, aggregate function in IN subquery |
| Comment by Rasmus Johansson (Inactive) [ 2012-04-03 ] |
|
Launchpad bug id: 952372 |