summaryrefslogtreecommitdiff
path: root/mysql-test/t/strict.test
diff options
context:
space:
mode:
authorunknown <ramil@mysql.com>2005-07-25 14:36:07 +0500
committerunknown <ramil@mysql.com>2005-07-25 14:36:07 +0500
commit17132a93f2bde74f625e860daee655d99c8e81a7 (patch)
treeb350d603071f3551d9f6e63df354fa564a5ecc81 /mysql-test/t/strict.test
parent0eea2a124bd5c8269a5382da9ac82526a5e2f384 (diff)
downloadmariadb-git-17132a93f2bde74f625e860daee655d99c8e81a7.tar.gz
fix (bug #11964: ALTER TABLE gives wrong error message with sql-mode TRADITIONAL (timestamp)).
sql/field.cc: fix (bug #11964: ALTER TABLE gives wrong error message with sql-mode TRADITIONAL (timestamp)). set def only if timestamp fields have explicit default value.
Diffstat (limited to 'mysql-test/t/strict.test')
-rw-r--r--mysql-test/t/strict.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test
index 71b57424e75..ffe2e4e261e 100644
--- a/mysql-test/t/strict.test
+++ b/mysql-test/t/strict.test
@@ -1118,3 +1118,17 @@ insert into t1 values ('2000-10-01');
update t1 set d = 1100;
select * from t1;
drop table t1;
+
+#
+# Bug #11964: alter table with timestamp field
+#
+
+set @@sql_mode='traditional';
+create table t1(a int, b timestamp);
+alter table t1 add primary key(a);
+show create table t1;
+drop table t1;
+create table t1(a int, b timestamp default 20050102030405);
+alter table t1 add primary key(a);
+show create table t1;
+drop table t1;