mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 03:21:53 +01:00
c711ce6726
Write an additional warning message to the server log, explaining why a sort operation is aborted. The output in mysqld.err will look something like: 110127 15:07:54 [ERROR] mysqld: Sort aborted: Out of memory (Needed 24 bytes) 110127 15:07:54 [ERROR] mysqld: Out of sort memory, consider increasing server sort buffer size 110127 15:07:54 [ERROR] mysqld: Sort aborted: Out of sort memory, consider increasing server sort buffer size 110127 15:07:54 [ERROR] mysqld: Sort aborted: Incorrect number of arguments for FUNCTION test.f1; expected 0, got 1 If --log-warn=2 is enabled, we output information about host/user/query as well. include/my_sys.h: Update comment for ME_NOREFRESH mysql-test/include/mtr_warnings.sql: Remove global filtering of "Out of sort memory", let each individual test set it instead. mysql-test/r/filesort_debug.result: New test case. mysql-test/r/order_by.result: Ignore "Out of memory" for this test. mysql-test/t/filesort_debug.test: New test case. mysql-test/t/order_by.test: Ignore "Out of memory" for this test. sql/filesort.cc: Output an explanation using the error message from the THD Diagnostics_area. sql/protocol.cc: Do not DBUG_RETURN(function_call_with DBUG_RETURN) as it messes up the call stack in the debug output. sql/share/errmsg-utf8.txt: Change error message for "Out of sort memory" sql/unireg.h: Remove unused/confusing ERRMAPP macro.
23 lines
617 B
Text
23 lines
617 B
Text
--source include/have_debug.inc
|
|
|
|
SET @old_debug= @@session.debug;
|
|
|
|
--echo #
|
|
--echo # Bug#36022 please log more information about "Sort aborted" queries
|
|
--echo #
|
|
|
|
CREATE TABLE t1(f0 int auto_increment primary key, f1 int);
|
|
INSERT INTO t1(f1) VALUES (0),(1),(2),(3),(4),(5);
|
|
|
|
SET session debug= '+d,make_char_array_fail';
|
|
CALL mtr.add_suppression("Out of sort memory");
|
|
--error ER_OUT_OF_SORTMEMORY
|
|
SELECT * FROM t1 ORDER BY f1 ASC, f0;
|
|
SET session debug= @old_debug;
|
|
|
|
CREATE FUNCTION f1() RETURNS INT RETURN 1;
|
|
--error ER_SP_WRONG_NO_OF_ARGS
|
|
DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1;
|
|
|
|
DROP TABLE t1;
|
|
DROP FUNCTION f1;
|