Crash in quick_range_seq_next() in maria-5.3-dsmrr-cpk with join_cache_level = {8,1}
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
High
|
Sergey Petrunia |
Bug Description
The following query:
SELECT table2 .`col_datetime_key`
FROM C JOIN ( CC table2 JOIN C table3 ON table3 .`col_varchar_key` < table2 .`col_varchar_key` ) ON table3 .`col_varchar_
causes the following crash:
#3 0x0828048a in handle_segfault (sig=11) at mysqld.cc:2706
#4 <signal handler called>
#5 0x0839ca86 in quick_range_
#6 0x084983d4 in handler:
#7 0x08499f91 in DsMrr_impl:
#8 0x0855ae7e in ha_maria:
#9 0x083adcab in QUICK_RANGE_
#10 0x083c1f46 in rr_quick (info=0xb5e4e0f4) at records.cc:322
#11 0x083211e3 in join_init_
#12 0x08321006 in join_init_
#13 0x0831f6c6 in sub_select (join=0xb5d9fcb8, join_tab=
#14 0x082d9aa4 in JOIN_CACHE:
#15 0x082d9883 in JOIN_CACHE_
#16 0x082d9352 in JOIN_CACHE:
#17 0x0831f382 in sub_select_cache (join=0xb5d9fcb8, join_tab=
#18 0x0831f59b in sub_select (join=0xb5d9fcb8, join_tab=
#19 0x0831eb55 in do_select (join=0xb5d9fcb8, fields=0xad29a04, table=0x0, procedure=0x0) at sql_select.cc:12636
#20 0x08304ed7 in JOIN::exec (this=0xb5d9fcb8) at sql_select.cc:2355
#21 0x0830560d in mysql_select (thd=0xad27ff0, rref_pointer_
group=0x0, having=0x0, proc_param=0x0, select_
#22 0x082fdbff in handle_select (thd=0xad27ff0, lex=0xad29670, result=0xb5d9fc88, setup_tables_
#23 0x0829c1a4 in execute_
#24 0x08292b7c in mysql_execute_
#25 0x0829e365 in mysql_parse (thd=0xad27ff0,
inBuf=
#26 0x08290632 in dispatch_command (command=COM_QUERY, thd=0xad27ff0, packet=0xad2a011 "", packet_length=170) at sql_parse.cc:1184
#27 0x0828fb20 in do_command (thd=0xad27ff0) at sql_parse.cc:890
#28 0x0828cb58 in handle_
#29 0x00a08919 in start_thread () from /lib/libpthread
#30 0x00951e5e in clone () from /lib/libc.so.6
bzr version-info:
revision-id: <email address hidden>
date: 2010-08-19 19:52:58 +0200
build-date: 2010-08-24 13:17:50 +0300
revno: 2821
branch-nick: maria-5.3-dsmrr-cpk
maria-5.3 is not affected.
summary: |
Crash in quick_range_seq_next() in maria-5.3-dsmrr-cpk with - join_cache_level = 8 + join_cache_level = {8,1} |
Changed in maria: | |
status: | Fix Committed → Fix Released |
Test case:
SET SESSION join_cache_level = 8; datetime_ key` datetime DEFAULT NULL, varchar_ nokey` varchar(1) DEFAULT NULL, key`,`col_ int_key` ) datetime_ key` datetime DEFAULT NULL, varchar_ nokey` varchar(1) DEFAULT NULL, key`,`col_ int_key` ) nokey` ;
CREATE TABLE `CC` (
`col_int_key` int(11) DEFAULT NULL,
`col_
`col_varchar_key` varchar(1) DEFAULT NULL,
`col_
KEY `col_varchar_key` (`col_varchar_
) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1;
INSERT INTO `CC` VALUES (6,'2005-10-07 00:00:00','e','e');
INSERT INTO `CC` VALUES (51,'2000-07-15 05:00:34','f','f');
CREATE TABLE `C` (
`col_int_key` int(11) DEFAULT NULL,
`col_
`col_varchar_key` varchar(1) DEFAULT NULL,
`col_
KEY `col_varchar_key` (`col_varchar_
) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1;
INSERT INTO `C` VALUES (2,'2004-10-11 18:13:16','w','w');
INSERT INTO `C` VALUES (2,'1900-01-01 00:00:00','d','d');
SELECT table2 .`col_datetime_key`
FROM C JOIN ( CC table2 JOIN C table3 ON table3 .`col_varchar_key` < table2 .`col_varchar_key` ) ON table3 .`col_varchar_