sql_join_cache.cc:2770: virtual bool JOIN_CACHE_HASHED::put_record(): Assertion `last_key_entry >= end_pos' failed in maria-5.3-mwl128
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
High
|
Igor Babaev |
Bug Description
The following query:
SELECT MAX( table1 . `col_int` ) AS field1 FROM M AS table1 LEFT JOIN Y AS table2 LEFT JOIN K AS table3 ON table2 . `col_int_key` = table3 . `pk` ON table1 . `col_varchar_
caused the following assertion:
mysqld: sql_join_
backtrace
# 2010-11-08T13:08:11 #8 0x00a72d98 in __assert_fail () from /lib/libc.so.6
# 2010-11-08T13:08:11 #9 0x082df328 in JOIN_CACHE_
# 2010-11-08T13:08:11 #10 0x08325e7f in sub_select_cache (join=0xb843f10, join_tab=0xb87dd70, end_of_
# 2010-11-08T13:08:11 #11 0x08326804 in evaluate_
# 2010-11-08T13:08:11 #12 0x08326190 in sub_select (join=0xb843f10, join_tab=0xb87db98, end_of_
# 2010-11-08T13:08:11 #13 0x083255b5 in do_select (join=0xb843f10, fields=0xb848cdc, table=0x0, procedure=0x0) at sql_select.cc:12969
# 2010-11-08T13:08:11 #14 0x0830b049 in JOIN::exec (this=0xb843f10) at sql_select.cc:2384
# 2010-11-08T13:08:11 #15 0x0830b7af in mysql_select (thd=0xb6a6520, rref_pointer_
# 2010-11-08T13:08:11 group=0x0, having=0x0, proc_param=0x0, select_
# 2010-11-08T13:08:11 #16 0x08303dcd in handle_select (thd=0xb6a6520, lex=0xb6a7bac, result=0xb8b5e40, setup_tables_
# 2010-11-08T13:08:11 #17 0x0829fbd3 in execute_
# 2010-11-08T13:08:11 #18 0x082966d3 in mysql_execute_
# 2010-11-08T13:08:11 #19 0x082a2144 in mysql_parse (thd=0xb6a6520,
# 2010-11-08T13:08:11 rawbuf=0xb7166a0 "SELECT MAX( table1 . `col_int` ) AS field1 FROM M AS table1 LEFT JOIN Y AS table2 LEFT JOIN K AS table3 ON table2 . `col_int_key` = table3 . `pk` ON table1 . `col_varchar_
# 2010-11-08T13:08:11 found_semicolon
# 2010-11-08T13:08:11 #20 0x08294240 in dispatch_command (command=COM_QUERY, thd=0xb6a6520, packet=0xb6a88e1 "", packet_length=1523) at sql_parse.cc:1209
# 2010-11-08T13:08:11 #21 0x082936f2 in do_command (thd=0xb6a6520) at sql_parse.cc:902
# 2010-11-08T13:08:11 #22 0x082906a8 in handle_
# 2010-11-08T13:08:11 #23 0x00bea919 in start_thread () from /lib/libpthread
# 2010-11-08T13:08:11 #24 0x00b2ccbe in clone () from /lib/libc.so.6
Changed in maria: | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in maria: | |
status: | Confirmed → Fix Committed |
Changed in maria: | |
status: | Fix Committed → Fix Released |
To reproduce the bug, place the attached vardir in mysql-test/ and then run
lib/v1/ mysql-test- run.pl --mysqld=--innodb --mysqld= --join_ cache_level= 4 --mysqld= --join_ buffer_ size=1 --mysqld= --log-output= file --start-and-exit --start-dirty --vardir= /home/philips/ bzr/maria- 5.3-mwl128/ mysql-test/ var --master_port=19300 --skip-ndbcluster --mysqld= --loose- core-file- size=1 --fast 1st
This will start a server against which you can execute the original crashing query. Try it several times (including the server restart) if it does not work outright.
Due to the sporadic nature of this failure, automatic simplification was not possible. Valgrind only reports innodb-related warnings. Bug was not reproducible as an MTR test case or by using MyISAM only tables.