[MDEV-2836] LP:784441 - Assertion `fixed == 0' failed in Item_func::fix_fields in maria-5.3-mwl106 Created: 2011-05-18  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: Philip Stoev (Inactive) Assignee: Igor Babaev
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug784441.xml    

 Description   

Not repeatable in maria-5.3. EXPLAIN also crashes. Assertion:

mysqld: item_func.cc:153: virtual bool Item_func::fix_fields(THD*, Item**): Assertion `fixed == 0' failed.

backtrace:

#8 0x00399d98 in __assert_fail () from /lib/libc.so.6
#9 0x081edfd4 in Item_func::fix_fields (this=0xae52ce28, thd=0x95f1e30, ref=0xae513908) at item_func.cc:153
#10 0x083cdfb9 in convert_subq_to_sj (parent_join=0xae52e4b0, subq_pred=0xae513700) at opt_subselect.cc:979
#11 0x083cd1ad in convert_join_subqueries_to_semijoins (join=0xae52e4b0) at opt_subselect.cc:568
#12 0x0830f5da in JOIN::optimize (this=0xae52e4b0) at sql_select.cc:832
#13 0x08315bb9 in mysql_select (thd=0x95f1e30, rref_pointer_array=0x95f3924, tables=0xae512798, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0,
group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0xae513dd8, unit=0x95f3534, select_lex=0x95f3808) at sql_select.cc:2793
#14 0x0830deef in handle_select (thd=0x95f1e30, lex=0x95f34d8, result=0xae513dd8, setup_tables_done_option=0) at sql_select.cc:282
#15 0x082aa282 in execute_sqlcom_select (thd=0x95f1e30, all_tables=0xae512798) at sql_parse.cc:5101
#16 0x082a102a in mysql_execute_command (thd=0x95f1e30) at sql_parse.cc:2239
#17 0x082ac8ba in mysql_parse (thd=0x95f1e30, rawbuf=0xae5125e0 "SELECT *\nFROM t1\nINNER JOIN t2\nON t2.f1 != 0\nAND t2.f1 IN ( SELECT * FROM v1 )",
length=78, found_semicolon=0xae8a0228) at sql_parse.cc:6103
#18 0x0829ec97 in dispatch_command (command=COM_QUERY, thd=0x95f1e30,
packet=0x964ca21 "SELECT *\nFROM t1\nINNER JOIN t2\nON t2.f1 != 0\nAND t2.f1 IN ( SELECT * FROM v1 )", packet_length=78) at sql_parse.cc:1215
#19 0x0829e0f5 in do_command (thd=0x95f1e30) at sql_parse.cc:904
#20 0x0829b1a8 in handle_one_connection (arg=0x95f1e30) at sql_connect.cc:1154
#21 0x00821919 in start_thread () from /lib/libpthread.so.0
#22 0x00453cce in clone () from /lib/libc.so.6

test case:

CREATE TABLE t1 ( f1 int ) ;
INSERT INTO t1 VALUES (1), (1);

CREATE TABLE t2 ( f1 int ) ;
INSERT INTO t2 VALUES (1), (1);

CREATE VIEW v1 AS SELECT 7;

SELECT *
FROM t1
INNER JOIN t2
ON t2.f1 != 0
AND t2.f1 IN ( SELECT * FROM v1 );

bzr version-info
revision-id: <email address hidden>
date: 2011-05-16 22:39:43 -0700
build-date: 2011-05-18 10:25:02 +0300
revno: 2982
branch-nick: maria-5.3-mwl106



 Comments   
Comment by Philip Stoev (Inactive) [ 2011-06-06 ]

Re: Assertion `fixed == 0' failed in Item_func::fix_fields in maria-5.3-mwl106
Still repeatable with

bzr version-info
revision-id: philips@eve-20110601094248-uo9la7qx3h5xcf56
date: 2011-06-01 12:42:48 +0300
build-date: 2011-06-06 12:53:36 +0300
revno: 811
branch-nick: randgen-views-testing

Comment by Igor Babaev [ 2011-06-06 ]

Re: Assertion `fixed == 0' failed in Item_func::fix_fields in maria-5.3-mwl106
This bug is reproducible on the current 5.3 tree.

The bug is in the code for the semi-join transformations.

I'll fix the bug in the 5.3 tree.

Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ]

Launchpad bug id: 784441

Generated at Thu Feb 08 06:44:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.