diff options
| author | Alexander Barkov <bar@mariadb.com> | 2023-02-14 13:27:46 +0400 |
|---|---|---|
| committer | Alexander Barkov <bar@mariadb.com> | 2023-02-14 18:36:40 +0400 |
| commit | fec3696fef6fb5a0be5f78632c056382f227e778 (patch) | |
| tree | d869e7cbd8e48c2778b2b236b291caebe45383c2 /mysql-test/main/func_time.test | |
| parent | 8c1ad2a9fe940376d7cb79515685138e3591e5b7 (diff) | |
| download | mariadb-git-bb-11.0-bar-MDEV-15751.tar.gz | |
MDEV-15751 CURRENT_TIMESTAMP should return a TIMESTAMP [WITH TIME ZONE?]bb-11.0-bar-MDEV-15751
Diffstat (limited to 'mysql-test/main/func_time.test')
| -rw-r--r-- | mysql-test/main/func_time.test | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/mysql-test/main/func_time.test b/mysql-test/main/func_time.test index b0b9eb5c63c..9f214037347 100644 --- a/mysql-test/main/func_time.test +++ b/mysql-test/main/func_time.test @@ -3254,3 +3254,51 @@ SELECT CONCAT(MAKETIME('01', '01', LEAST( -100, NULL ))); --echo # SELECT FROM_UNIXTIME(LEAST(3696610869, NULL)); + +--echo # +--echo # MDEV-15751 CURRENT_TIMESTAMP should return a TIMESTAMP [WITH TIME ZONE?] +--echo # + +CREATE TABLE t1 AS +SELECT + current_timestamp(), + current_timestamp(0), + current_timestamp(1), + current_timestamp(2), + current_timestamp(3), + current_timestamp(4), + current_timestamp(5), + current_timestamp(6); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 AS +SELECT + sysdate(), + sysdate(0), + sysdate(1), + sysdate(2), + sysdate(3), + sysdate(4), + sysdate(5), + sysdate(6); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 AS +SELECT + from_unixtime(1000000e0), + from_unixtime(1000000), + from_unixtime(1000000.1), + from_unixtime(1000000.12), + from_unixtime(1000000.123), + from_unixtime(1000000.1234), + from_unixtime(1000000.12345), + from_unixtime(1000000.123456), + from_unixtime(1000000.1234567), + from_unixtime(1000000.12345678), + from_unixtime(1000000.123456789), + from_unixtime(1000000.1234567891), + from_unixtime(1000000.12345678912); +SHOW CREATE TABLE t1; +DROP TABLE t1; |
