Description:
A query that requires sorting with very long keys such that the sort buffer cannot contain more than 6 keys causes a crash of the server.
How to repeat:
1. Start the server with the following parameter setting:
--sort_buffer_size=32K --max_sort_length=8096
2. Run the following script by the mysql utility:
use test;
drop table if exists t;
create table t (a char(8096));
insert into t values ('Y'), ('Z'),
('Q'), ('R'), ('S'), ('T'), ('U'), ('V'), ('W'), ('X'),
('I'), ('J'), ('K'), ('L'), ('M'), ('N'), ('O'), ('P'),
('A'), ('B'), ('C'), ('D'), ('E'), ('F'), ('G'), ('H')
;
select left(a, 2) from t;
select left(a, 2) from t order by a;
drop table t;
Description: A query that requires sorting with very long keys such that the sort buffer cannot contain more than 6 keys causes a crash of the server. How to repeat: 1. Start the server with the following parameter setting: --sort_buffer_size=32K --max_sort_length=8096 2. Run the following script by the mysql utility: use test; drop table if exists t; create table t (a char(8096)); insert into t values ('Y'), ('Z'), ('Q'), ('R'), ('S'), ('T'), ('U'), ('V'), ('W'), ('X'), ('I'), ('J'), ('K'), ('L'), ('M'), ('N'), ('O'), ('P'), ('A'), ('B'), ('C'), ('D'), ('E'), ('F'), ('G'), ('H') ; select left(a, 2) from t; select left(a, 2) from t order by a; drop table t;