diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2017-01-18 11:44:47 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2017-01-18 11:44:47 -0500 |
commit | a3a91332d006fd39a32e1f6d4663e11515ea944b (patch) | |
tree | 560c152c9f8146a4c1bcd52ad2a2fa454be48aec /mysql-test/t/date_formats.test | |
parent | 2805baf06c31dac21604148ec089300461790e3d (diff) | |
download | mariadb-git-bb-10.2-mdev7635.final.tar.gz |
MDEV-7635: Update tests to adapt to the new default sql_modebb-10.2-mdev7635.savedbb-10.2-mdev7635.final
Diffstat (limited to 'mysql-test/t/date_formats.test')
-rw-r--r-- | mysql-test/t/date_formats.test | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test index 972543aefc2..06f933e4939 100644 --- a/mysql-test/t/date_formats.test +++ b/mysql-test/t/date_formats.test @@ -236,18 +236,28 @@ drop table t1; --disable_ps_protocol select str_to_date("2003-....01ABCD-02 10:11:12.0012", "%Y-%.%m%@-%d %H:%i:%S.%f") as a; - +--error ER_WRONG_VALUE_FOR_TYPE +create table t1 select str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S.%f") as f1, + str_to_date("10:11:12.0012", "%H:%i:%S.%f") as f2, + str_to_date("2003-01-02", "%Y-%m-%d") as f3, + str_to_date("02", "%d") as f4, str_to_date("02 10", "%d %H") as f5; +set sql_mode = 'NO_ENGINE_SUBSTITUTION'; create table t1 select str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S.%f") as f1, str_to_date("10:11:12.0012", "%H:%i:%S.%f") as f2, str_to_date("2003-01-02", "%Y-%m-%d") as f3, str_to_date("02", "%d") as f4, str_to_date("02 10", "%d %H") as f5; +set sql_mode = DEFAULT; describe t1; select * from t1; drop table t1; create table t1 select "02 10" as a, "%d %H" as b; select str_to_date(a,b) from t1; +--error ER_WRONG_VALUE_FOR_TYPE +create table t2 select str_to_date(a,b) from t1; +set sql_mode = 'NO_ENGINE_SUBSTITUTION'; create table t2 select str_to_date(a,b) from t1; +set sql_mode = DEFAULT; describe t2; select str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S.%f") as f1, str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S") as f2, |