diff options
Diffstat (limited to 'mysql-test/r/order_by.result')
-rw-r--r-- | mysql-test/r/order_by.result | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 3d0f4915d0a..faab8e49880 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -1416,3 +1416,45 @@ SELECT @tmp_tables_after = @tmp_tables_before; @tmp_tables_after = @tmp_tables_before 1 DROP TABLE t1; +# +# Bug#31590: Wrong error message on sort buffer being too small. +# +create table t1(a int, b tinytext); +insert into t1 values (1,2),(3,2); +set session sort_buffer_size= 30000; +Warnings: +Warning 1292 Truncated incorrect sort_buffer_size value: '30000' +set session max_sort_length= 2180; +select * from t1 order by b; +ERROR HY001: Out of sort memory; increase server sort buffer size +drop table t1; +CREATE TABLE t2 (a varchar(32), b int(11), c float, d double, +UNIQUE KEY a (a,b,c), KEY b (b), KEY c (c)); +CREATE TABLE t1 (a varchar(32), b char(3), UNIQUE KEY a (a,b), KEY b (b)); +CREATE TABLE t3 (a varchar(32), b char(3), UNIQUE KEY a (a,b)); +INSERT INTO t3 SELECT * FROM t1; +EXPLAIN +SELECT d FROM t1, t2 +WHERE t2.b=14 AND t2.a=t1.a AND 5.1<t2.c AND t1.b='DE' +ORDER BY t2.c LIMIT 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref a,b b 4 const 4 Using where; Using temporary; Using filesort +1 SIMPLE t2 ref a,b,c a 40 test.t1.a,const 11 Using where +SELECT d FROM t1, t2 +WHERE t2.b=14 AND t2.a=t1.a AND 5.1<t2.c AND t1.b='DE' +ORDER BY t2.c LIMIT 1; +d +52.5 +EXPLAIN +SELECT d FROM t3 AS t1, t2 AS t2 +WHERE t2.b=14 AND t2.a=t1.a AND 5.1<t2.c AND t1.b='DE' +ORDER BY t2.c LIMIT 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range a,b,c c 5 NULL 420 Using where +1 SIMPLE t1 ref a a 39 test.t2.a,const 10 Using where; Using index +SELECT d FROM t3 AS t1, t2 AS t2 +WHERE t2.b=14 AND t2.a=t1.a AND 5.1<t2.c AND t1.b='DE' +ORDER BY t2.c LIMIT 1; +d +52.5 +DROP TABLE t1,t2,t3; |