summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/func_time.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 13:22:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 13:22:53 +0000
commit347c164c35eddab388009470e6848cb361ac93f8 (patch)
tree2c0c44eac690f510bb0a35b2a13b36d606b77b6b /mysql-test/main/func_time.test
parentReleasing progress-linux version 1:10.11.7-4~progress7.99u1. (diff)
downloadmariadb-347c164c35eddab388009470e6848cb361ac93f8.tar.xz
mariadb-347c164c35eddab388009470e6848cb361ac93f8.zip
Merging upstream version 1:10.11.8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/func_time.test')
-rw-r--r--mysql-test/main/func_time.test39
1 files changed, 39 insertions, 0 deletions
diff --git a/mysql-test/main/func_time.test b/mysql-test/main/func_time.test
index fb184ab4..caf6ec1c 100644
--- a/mysql-test/main/func_time.test
+++ b/mysql-test/main/func_time.test
@@ -3218,3 +3218,42 @@ SELECT CONCAT(MAKETIME('01', '01', LEAST( -100, NULL )));
--echo #
SELECT FROM_UNIXTIME(LEAST(3696610869, NULL));
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-29149 Assertion `!is_valid_datetime() || fraction_remainder(((item->decimals) < (6) ? (item->decimals) : (6))) == 0' failed in Datetime_truncation_not_needed::Datetime_truncation_not_needed
+--echo #
+
+SET @@timestamp= UNIX_TIMESTAMP('2022-07-21 23:00:00');
+
+SELECT DATE_SUB('2022-07-21 00:00:00', INTERVAL 800 HOUR) AS expected_result;
+
+SELECT
+ IF(1,TIMEDIFF('38:59:59','839:00:00'),CAST('2022-12-12' AS DATE)) AS c1,
+ IF(1,TIMEDIFF('-839:00:00','-38:59:59'),CAST('2022-12-12' AS DATE)) AS c2;
+
+SELECT
+ IF(1,TIMEDIFF(385959,8390000),CAST('2022-12-12' AS DATE)) AS c1,
+ IF(1,TIMEDIFF(-8390000,-385959),CAST('2022-12-12' AS DATE)) AS c2;
+
+SELECT
+ TIMEDIFF('38:59:59','839:00:00') AS c1,
+ CAST(TIMEDIFF('38:59:59','839:00:00') AS TIME(6)) AS c2,
+ TIMEDIFF('839:00:00','38:59:59') AS c3,
+ CAST(TIMEDIFF('839:00:00','38:59:59') AS TIME(6)) AS c4;
+
+SELECT
+ TIMEDIFF(385959,8390000) AS c1,
+ CAST(TIMEDIFF(385959,8390000) AS TIME(6)) AS c2,
+ TIMEDIFF(8390000,385959) AS c3,
+ CAST(TIMEDIFF(8390000,385959) AS TIME(6)) AS c4;
+
+SET @@timestamp= DEFAULT;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #