diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-06-15 06:33:34 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-06-15 06:33:34 +0400 |
commit | f61909e19e58525583316f8edb55335f094af7dd (patch) | |
tree | 1b00847209f11458a74ce5543099e9cad4e39206 /mysql-test/main/func_time_hires.test | |
parent | 4787913db0b49b4a48e337e6b76b8b6c8233a941 (diff) | |
download | mariadb-git-f61909e19e58525583316f8edb55335f094af7dd.tar.gz |
MDEV-10182 Bad value when inserting COALESCE(CURRENT_TIMESTAMP) into a DECIMAL column
This problem was earlier fixed by the patch cb16d753b2db936afff844cca0dd434fa7fe736b
for MDEV-11337 Split Item::save_in_field() into virtual methods in Type_handler.
Adding tests only.
Diffstat (limited to 'mysql-test/main/func_time_hires.test')
-rw-r--r-- | mysql-test/main/func_time_hires.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/main/func_time_hires.test b/mysql-test/main/func_time_hires.test index 4dcd51a85ba..35fd36b8456 100644 --- a/mysql-test/main/func_time_hires.test +++ b/mysql-test/main/func_time_hires.test @@ -106,3 +106,24 @@ alter table t1 modify f1 varchar(100); select time(f1) from t1; select time(f1) from t1 union all select time(f1 + interval 1 second) from t1; drop table t1; + + +--echo # +--echo # Start of 10.3 tests +--echo # + +--echo # +--echo # MDEV-10182 Bad value when inserting COALESCE(CURRENT_TIMESTAMP) into a DECIMAL column +--echo # + +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.000000'); +CREATE TABLE t1 (a DECIMAL(30,0)); +INSERT INTO t1 VALUES (CURRENT_TIMESTAMP(6)); +INSERT INTO t1 VALUES (COALESCE(CURRENT_TIMESTAMP(6))); +SELECT * FROM t1; +DROP TABLE t1; +SET timestamp=DEFAULT; + +--echo # +--echo # End of 10.3 tests +--echo # |