summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2003-03-07 11:58:07 +0100
committerunknown <serg@serg.mysql.com>2003-03-07 11:58:07 +0100
commit6b941726f93cba01b3897ee463e146c5a41cfe76 (patch)
tree35cdbda06dfbd7ef7f8f37c4769198f83aa0abfa /mysql-test
parent19a5b45477f440f19d650c0e0fcd9554ac09151c (diff)
parent5776261a3e49cef823823341cb8b8bea7b2cba16 (diff)
downloadmariadb-git-6b941726f93cba01b3897ee463e146c5a41cfe76.tar.gz
Merge work:/home/bk/mysql-4.0
into serg.mysql.com:/usr/home/serg/Abk/mysql-4.0 sql/mysqld.cc: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/type_timestamp.result20
-rw-r--r--mysql-test/t/type_timestamp.test14
2 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result
index 088f3b205b9..3d5d74709c1 100644
--- a/mysql-test/r/type_timestamp.result
+++ b/mysql-test/r/type_timestamp.result
@@ -84,3 +84,23 @@ date date_time time_stamp
2005-01-01 2005-01-01 00:00:00 20050101000000
2030-01-01 2030-01-01 00:00:00 20300101000000
drop table t1;
+show variables like 'new';
+Variable_name Value
+new OFF
+create table t1 (t2 timestamp(2), t4 timestamp(4), t6 timestamp(6),
+t8 timestamp(8), t10 timestamp(10), t12 timestamp(12),
+t14 timestamp(14));
+insert t1 values (0,0,0,0,0,0,0),
+("1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59",
+"1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59",
+"1997-12-31 23:47:59");
+select * from t1;
+t2 t4 t6 t8 t10 t12 t14
+00 0000 000000 00000000 0000000000 000000000000 00000000000000
+97 9712 971231 19971231 9712312347 971231234759 19971231234759
+set new=1;
+select * from t1;
+t2 t4 t6 t8 t10 t12 t14
+0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00
+1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59
+drop table t1;
diff --git a/mysql-test/t/type_timestamp.test b/mysql-test/t/type_timestamp.test
index 2929184df93..eb0def74a17 100644
--- a/mysql-test/t/type_timestamp.test
+++ b/mysql-test/t/type_timestamp.test
@@ -55,3 +55,17 @@ INSERT INTO t1 VALUES ("2030-01-01","2030-01-01 00:00:00",20300101000000);
#INSERT INTO t1 VALUES ("2050-01-01","2050-01-01 00:00:00",20500101000000);
SELECT * FROM t1;
drop table t1;
+
+show variables like 'new';
+create table t1 (t2 timestamp(2), t4 timestamp(4), t6 timestamp(6),
+ t8 timestamp(8), t10 timestamp(10), t12 timestamp(12),
+ t14 timestamp(14));
+insert t1 values (0,0,0,0,0,0,0),
+("1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59",
+"1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59",
+"1997-12-31 23:47:59");
+select * from t1;
+set new=1;
+select * from t1;
+drop table t1;
+