mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug #42778: delete order by null global variable causes
assertion .\filesort.cc, line 797 A query with the "ORDER BY @@some_system_variable" clause, where @@some_system_variable is NULL, causes assertion failure in the filesort procedures. The reason of the failure is in the value of Item_func_get_system_var::maybe_null: it was unconditionally set to false even if the value of a variable was NULL.
This commit is contained in:
@ -1201,4 +1201,23 @@ SET GLOBAL server_id = -1;
|
||||
SELECT @@GLOBAL.server_id;
|
||||
SET GLOBAL server_id = @old_server_id;
|
||||
|
||||
#
|
||||
# Bug #42778: delete order by null global variable causes
|
||||
# assertion .\filesort.cc, line 797
|
||||
#
|
||||
|
||||
SELECT @@GLOBAL.INIT_FILE, @@GLOBAL.INIT_FILE IS NULL;
|
||||
SELECT @@GLOBAL.REPORT_HOST, @@GLOBAL.REPORT_HOST IS NULL;
|
||||
SELECT @@GLOBAL.REPORT_PASSWORD, @@GLOBAL.REPORT_PASSWORD IS NULL;
|
||||
SELECT @@GLOBAL.REPORT_USER, @@GLOBAL.REPORT_USER IS NULL;
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES ();
|
||||
SET @bug42778= @@sql_safe_updates;
|
||||
SET @@sql_safe_updates= 0;
|
||||
DELETE FROM t1 ORDER BY (@@GLOBAL.INIT_FILE) ASC LIMIT 10;
|
||||
SET @@sql_safe_updates= @bug42778;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
Reference in New Issue
Block a user