mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 17:54:16 +01:00
MDEV-35489 Assertion `!ldate->neg' or unexpected result upon extracting unit from invalid value
The patch for MDEV-23687 easlier fixed this problem. Adding tests only.
This commit is contained in:
parent
2e404c9850
commit
20eba06d9b
2 changed files with 33 additions and 0 deletions
|
@ -1503,5 +1503,28 @@ Warnings:
|
|||
Warning 1292 Incorrect datetime value: '100000:00:00'
|
||||
SET SESSION old_mode=DEFAULT;
|
||||
#
|
||||
# MDEV-35489 Assertion `!ldate->neg' or unexpected result upon extracting unit from invalid value
|
||||
#
|
||||
SELECT EXTRACT(DAY FROM TIMESTAMP(-177498480000));
|
||||
EXTRACT(DAY FROM TIMESTAMP(-177498480000))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '-177498480000'
|
||||
SELECT EXTRACT(DAY FROM TIMESTAMP(-177498480001));
|
||||
EXTRACT(DAY FROM TIMESTAMP(-177498480001))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '-177498480001'
|
||||
SELECT EXTRACT(DAY FROM TIMESTAMP(-200000000000));
|
||||
EXTRACT(DAY FROM TIMESTAMP(-200000000000))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '-200000000000'
|
||||
SELECT EXTRACT(DAY FROM TIMESTAMP(-221938034527));
|
||||
EXTRACT(DAY FROM TIMESTAMP(-221938034527))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '-221938034527'
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
|
|
|
@ -528,6 +528,16 @@ SELECT CAST('100000:00:00' AS DATE);
|
|||
SELECT EXTRACT(DAY FROM CAST('100000:00:00' AS DATE));
|
||||
SET SESSION old_mode=DEFAULT;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35489 Assertion `!ldate->neg' or unexpected result upon extracting unit from invalid value
|
||||
--echo #
|
||||
|
||||
SELECT EXTRACT(DAY FROM TIMESTAMP(-177498480000));
|
||||
SELECT EXTRACT(DAY FROM TIMESTAMP(-177498480001));
|
||||
SELECT EXTRACT(DAY FROM TIMESTAMP(-200000000000));
|
||||
SELECT EXTRACT(DAY FROM TIMESTAMP(-221938034527));
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
|
Loading…
Add table
Reference in a new issue