Below is the list of changes that have just been committed into a local
5.0 repository of evgen. When evgen does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-02-08 13:35:00+03:00, evgen@stripped +3 -0
Bug#31590: Wrong error message on sort buffer being too small.
The out of memory error was thrown when the sort buffer size were too small.
This led to a user confusion.
Now filesort throws the error message about sort buffer being too small.
mysql-test/r/order_by.result@stripped, 2008-02-08 13:33:12+03:00, evgen@stripped +12 -0
Added a test case for the bug#31590: Wrong error message on sort buffer being too small.
mysql-test/t/order_by.test@stripped, 2008-02-08 13:32:47+03:00, evgen@stripped +12 -0
Added a test case for the bug#31590: Wrong error message on sort buffer being too small.
sql/filesort.cc@stripped, 2008-02-08 13:33:31+03:00, evgen@stripped +1 -2
Bug#31590: Wrong error message on sort buffer being too small.
Now filesort throws the error message about sort buffer being too small
instead of out of memory error.
diff -Nrup a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result
--- a/mysql-test/r/order_by.result 2007-04-04 09:24:55 +04:00
+++ b/mysql-test/r/order_by.result 2008-02-08 13:33:12 +03:00
@@ -1064,3 +1064,15 @@ a b
10 00:00:10
0 00:00:00
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;
diff -Nrup a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test
--- a/mysql-test/t/order_by.test 2007-06-01 17:49:00 +04:00
+++ b/mysql-test/t/order_by.test 2008-02-08 13:32:47 +03:00
@@ -726,3 +726,15 @@ SELECT a, b FROM t1 ORDER BY b DESC;
SELECT a, b FROM t1 ORDER BY SEC_TO_TIME(a) DESC;
DROP TABLE t1;
+
+--echo #
+--echo # Bug#31590: Wrong error message on sort buffer being too small.
+--echo #
+create table t1(a int, b tinytext);
+insert into t1 values (1,2),(3,2);
+set session sort_buffer_size= 30000;
+set session max_sort_length= 2180;
+--error 1038
+select * from t1 order by b;
+drop table t1;
+
diff -Nrup a/sql/filesort.cc b/sql/filesort.cc
--- a/sql/filesort.cc 2008-01-10 18:52:24 +03:00
+++ b/sql/filesort.cc 2008-02-08 13:33:31 +03:00
@@ -215,8 +215,7 @@ ha_rows filesort(THD *thd, TABLE *table,
sort_keys= table_sort.sort_keys;
if (memavl < min_sort_memory)
{
- my_error(ER_OUTOFMEMORY,MYF(ME_ERROR+ME_WAITTANG),
- thd->variables.sortbuff_size);
+ my_error(ER_OUT_OF_SORTMEMORY,MYF(ME_ERROR+ME_WAITTANG));
goto err;
}
if (open_cached_file(&buffpek_pointers,mysql_tmpdir,TEMP_PREFIX,