Crash in Field::eq in maria-5.3 with derived_merge=on

Bug #800518 reported by Philip Stoev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
Critical
Igor Babaev

Bug Description

Not reproducible with rev 3053, so must be a recent regression. Explain also crashes. Not repeatable with derived_merge=off.

backtrace:

#4 <signal handler called>
#5 0x082752a0 in Field::eq (this=0xae62fd70, field=0x0) at field.h:243
#6 0x083e1efc in matching_cond (max_fl=true, ref=0xae89ef34, keyinfo=0xae62fdd8, field_part=0xae62fe18, cond=0xae5148d0, key_part_used=0xae89e2a4,
    range_fl=0xae89ef7c, prefix_len=0xae89ef78) at opt_sum.cc:703
#7 0x083e259d in find_key_for_maxmin (max_fl=true, ref=0xae89ef34, field=0xae62fd70, cond=0xae5148d0, range_fl=0xae89ef7c, prefix_len=0xae89ef78)
    at opt_sum.cc:890
#8 0x083e1498 in opt_sum_query (thd=0x9579680, tables=..., all_fields=..., conds=0xae5148d0) at opt_sum.cc:387
#9 0x0831806d in JOIN::optimize (this=0xae521360) at sql_select.cc:1044
#10 0x0831e133 in mysql_select (thd=0x9579680, rref_pointer_array=0x957b198, tables=0xae513e30, wild_num=0, fields=..., conds=0xae514190, og_num=0,
    order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0xae5142f8, unit=0x957ad9c, select_lex=0x957b078)
    at sql_select.cc:2871
#11 0x08316083 in handle_select (thd=0x9579680, lex=0x957ad40, result=0xae5142f8, setup_tables_done_option=0) at sql_select.cc:283
#12 0x082b17b3 in execute_sqlcom_select (thd=0x9579680, all_tables=0xae513e30) at sql_parse.cc:5082
#13 0x082a85b7 in mysql_execute_command (thd=0x9579680) at sql_parse.cc:2227
#14 0x082b3def in mysql_parse (thd=0x9579680, rawbuf=0xae512eb0 "SELECT MAX( f1 ) FROM ( SELECT * FROM t1 ) AS alias1 WHERE f1 = 100", length=67,
    found_semicolon=0xae8a0228) at sql_parse.cc:6083
#15 0x082a6253 in dispatch_command (command=COM_QUERY, thd=0x9579680,
    packet=0x95d41c9 "SELECT MAX( f1 ) FROM ( SELECT * FROM t1 ) AS alias1 WHERE f1 = 100", packet_length=67) at sql_parse.cc:1206
#16 0x082a56d9 in do_command (thd=0x9579680) at sql_parse.cc:904
#17 0x082a2754 in handle_one_connection (arg=0x9579680) at sql_connect.cc:1177
#18 0x00821919 in start_thread () from /lib/libpthread.so.0
#19 0x0076acce in clone () from /lib/libc.so.6

test case:

CREATE TABLE t1 ( f1 int NOT NULL , PRIMARY KEY (f1) ) ;
INSERT INTO t1 VALUES (1), (2);
SELECT MAX( f1 ) FROM ( SELECT * FROM t1 ) AS alias1 WHERE f1 = 100;

Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :

 bzr version-info
revision-id: <email address hidden>
date: 2011-06-21 18:17:28 -0700
build-date: 2011-06-22 09:50:17 +0300
revno: 3054
branch-nick: maria-5.3

Changed in maria:
milestone: none → 5.3
assignee: nobody → Igor Babaev (igorb-seattle)
Changed in maria:
status: New → Confirmed
importance: Undecided → Critical
Changed in maria:
status: Confirmed → In Progress
Changed in maria:
status: In Progress → Fix Committed
Changed in maria:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.