1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-29 21:42:28 +03:00
mariadb/mysql-test/t/order_fill_sortbuf.test
unknown a697e30a3a added test case for the bug in ORDER BY when we fill up sort buffer
Note that if you change sort buffer to be bigger, the bug will not show
2001-06-22 15:13:33 -06:00

20 lines
481 B
Plaintext

drop table if exists t1,t2;
CREATE TABLE `t1` (
`id` int(11) NOT NULL default '0',
`id2` int(11) NOT NULL default '0',
`id3` int(11) NOT NULL default '0',
`dummy1` char(30) default NULL,
PRIMARY KEY (`id`,`id2`),
KEY `index_id3` (`id3`));
let $1=4000;
while ($1)
{
eval insert into t1 (id,id2,id3,dummy1) values ($1,$1,$1,'foobar');
dec $1;
}
create table t2 (n int);
insert into t2 select id2 from t1 order by id3;
select count(*) from t2;
drop table t1,t2;