mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Bug#31160: MAKETIME() crashes server when returning NULL in ORDER BY using filesort
Even though it returns NULL, the MAKETIME function did not have this property set, causing a failed assertion (designed to catch exactly this). Fixed by setting the nullability property of MAKETIME(). mysql-test/r/func_sapdb.result: Bug#31160: Changed test result. mysql-test/r/func_time.result: Bug#31160: Test result. mysql-test/t/func_time.test: Bug#31160: Test case. sql/item_timefunc.h: Bug#31160: The fix: Initializing maybe_null to true
This commit is contained in:
@ -1027,6 +1027,15 @@ fmtddate field2
|
||||
Sep-4 12:00AM abcd
|
||||
DROP TABLE testBug8868;
|
||||
SET NAMES DEFAULT;
|
||||
CREATE TABLE t1 (
|
||||
a TIMESTAMP
|
||||
);
|
||||
INSERT INTO t1 VALUES (now()), (now());
|
||||
SELECT 1 FROM t1 ORDER BY MAKETIME(1, 1, a);
|
||||
1
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H)
|
||||
union
|
||||
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H);
|
||||
|
Reference in New Issue
Block a user