Assertion `table_ref->has_record' failed in maria-5.3-mwl128 with join_cache_level=4, join_buffer_size=1

Bug #668237 reported by Philip Stoev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Invalid
Undecided
Igor Babaev

Bug Description

Even after the fix for 665057 sql_select.cc:13863: int join_read_key2(THD*, JOIN_TAB*, TABLE*, TABLE_REF*): Assertion `table_ref->has_record' failed in maria-5.3-mwl128, a more complex query:

SELECT t2 .col_int_key
FROM t4
LEFT JOIN t2 JOIN t5 ON t2 .col_varchar_1024_utf8_key = t5 .col_varchar_10_utf8_key ON t4 .col_int_key
LEFT JOIN t3 JOIN t1 ON t3 .col_varchar_10_utf8_key = t1 .col_varchar_1024_latin1 ON t4 .col_int_key = t1.pk
WHERE t2 .pk <> 4 ;

crashes with the same assertion and the following backtrace:

#8 0x00133d98 in __assert_fail () from /lib/libc.so.6
#9 0x083249c1 in join_read_key2 (thd=0xb846b00, tab=0xb6ccab3c, table=0xb6c98be0, table_ref=0xb6ccac80) at sql_select.cc:13899
#10 0x083247dd in join_read_key (tab=0xb6ccab3c) at sql_select.cc:13850
#11 0x08323589 in sub_select (join=0xb6cc3630, join_tab=0xb6ccab3c, end_of_records=false) at sql_select.cc:13325
#12 0x08323c50 in evaluate_join_record (join=0xb6cc3630, join_tab=0xb6cca968, error=0) at sql_select.cc:13523
#13 0x0832372a in sub_select (join=0xb6cc3630, join_tab=0xb6cca968, end_of_records=false) at sql_select.cc:13368
#14 0x083229fd in do_select (join=0xb6cc3630, fields=0xb848514, table=0x0, procedure=0x0) at sql_select.cc:12872
#15 0x08308873 in JOIN::exec (this=0xb6cc3630) at sql_select.cc:2382
#16 0x08308fa9 in mysql_select (thd=0xb846b00, rref_pointer_array=0xb848584, tables=0xb6c3db78, wild_num=0, fields=..., conds=0xb6c87040, og_num=0,
    order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0xb6c3f7d8, unit=0xb8481e4, select_lex=0xb848480)
    at sql_select.cc:2584
#17 0x083016f1 in handle_select (thd=0xb846b00, lex=0xb848188, result=0xb6c3f7d8, setup_tables_done_option=0) at sql_select.cc:284
#18 0x0829dcab in execute_sqlcom_select (thd=0xb846b00, all_tables=0xb6c3db78) at sql_parse.cc:5083
#19 0x08294873 in mysql_execute_command (thd=0xb846b00) at sql_parse.cc:2281
#20 0x082a023c in mysql_parse (thd=0xb846b00,
    rawbuf=0xb6c3d830 "SELECT t2 .col_int_key\nFROM t4\nLEFT JOIN t2 JOIN t5 ON t2 .col_varchar_1024_utf8_key = t5 .col_varchar_10_utf8_key ON t4 .col_int_key\nLEFT JOIN t3 JOIN t1 ON t3 .col_varchar_10_utf8_key = t1 .col_"..., length=268, found_semicolon=0x9f6fa228) at sql_parse.cc:6090
#21 0x0829235c in dispatch_command (command=COM_QUERY, thd=0xb846b00, packet=0xb85f1a1 "", packet_length=271) at sql_parse.cc:1209
#22 0x082917c6 in do_command (thd=0xb846b00) at sql_parse.cc:902
#23 0x0828e8a4 in handle_one_connection (arg=0xb846b00) at sql_connect.cc:1154
#24 0x00bea919 in start_thread () from /lib/libpthread.so.0
#25 0x001edcbe in clone () from /lib/libc.so.6

Related branches

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

Attached test case with
- tables named t1 , t2 , t3
- no backticks
- multiline insert

Changed in maria:
assignee: nobody → Igor Babaev (igorb-seattle)
milestone: none → 5.3
Revision history for this message
Igor Babaev (igorb-seattle) wrote :

There is no crashes with the attached test case anymore after the fix for bug #668290 has been applied.

Changed in maria:
status: New → Incomplete
status: Incomplete → Invalid
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.