mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 23:54:31 +02:00
Merge polly.local:/tmp/maint/bug11655/my50-bug11655
into polly.local:/tmp/maint/bug11655/my51-bug11655 include/my_time.h: Auto merged mysql-test/r/func_sapdb.result: Auto merged sql-common/my_time.c: Auto merged sql/field.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/time.cc: Auto merged mysql-test/r/func_time.result: Manually merged mysql-test/t/func_time.test: Manually merged
This commit is contained in:
commit
186b831244
8 changed files with 425 additions and 93 deletions
|
|
@ -447,6 +447,47 @@ show create table t1;
|
|||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #11655: Wrong time is returning from nested selects - maximum time exists
|
||||
#
|
||||
# check if SEC_TO_TIME() handles out-of-range values correctly
|
||||
SELECT SEC_TO_TIME(3300000);
|
||||
SELECT SEC_TO_TIME(3300000)+0;
|
||||
SELECT SEC_TO_TIME(3600 * 4294967296);
|
||||
|
||||
# check if TIME_TO_SEC() handles out-of-range values correctly
|
||||
SELECT TIME_TO_SEC('916:40:00');
|
||||
|
||||
# check if ADDTIME() handles out-of-range values correctly
|
||||
SELECT ADDTIME('500:00:00', '416:40:00');
|
||||
SELECT ADDTIME('916:40:00', '416:40:00');
|
||||
|
||||
# check if SUBTIME() handles out-of-range values correctly
|
||||
SELECT SUBTIME('916:40:00', '416:40:00');
|
||||
SELECT SUBTIME('-916:40:00', '416:40:00');
|
||||
|
||||
# check if MAKETIME() handles out-of-range values correctly
|
||||
SELECT MAKETIME(916,0,0);
|
||||
SELECT MAKETIME(4294967296, 0, 0);
|
||||
SELECT MAKETIME(-4294967296, 0, 0);
|
||||
SELECT MAKETIME(0, 4294967296, 0);
|
||||
SELECT MAKETIME(0, 0, 4294967296);
|
||||
SELECT MAKETIME(CAST(-1 AS UNSIGNED), 0, 0);
|
||||
|
||||
# check if EXTRACT() handles out-of-range values correctly
|
||||
SELECT EXTRACT(HOUR FROM '100000:02:03');
|
||||
|
||||
# check if we get proper warnings if both input string truncation
|
||||
# and out-of-range value occur
|
||||
CREATE TABLE t1(f1 TIME);
|
||||
INSERT INTO t1 VALUES('916:00:00 a');
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #20927: sec_to_time treats big unsigned as signed
|
||||
#
|
||||
# check if SEC_TO_TIME() handles BIGINT UNSIGNED values correctly
|
||||
SELECT SEC_TO_TIME(CAST(-1 AS UNSIGNED));
|
||||
# Bug #19844 time_format in Union truncates values
|
||||
#
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue