One-time crash in mark_as_null_row with semijoin+materialization

Bug #860561 reported by Philip Stoev
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Incomplete
Undecided
Sergey Petrunia

Bug Description

This crash happened only once and was not repeatable:

# 2011-09-27T03:19:50 #3 <signal handler called>
# 2011-09-27T03:19:50 #4 0x00000000006f7795 in mark_as_null_row (table=0x2aaacc181430)
# 2011-09-27T03:19:50 at mysql_priv.h:2628
# 2011-09-27T03:19:50 #5 0x000000000075577d in return_zero_rows (join=0x2aaacc179220, result=
# 2011-09-27T03:19:50 0x2aaacc1733a8, tables=..., fields=..., send_row=true,
# 2011-09-27T03:19:50 select_options=2147796992,
# 2011-09-27T03:19:50 info=0xd9a960 "Impossible WHERE noticed after reading const tables",
# 2011-09-27T03:19:50 having=0x0) at sql_select.cc:10225
# 2011-09-27T03:19:50 #6 0x00000000007560e0 in JOIN::exec (this=0x2aaacc179220)
# 2011-09-27T03:19:50 at sql_select.cc:2131
# 2011-09-27T03:19:50 #7 0x000000000075228e in mysql_select (thd=0x2aaabd1401d8,
# 2011-09-27T03:19:50 rref_pointer_array=0x2aaabd142db0, tables=0x69771a0, wild_num=0,
# 2011-09-27T03:19:50 fields=..., conds=0x2aaacc1731d0, og_num=0, order=0x0, group=0x0,
# 2011-09-27T03:19:50 having=0x0, proc_param=0x0, select_options=2147796992,
# 2011-09-27T03:19:50 result=0x2aaacc1733a8, unit=0x2aaabd142678, select_lex=0x2aaabd142b60)
# 2011-09-27T03:19:50 at sql_select.cc:2900
# 2011-09-27T03:19:50 #8 0x00000000007586b8 in handle_select (thd=0x2aaabd1401d8,
# 2011-09-27T03:19:50 lex=0x2aaabd1425d8, result=0x2aaacc1733a8, setup_tables_done_option=0)
# 2011-09-27T03:19:50 at sql_select.cc:283
# 2011-09-27T03:19:50 #9 0x00000000006a464a in execute_sqlcom_select (thd=0x2aaabd1401d8,
# 2011-09-27T03:19:50 all_tables=0x69771a0) at sql_parse.cc:5102
# 2011-09-27T03:19:50 #10 0x00000000006a672a in mysql_execute_command (thd=0x2aaabd1401d8)
# 2011-09-27T03:19:50 at sql_parse.cc:2247
# 2011-09-27T03:19:50 #11 0x00000000006af4c3 in mysql_parse (thd=0x2aaabd1401d8,
# 2011-09-27T03:19:50 rawbuf=0x6976430 "SELECT SUM( alias1 . `col_int_key` ) AS field1 FROM ( BB AS alias1 INNER JOIN ( ( BB AS alias2 STRAIGHT_JOIN C AS alias3 ON (alias3 . `pk` = alias2 . `pk` ) ) ) ON (alias3 . `pk` = alias2 . `col_int_key` ) ) WHERE ( ( 7, 8 ) IN ( SELECT SQ1_alias1 . `pk` AS SQ1_field1 , SQ1_alias1 . `pk` AS SQ1_field2 FROM ( C AS SQ1_alias1 LEFT OUTER JOIN B AS SQ1_alias2 ON (SQ1_alias2 . `col_varchar_key` = SQ1_alias1 . `col_varchar_nokey` ) ) HAVING SQ1_alias1 . `pk` = 'v' ) ) AND ( alias1 . `pk` > 71 AND alias1 . `pk` < ( 71 + 59 ) OR alias1 . `pk` NOT IN (120) ) AND ( alias3 . `col_varchar_key` IN ( SELECT 'j' UNION SELECT 'p' ) AND alias1 . `col_int_key` IS NULL ) /* 5 */",
# 2011-09-27T03:19:50 length=688, found_semicolon=0x4f921f08) at sql_parse.cc:6102
# 2011-09-27T03:19:50 #12 0x00000000006b0051 in dispatch_command (command=COM_QUERY,
# 2011-09-27T03:19:50 thd=0x2aaabd1401d8,
# 2011-09-27T03:19:50 packet=0x2aaabd147819 " SELECT SUM( alias1 . `col_int_key` ) AS field1 FROM ( BB AS alias1 INNER JOIN ( ( BB AS alias2 STRAIGHT_JOIN C AS alias3 ON (alias3 . `pk` = alias2 . `pk` ) ) ) ON (alias3 . `pk` = alias2 . `col_int_key` ) ) WHERE ( ( 7, 8 ) IN ( SELECT SQ1_alias1 . `pk` AS SQ1_field1 , SQ1_alias1 . `pk` AS SQ1_field2 FROM ( C AS SQ1_alias1 LEFT OUTER JOIN B AS SQ1_alias2 ON (SQ1_alias2 . `col_varchar_key` = SQ1_alias1 . `col_varchar_nokey` ) ) HAVING SQ1_alias1 . `pk` = 'v' ) ) AND ( alias1 . `pk` > 71 AND alias1 . `pk` < ( 71 + 59 ) OR alias1 . `pk` NOT IN (120) ) AND ( alias3 . `col_varchar_key` IN ( SELECT 'j' UNION SELECT 'p' ) AND alias1 . `col_int_key` IS NULL ) /* 5 */", packet_length=690) at sql_parse.cc:1221
# 2011-09-27T03:19:50 #13 0x00000000006b168f in do_command (thd=0x2aaabd1401d8) at sql_parse.cc:916
# 2011-09-27T03:19:50 #14 0x000000000069be9f in handle_one_connection (arg=0x2aaabd1401d8)
# 2011-09-27T03:19:50 at sql_connect.cc:1187
# 2011-09-27T03:19:50 #15 0x00000033b600673d in start_thread () from /lib64/libpthread.so.0
# 2011-09-27T03:19:50 #16 0x00000033b58d40cd in clone () from /lib64/libc.so.6

