Server crashes in _mi_put_key_in_record on KILL QUERY with ICP, STRAIGHT_JOIN
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Undecided
|
Sergey Petrunia |
Bug Description
#4 <signal handler called>
#5 0x0854c0cc in _mi_put_
record=0x0) at mi_key.c:410
#6 0x0854c3ee in mi_check_index_cond (info=0x94be0b8, keynr=0, record=0x0) at mi_key.c:517
#7 0x0855293b in mi_rkey (info=0x94be0b8, buf=0x0, inx=0, key=0x945f078 "\001", keypart_map=1,
search_
#8 0x0851b764 in ha_myisam:
key=0x945f078 "\001", keypart_map=1, find_flag=
#9 0x081eccd6 in handler:
key=0x945f078 "\001", keypart_map=1, find_flag=
#10 0x08376994 in join_read_
#11 0x083751b3 in sub_select (join=0x94738f8, join_tab=0x94b7f58, end_of_
at sql_select.cc:15373
#12 0x083758a2 in evaluate_
at sql_select.cc:15573
#13 0x08375350 in sub_select (join=0x94738f8, join_tab=0x94b7d50, end_of_
at sql_select.cc:15416
#14 0x08374a5b in do_select (join=0x94738f8, fields=0x93f05b4, table=0x0, procedure=0x0)
at sql_select.cc:15037
#15 0x08358c65 in JOIN::exec (this=0x94738f8) at sql_select.cc:2710
#16 0x08359495 in mysql_select (thd=0x93eead0, rref_pointer_
wild_num=1, fields=..., conds=0x945df48, og_num=0, order=0x0, group=0x0, having=0x0,
proc_param=0x0, select_
select_
#17 0x083511af in handle_select (thd=0x93eead0, lex=0x93f01e4, result=0x945e0b0,
setup_
#18 0x082ec3b9 in execute_
#19 0x082e3795 in mysql_execute_
#20 0x082ee9f4 in mysql_parse (thd=0x93eead0,
rawbuf=
#21 0x082e13d5 in dispatch_command (command=COM_QUERY, thd=0x93eead0, packet=0x9447941 "",
packet_
#22 0x082e087f in do_command (thd=0x93eead0) at sql_parse.cc:923
#23 0x082dd805 in handle_
#24 0xb769db25 in start_thread () from /lib/libpthread
bzr version-info
revision-id: <email address hidden>
date: 2012-02-14 16:52:56 +0200
build-date: 2012-02-16 15:57:13 +0400
revno: 3421
Also reproducible on MariaDB 5.5.
EXPLAIN:
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE alias1 ALL c NULL NULL NULL 157 100.00
1 SIMPLE alias2 ref c c 3 test.alias1.c 6 100.00 Using index condition
Warnings:
Note 1003 select `test`.`alias1`.`b` AS `b`,`test`
Minimal optimizer_switch: index_condition
Full optimizer_switch (current default): index_merge=
Test case:
# Please note that there is a race condition involved, so the test case attempts to run and kill the query several times. The number of attempts is set in $run variable.
SET optimizer_
CREATE TABLE t1 (
b INT,
c VARCHAR(1) NOT NULL,
d DATETIME,
KEY (c, b)
) ENGINE=MyISAM;
INSERT INTO t1 ( b, d, c ) VALUES
(4,'2005-01-08 00:00:00','f'),
(1,'2004-05-20 10:45:51'
(5,'2003-05-19 00:20:40'
(7,'2008-11-25 18:18:14'
(9,'2003-03-01 03:40:36'
(0,'2007-01-17 09:18:31'
(2,'2008-03-10 00:00:00'
(4,'2005-04-25 00:00:00'
(3,'2005-04-09 01:22:48'
(0,'2009-03-28 05:05:28'
(7,'2006-03-26 05:19:58'
(4,'2007-01-28 03:28:20'
(2,'2003-01-01 19:39:00'
(2,'2005-01-28 00:00:00'
(8,'2000-06-13 21:56:37'
(99,'2003-12-20 21:29:06'
(7,'2000-12-19 00:00:00'
(3,'2000-08-11 00:00:00'
(241,'2005-05-17 00:00:00'
(43,'2001-07-11 00:00:00'
(4,'2004-10-25 00:00:00'
(0,'1900-01-01 00:00:00'
(1,'2008-10-09 15:39:40'
(0,'2008-03-06 00:00:00'
(3,'2008-03-16 19:49:37'
(8,'2005-02-11 00:04:53'
(3,'2004-11-03 00:37:21'
(6,'2007-01-21 10:42:56'
(9,'2001-03-15 08:08:21'
(6,'2004-05-01 23:45:55'
(9,'2002-12-03 16:48:28'
(1,'2006-06-22 04:32:41'
(4,'2006-06-02 22:15:31'
(7,'2005-06-05 01:30:42'
(210,'2003-11-05 00:41:34'
(1,'2006-04-16 00:00:00'
(8,'2009-05-09 20:43:07'
(0,'2002-05-09 21:18:44'
(1,'2008-11-09 23:56:00'
(2,'2005-04-16 00:00:00'
(64,'2005-12-05 21:51:52'
(6,'2006-03-23 00:00:00'
(8,'2008-08-16 00:00:00'
(0,'2003-06-22 00:00:00'
(8,'2004-09-23 18:57:17'
(4,'2009-06-01 13:00:28'
(0,'2004-06-12 10:01:10'
(5,'2001-12-23 09:50:21'
(1,'2001-10-28 00:00:00'
(0,'2002-10-11 16:51:16'
(1,'2007-02-21 12:28:14'
(0,'2007-09-20 02:25:45'
(8,'2006-12-04 20:20:32'
(9,'2006-04-12 17:59:57'
(8,'2000-01-07 00:00:00'
(4,'2000-07-10 00:44:55'
(9,'2003-09-11 22:41:17'
(8,'2008-10-09 00:00:00'
(9,'2000-12-05 00:00:00'
(3,'2005-12-24 21:50:54'
(9,'2005-11-13 17:57:56'
(1,'2004-11-20 08:05:08'
(1,'2006-09-02 14:16:41'
(9,'2003-04-05 00:54:20'
(9,'2006-04-16 17:31:40'
(7,'2004-04-27 05:54:52'
(5,'2004-04-03 20:56:28'
(2,'2004-08-04 16:10:42'
(9,'1900-01-01 00:00:00'
(2,'1900-01-01 00:00:00'
(4,'2000-07-14 01:25:18'
(6,'2009-05-25 13:33:54'
(8,'1900-01-01 00:00:00'
(0,'2003-05-21 07:03:46'
(2,'1900-01-01 00:00:00'
(3,'2003-09-26 00:00:00'
(9,'2008-09-23 20:03:28'
(1,'2009-02-14 10:27:18'
(3,'2008-01-20 12:49:54'
CREATE TABLE t2 ( a INT ) ENGINE=MyISAM;
INSERT INTO t2 VALUES
(7),(3),(7),(3);
--let $run = 100
--let $con_id = `SELECT CONNECTION_ID()`
while ($run)
{
--send
SELECT * FROM t1 AS alias1 STRAIGHT_JOIN t1 AS alias2
ON alias2.c = alias1.c
WHERE alias2.b >= 9;
--connect (con1,127.
--eval KILL QUERY $con_id
--disconnect con1
--dec $run
--connection default
--error ER_QUERY_
--reap
}
# End of test case
description: | updated |
Changed in maria: | |
status: | New → Confirmed |
status: | Confirmed → In Progress |
Changed in maria: | |
status: | In Progress → Fix Committed |
status: | Fix Committed → In Progress |
Changed in maria: | |
status: | In Progress → Fix Committed |
Fix released with 5.3.5-ga.