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:
@ -1436,7 +1436,7 @@ Warnings:
|
||||
Warning 1292 Truncated incorrect auto_increment_offset value: '0'
|
||||
select @@storage_engine;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def @@storage_engine 253 6 6 N 1 31 8
|
||||
def @@storage_engine 253 6 6 Y 0 31 8
|
||||
@@storage_engine
|
||||
MyISAM
|
||||
SET @old_server_id = @@GLOBAL.server_id;
|
||||
@ -1467,4 +1467,23 @@ SELECT @@GLOBAL.server_id;
|
||||
@@GLOBAL.server_id
|
||||
0
|
||||
SET GLOBAL server_id = @old_server_id;
|
||||
SELECT @@GLOBAL.INIT_FILE, @@GLOBAL.INIT_FILE IS NULL;
|
||||
@@GLOBAL.INIT_FILE @@GLOBAL.INIT_FILE IS NULL
|
||||
NULL 1
|
||||
SELECT @@GLOBAL.REPORT_HOST, @@GLOBAL.REPORT_HOST IS NULL;
|
||||
@@GLOBAL.REPORT_HOST @@GLOBAL.REPORT_HOST IS NULL
|
||||
NULL 1
|
||||
SELECT @@GLOBAL.REPORT_PASSWORD, @@GLOBAL.REPORT_PASSWORD IS NULL;
|
||||
@@GLOBAL.REPORT_PASSWORD @@GLOBAL.REPORT_PASSWORD IS NULL
|
||||
NULL 1
|
||||
SELECT @@GLOBAL.REPORT_USER, @@GLOBAL.REPORT_USER IS NULL;
|
||||
@@GLOBAL.REPORT_USER @@GLOBAL.REPORT_USER IS NULL
|
||||
NULL 1
|
||||
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;
|
||||
End of 5.1 tests
|
||||
|
Reference in New Issue
Block a user