crashing query:

 SELECT SUM( alias1 . `col_int_key` ) AS field1 FROM ( BB AS alias1 INNER JOIN ( ( BB AS alias2 STRAIGHT_JOIN C AS alias3 ON (alias3 . `pk` = alias2 . `pk` ) ) ) ON (alias3 . `pk` = alias2 . `col_int_key` ) ) WHERE ( ( 7, 8 ) IN ( SELECT SQ1_alias1 . `pk` AS SQ1_field1 , SQ1_alias1 . `pk` AS SQ1_field2 FROM ( C AS SQ1_alias1 LEFT OUTER JOIN B AS SQ1_alias2 ON (SQ1_alias2 . `col_varchar_key` = SQ1_alias1 . `col_varchar_nokey` ) ) HAVING SQ1_alias1 . `pk` = 'v' ) ) AND ( alias1 . `pk` > 71 AND alias1 . `pk` < ( 71 + 59 ) OR alias1 . `pk` NOT IN (120) ) AND ( alias3 . `col_varchar_key` IN ( SELECT 'j' UNION SELECT 'p' ) AND alias1 . `col_int_key` IS NULL )

RQG commmand line:

perl runall.pl --queries=100000000 --debug --seed=time --mysqld1=--debug-assert-if-crashed-table --mysqld1=--innodb_stats_sample_pages=256 --mysqld1=--max_join_size=1000000 --queries=100M --duration=900 --threads=6 --seed=time --mysqld1=--log-output=file --no-mask --views --reporter=QueryTimeout,Backtrace,ErrorLog,Deadlock --basedir1=/home/philips/bzr/maria-5.3 --mysqld1=--optimizer_switch=semijoin=ON,materialization=ON,firstmatch=OFF,loosescan=OFF --validator=Transformer --transformers=DisableChosenPlan,ConvertLiteralsToSubqueries,ExecuteAsInsertSelect,ExecuteAsSelectItem,ExecuteAsUpdateDelete,ExecuteAsWhereSubquery,InlineSubqueries --grammar=conf/optimizer/optimizer_subquery.yy --seed=1317082782

Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :
Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :
Changed in maria:
milestone: none → 5.3
assignee: nobody → Philip Stoev (pstoev-askmonty)
Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :

See valgrind warnings in 869876

Revision history for this message
Sergey Petrunia (sergefp) wrote :

Changing status to Incomplete

Changed in maria:
status: New → Incomplete
assignee: Philip Stoev (pstoev-askmonty) → Sergey Petrunia (sergefp)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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