Commit c6d9c36f authored by Alexander Barkov's avatar Alexander Barkov

An additional test for MDEV-4871 Temporal literals do not accept nanoseconds

parent e9ca6861
...@@ -474,3 +474,15 @@ TIMESTAMP('2001-01-01 10:10:10.1234567xyz') ...@@ -474,3 +474,15 @@ TIMESTAMP('2001-01-01 10:10:10.1234567xyz')
2001-01-01 10:10:10.123456 2001-01-01 10:10:10.123456
Warnings: Warnings:
Warning 1292 Truncated incorrect datetime value: '2001-01-01 10:10:10.1234567xyz' Warning 1292 Truncated incorrect datetime value: '2001-01-01 10:10:10.1234567xyz'
CREATE TABLE t1 (a TIME(6));
INSERT INTO t1 VALUES (TIME'10:20:30.1234567');
Warnings:
Note 1292 Truncated incorrect time value: '10:20:30.1234567'
INSERT INTO t1 VALUES (TIME('10:20:30.1234567'));
Warnings:
Note 1292 Truncated incorrect time value: '10:20:30.1234567'
SELECT * FROM t1;
a
10:20:30.123456
10:20:30.123456
DROP TABLE t1;
...@@ -233,3 +233,9 @@ SELECT TIMESTAMP'2001-01-01 10:10:10.123456xyz'; ...@@ -233,3 +233,9 @@ SELECT TIMESTAMP'2001-01-01 10:10:10.123456xyz';
SELECT TIMESTAMP'2001-01-01 10:10:10.1234567xyz'; SELECT TIMESTAMP'2001-01-01 10:10:10.1234567xyz';
SELECT TIMESTAMP('2001-01-01 10:10:10.123456xyz'); SELECT TIMESTAMP('2001-01-01 10:10:10.123456xyz');
SELECT TIMESTAMP('2001-01-01 10:10:10.1234567xyz'); SELECT TIMESTAMP('2001-01-01 10:10:10.1234567xyz');
CREATE TABLE t1 (a TIME(6));
INSERT INTO t1 VALUES (TIME'10:20:30.1234567');
INSERT INTO t1 VALUES (TIME('10:20:30.1234567'));
SELECT * FROM t1;
DROP TABLE t1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment