|
As requested a test case without subqueries
--source include/have_innodb.inc
|
set join_cache_level=3;
|
set optimizer_use_condition_selectivity=2;
|
|
CREATE TABLE t1 (c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int, c13 int, c14 int, c15 int, c16 int, c17 int, c18 int, c19 int, c20 int, c21 int, c22 int, c23 int, c24 int, c25 int, c26 int, c27 int, c28 int, c29 int, c30 int, c31 int, c32 int, c33 int, c34 int);
|
|
insert into t1 values
|
(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33),(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33);
|
|
select * from t1, t1 t where t1.c1 = t.c1 and t1.c2 = t.c2 and t1.c3 = t.c3 and t1.c4 = t.c4 and t1.c5 = t.c5 and t1.c6 = t.c6 and t1.c7 = t.c7 and t1.c8 = t.c8 and t1.c9 = t.c9 and t1.c10 = t.c10 and t1.c11 = t.c11 and t1.c12 = t.c12 and t1.c13 = t.c13 and t1.c14 = t.c14 and t1.c15 = t.c15 and t1.c16 = t.c16 and t1.c17 = t.c17 and t1.c18 = t.c18 and t1.c19 = t.c19 and t1.c20 = t.c20 and t1.c21 = t.c21 and t1.c22 = t.c22 and t1.c23 = t.c23 and t1.c24 = t.c24 and t1.c25 = t.c25 and t1.c26 = t.c26 and t1.c27 = t.c27 and t1.c28 = t.c28 and t1.c29 = t.c29 and t1.c30 = t.c30 and t1.c31 = t.c31 and t1.c32 = t.c32 and t1.c33 = t.c33 and t1.c34 = t.c34;
|
|
drop table t1;
|
|
|
Here is also another test case which causes the same ASAN failure on 10.4+, and a very different but equally ugly stack trace on a non-ASAN debug build.
CREATE TABLE t1 (
|
f1 tinytext,
|
f2 mediumint,
|
f3 int,
|
f4 tinytext,
|
f5 date,
|
f6 char(1),
|
f7 int,
|
f8 mediumtext,
|
f9 mediumtext,
|
f10 bigint unsigned,
|
f11 timestamp NULL DEFAULT 0,
|
f12 datetime,
|
f13 bit,
|
f14 varchar(257),
|
f15 mediumint unsigned,
|
f16 mediumtext,
|
f17 float,
|
f18 longtext,
|
f19 double unsigned,
|
f20 float unsigned,
|
f21 bigint,
|
f22 longtext,
|
f23 varchar(257),
|
f24 tinytext,
|
f25 longtext,
|
f26 tinyint,
|
f27 varchar(10),
|
f28 char(10),
|
f29 varchar(1),
|
f30 bit(64),
|
f31 text,
|
f32 double,
|
f33 smallint,
|
f34 char(1),
|
f35 int,
|
f36 int,
|
f37 char(10),
|
f38 varchar(1),
|
f39 text,
|
f40 varchar(257),
|
f41 int,
|
f42 varchar(1),
|
f43 int,
|
f44 varchar(10),
|
f45 smallint unsigned
|
) ENGINE=MyISAM;
|
|
CREATE TABLE t2 (
|
f1 tinytext,
|
f2 mediumint,
|
f3 int,
|
f4 tinytext,
|
f5 date,
|
f6 char(1),
|
f7 int,
|
f8 mediumtext,
|
f9 mediumtext,
|
f10 bigint unsigned,
|
f11 timestamp NULL DEFAULT 0,
|
f12 datetime,
|
f13 bit,
|
f14 varchar(257),
|
f15 mediumint unsigned,
|
f16 mediumtext,
|
f17 float,
|
f18 longtext,
|
f19 double unsigned,
|
f20 float unsigned,
|
f21 bigint,
|
f22 longtext,
|
f23 varchar(257),
|
f24 tinytext,
|
f25 longtext,
|
f26 tinyint,
|
f27 varchar(10),
|
f28 char(10),
|
f29 varchar(1),
|
f30 bit(64),
|
f31 text,
|
f32 double,
|
f33 smallint,
|
f34 char(1),
|
f35 int,
|
f36 int,
|
f37 char(10),
|
f38 varchar(1),
|
f39 text,
|
f40 varchar(257),
|
f41 int,
|
f42 varchar(1),
|
f43 int,
|
f44 varchar(10),
|
f45 smallint unsigned
|
) ENGINE=MyISAM;
|
|
INSERT INTO t1 VALUES
|
(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
|
INSERT INTO t2 VALUES
|
(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
|
SET SESSION JOIN_CACHE_LEVEL= 5;
|
|
SELECT t1.* FROM t1 NATURAL JOIN t2 B;
|
|
10.4 de208723
|
#5 <signal handler called>
|
#6 0x0000562c0fa3133e in table_cond_selectivity (join=0x7f4fd4015698, idx=1, s=0x0, rem_tables=0) at /data/src/10.4/sql/sql_select.cc:9306
|
#7 0x0001000100010001 in ?? ()
|
#8 0x0001000100010001 in ?? ()
|
#9 0x4000000000000000 in ?? ()
|
#10 0x0000000100000004 in ?? ()
|
#11 0x4003573333333333 in ?? ()
|
#12 0x4000000000000000 in ?? ()
|
#13 0x000000010000003d in ?? ()
|
#14 0x0000000000000002 in ?? ()
|
#15 0x00007f4fd4015698 in ?? ()
|
#16 0x00000000d41b9e98 in ?? ()
|
#17 0x4010000000000000 in ?? ()
|
#18 0x4014f0cccccccccc in ?? ()
|
#19 0x4010000000000000 in ?? ()
|
#20 0x4014f0cccccccccc in ?? ()
|
#21 0xffffffffffffffff in ?? ()
|
#22 0x00007f4fd41bb8f0 in ?? ()
|
#23 0x3ff0000000000000 in ?? ()
|
#24 0x00007f4fd4000af0 in ?? ()
|
#25 0x00007f4fd41bb358 in ?? ()
|
#26 0x0000000000000002 in ?? ()
|
#27 0x00007f4fd41bba50 in ?? ()
|
#28 0x0000000000000000 in ?? ()
|
|