Crash in decimal2double with subquery cache
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
High
|
Oleksandr "Sanja" Byelkin |
Bug Description
Subuery cache crashed with the following backtrace:
# 2010-08-09T16:05:07 #3 0x0827e94a in handle_segfault (sig=11) at mysqld.cc:2703
# 2010-08-09T16:05:07 #4 <signal handler called>
# 2010-08-09T16:05:07 #5 0x0877a140 in decimal2double (from=0xaed867b0, to=0x9a1dc4d8) at decimal.c:961
# 2010-08-09T16:05:07 #6 0x081cdeac in my_decimal2double (mask=30, d=0xaed867b0, result=0x9a1dc4d8) at my_decimal.h:314
# 2010-08-09T16:05:07 #7 0x081cb865 in Item_cache_
# 2010-08-09T16:05:07 #8 0x081c8942 in Item_cache_
# 2010-08-09T16:05:07 #9 0x081cf2de in Item::val_result (this=0xaec17510) at item.h:778
# 2010-08-09T16:05:07 #10 0x081c7a15 in Item_ref::val_real (this=0xaecb9778) at item.cc:6438
# 2010-08-09T16:05:07 #11 0x081f94f0 in Arg_comparator:
# 2010-08-09T16:05:07 #12 0x081dedc2 in Arg_comparator:
# 2010-08-09T16:05:07 #13 0x081fb16d in Item_func_
# 2010-08-09T16:05:07 #14 0x081c4e7f in Item::save_in_field (this=0xaecb9888, field=0x9a051df8, no_conversions=
# 2010-08-09T16:05:07 #15 0x081d0c55 in Item_result_
# 2010-08-09T16:05:07 #16 0x08328064 in copy_funcs (func_ptr=
# 2010-08-09T16:05:07 #17 0x0831ff21 in end_write (join=0x9a06f840, join_tab=
# 2010-08-09T16:05:07 #18 0x0831d962 in evaluate_
# 2010-08-09T16:05:07 #19 0x0831d309 in sub_select (join=0x9a06f840, join_tab=
# 2010-08-09T16:05:07 #20 0x0831d962 in evaluate_
# 2010-08-09T16:05:07 #21 0x0831d457 in sub_select (join=0x9a06f840, join_tab=
# 2010-08-09T16:05:07 #22 0x0831d962 in evaluate_
# 2010-08-09T16:05:07 #23 0x0831d309 in sub_select (join=0x9a06f840, join_tab=
# 2010-08-09T16:05:07 #24 0x0831c70f in do_select (join=0x9a06f840, fields=0x0, table=0xaecf4e00, procedure=0x0) at sql_select.cc:12633
# 2010-08-09T16:05:07 #25 0x08300e09 in JOIN::exec (this=0x9a06f840) at sql_select.cc:1933
# 2010-08-09T16:05:07 #26 0x08303209 in mysql_select (thd=0x9f715f0, rref_pointer_
# 2010-08-09T16:05:07 order=0xaedd0f50, group=0xaedd98b8, having=0xaedd0d50, proc_param=0x0, select_
# 2010-08-09T16:05:07 select_
# 2010-08-09T16:05:07 #27 0x084462d5 in mysql_derived_
# 2010-08-09T16:05:07 #28 0x08445bc7 in mysql_handle_
# 2010-08-09T16:05:07 #29 0x082e4201 in open_and_
# 2010-08-09T16:05:07 #30 0x082a0865 in open_and_
# 2010-08-09T16:05:07 #31 0x0829a01d in execute_
# 2010-08-09T16:05:07 #32 0x08290c1c in mysql_execute_
# 2010-08-09T16:05:07 #33 0x0829c405 in mysql_parse (thd=0x9f715f0,
# 2010-08-09T16:05:07 inBuf=0xaedad570 "SELECT * FROM ( SELECT table1 . `col_varchar_key` AS field1 , SUM( DISTINCT table2 . `pk` ) AS field2 , ( SELECT SUM( SUBQUERY1_t1 . `pk` ) AS SUBQUERY1_field1 FROM ( C AS SUBQUERY1_t1 STRAIGHT_JOIN ( D AS SUBQUERY1_t2 STRAIGHT_JOIN view_B AS SUBQUERY1_t3 ON (SUBQUERY1_t3 . `col_varchar_key` = SUBQUERY1_t2 . `col_varchar_key` ) ) ON (SUBQUERY1_t3 . `col_int_nokey` = SUBQUERY1_t2 . `col_int_key` ) ) WHERE SUBQUERY1_t2 . `col_varchar_key` <= table1 . `col_varchar_key` ) AS field3 , SUM( table1 . `col_varchar_key` ) AS field4 , table2 . `col_time_key` AS field5 , SUM( table1 . `col_varchar_key` ) AS field6 , ( SELECT COUNT( SUBQUERY2_t1 . `pk` ) AS SUBQUERY2_field1 FROM ( C AS SUBQUERY2_t1 STRAIGHT_JOIN CC AS SUBQUERY2_t2 ON (SUBQUERY2_t2 . `col_varchar_nokey` = SUBQUERY2_t1 . `col_varchar_key` ) ) WHERE SUBQUERY2_t2 . `col_int_key` = table1 . `col_int_nokey` AND SUBQUERY2_t1 . `pk` > table1 . `col_int_key` ) AS field7 FROM ( CC AS table1 LEFT JOIN ( ( D AS table2 STRAIGHT_JOIN C AS table3 ON (table3 . `pk` = table2 . `col_int_key` ) ) ) ON (table3 . `col_varchar_key` = table2 . `col_varchar_key` ) ) WHERE ( table3 . `pk` <= ALL ( SELECT 5 FROM DUAL ) ) OR ( table1 . `col_int_key` = 7 AND table1 . `pk` = 58 ) OR ( table1 . `col_varchar_nokey` IS NOT NULL OR table3 . `col_varchar_key` != table3 . `col_varchar_nokey` ) GROUP BY field1, field3, field5, field7 HAVING (field3 <= 'h' AND field2 != 4) ORDER BY table1 . `col_date_key` ASC , field1, field2, field3, field4, field5, field6, field7 ) AS FROM_SUBQUERY /* TRANSFORM_
# 2010-08-09T16:05:07 #34 0x0828e6d2 in dispatch_command (command=COM_QUERY, thd=0x9f715f0,
# 2010-08-09T16:05:07 packet=0x9fa7d61 " SELECT * FROM ( SELECT table1 . `col_varchar_key` AS field1 , SUM( DISTINCT table2 . `pk` ) AS field2 , ( SELECT SUM( SUBQUERY1_t1 . `pk` ) AS SUBQUERY1_field1 FROM ( C AS SUBQUERY1_t1 STRAIGHT_JOIN ( D AS SUBQUERY1_t2 STRAIGHT_JOIN view_B AS SUBQUERY1_t3 ON (SUBQUERY1_t3 . `col_varchar_key` = SUBQUERY1_t2 . `col_varchar_key` ) ) ON (SUBQUERY1_t3 . `col_int_nokey` = SUBQUERY1_t2 . `col_int_key` ) ) WHERE SUBQUERY1_t2 . `col_varchar_key` <= table1 . `col_varchar_key` ) AS field3 , SUM( table1 . `col_varchar_key` ) AS field4 , table2 . `col_time_key` AS field5 , SUM( table1 . `col_varchar_key` ) AS field6 , ( SELECT COUNT( SUBQUERY2_t1 . `pk` ) AS SUBQUERY2_field1 FROM ( C AS SUBQUERY2_t1 STRAIGHT_JOIN CC AS SUBQUERY2_t2 ON (SUBQUERY2_t2 . `col_varchar_nokey` = SUBQUERY2_t1 . `col_varchar_key` ) ) WHERE SUBQUERY2_t2 . `col_int_key` = table1 . `col_int_nokey` AND SUBQUERY2_t1 . `pk` > table1 . `col_int_key` ) AS field7 FROM ( CC AS table1 LEFT JOIN ( ( D AS table2 STRAIGHT_JOIN C AS table3 ON (table3 . `pk` = table2 . `col_int_key` ) ) ) ON (table3 . `col_varchar_key` = table2 . `col_varchar_key` ) ) WHERE ( table3 . `pk` <= ALL ( SELECT 5 FROM DUAL ) ) OR ( table1 . `col_int_key` = 7 AND table1 . `pk` = 58 ) OR ( table1 . `col_varchar_nokey` IS NOT NULL OR table3 . `col_varchar_key` != table3 . `col_varchar_nokey` ) GROUP BY field1, field3, field5, field7 HAVING (field3 <= 'h' AND field2 != 4) ORDER BY table1 . `col_date_key` ASC , field1, field2, field3, field4, field5, field6, field7 ) AS FROM_SUBQUERY /* TRANSFORM_
# 2010-08-09T16:05:07 #35 0x0828dbc0 in do_command (thd=0x9f715f0) at sql_parse.cc:890
# 2010-08-09T16:05:07 #36 0x0828ad58 in handle_
# 2010-08-09T16:05:07 #37 0x00a08919 in start_thread () from /lib/libpthread
# 2010-08-09T16:05:07 #38 0x00951e5e in clone () from /lib/libc.so.6
bzr version-info:
revision-id: <email address hidden>
date: 2010-08-09 13:00:58 +0300
build-date: 2010-08-09 16:55:50 +0300
revno: 2810
branch-nick: maria-5.3
a test case will be available shortly
Changed in maria: | |
milestone: | none → 5.3 |
importance: | Undecided → High |
Changed in maria: | |
status: | New → In Progress |
Changed in maria: | |
status: | In Progress → Fix Committed |
Changed in maria: | |
status: | Fix Committed → Fix Released |
This bug is sporadic , but does happen after a hundred thousand queries have been run.