[MDEV-3414] LP:849717 - Crash in Item_func::fix_fields on second execution of a prepared statement with semijoin Created: 2011-09-14 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 | ||
| Reporter: | Philip Stoev (Inactive) | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The following query: SELECT * crashes as follows when executed twice as a prepared statement with semijoin: #4 <signal handler called> minimal optimizer switch: semijoin=on; full optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_ sort_intersection=off,index_condition_pushdown=on,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,m aterialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache= off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimi ze_join_buffer_size=off,table_elimination=on explain: id select_type table type possible_keys key key_len ref rows Extra revision-id: <email address hidden> test case: SET SESSION optimizer_switch = 'semijoin=on'; CREATE TABLE t1 (a int); PREPARE st1 FROM " |
| Comments |
| Comment by Sergei Petrunia [ 2011-09-14 ] |
|
Re: Crash in Item_func::fix_fields on second execution of a prepared statement with semijoin #0 Item_in_subselect::create_row_in_to_exists_cond (... We execute this code: new Item_func_eq(new and during fist execution while during the second: (gdb) p *((*optimizer->get_cache())->addr |
| Comment by Sergei Petrunia [ 2011-09-14 ] |
|
Re: Crash in Item_func::fix_fields on second execution of a prepared statement with semijoin |
| Comment by Sergei Petrunia [ 2011-09-14 ] |
|
Re: Crash in Item_func::fix_fields on second execution of a prepared statement with semijoin
apparently, there is something wrong that happens on this execution path. |
| Comment by Philip Stoev (Inactive) [ 2011-09-15 ] |
|
Re: Crash in Item_func::fix_fields on second execution of a prepared statement with semijoin mysqld: item_subselect.cc:1394: virtual longlong Item_in_subselect::val_int(): Assertion `0' failed.
test case: CREATE TABLE t1 ( a int(11) , b int(11) , c int(11) , d varchar(1) ) ; CREATE TABLE t2 ( a int(11) , b int(11) , c int(11) , d varchar(1) ) ; SET SESSION optimizer_switch='semijoin=ON'; PREPARE st1 FROM "SELECT SQ1_alias1.d |
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] |
|
Launchpad bug id: 849717 |