File: mrr_derived_crash_4610.test

package info (click to toggle)
mariadb-10.0 10.0.32-0%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 476,064 kB
  • sloc: cpp: 1,400,131; ansic: 832,140; perl: 54,391; sh: 41,304; pascal: 32,365; yacc: 14,921; xml: 5,257; sql: 4,667; cs: 4,647; makefile: 4,555; ruby: 4,465; python: 2,292; lex: 1,427; java: 941; asm: 295; awk: 54; php: 22; sed: 16
file content (16 lines) | stat: -rw-r--r-- 715 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#
# MDEV-4610 SQL query crashes MariaDB with derived_with_keys
#
--source include/have_innodb.inc
create table t1 (f1 char(4) primary key) engine=innodb charset=utf8 ;
insert into t1 values ('aaaa');
create table t2 (f2 text, f3 char(4) not null) engine=innodb charset=utf8 ;
create table t3 (id int not null) engine=innodb charset=utf8 ;
create table t4 (val int not null) engine=innodb charset=utf8;
explain select 1 from
  (select f2, f3, val, count(id) from t4 join t2 left join t3 on 0) top
  join t1 on f1 = f3 where f3 = 'aaaa' order by val;
select 1 from
  (select f2, f3, val, count(id) from t4 join t2 left join t3 on 0) top
  join t1 on f1 = f3 where f3 = 'aaaa' order by val;
drop table t1, t2, t3, t4;