summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition.test
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2009-08-12 12:03:05 +0200
committerMattias Jonsson <mattias.jonsson@sun.com>2009-08-12 12:03:05 +0200
commit0c342270a154eebc713be6baeecd16f0514c6c11 (patch)
treef460aa465ae53a1bd1b76d6f4cf144dd0a6957dc /mysql-test/t/partition.test
parent475c64238a615e5720f99437cf320631ffb8e6a5 (diff)
parent89b9fbd4512ca19fa06f05ddee071eb0fdfb5b76 (diff)
downloadmariadb-git-0c342270a154eebc713be6baeecd16f0514c6c11.tar.gz
manual merge
Diffstat (limited to 'mysql-test/t/partition.test')
-rw-r--r--mysql-test/t/partition.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index 0b497d86623..0363327a675 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -15,6 +15,31 @@ drop table if exists t1, t2;
--enable_warnings
#
+# Bug#46478: timestamp field incorrectly defaulted when partition is reorganized
+#
+CREATE TABLE t1 (
+ a timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ b varchar(10),
+ PRIMARY KEY (a)
+)
+PARTITION BY RANGE (to_days(a)) (
+ PARTITION p1 VALUES LESS THAN (733407),
+ PARTITION pmax VALUES LESS THAN MAXVALUE
+);
+
+INSERT INTO t1 VALUES ('2007-07-30 17:35:48', 'p1');
+INSERT INTO t1 VALUES ('2009-07-14 17:35:55', 'pmax');
+INSERT INTO t1 VALUES ('2009-09-21 17:31:42', 'pmax');
+
+SELECT * FROM t1;
+ALTER TABLE t1 REORGANIZE PARTITION pmax INTO (
+ PARTITION p3 VALUES LESS THAN (733969),
+ PARTITION pmax VALUES LESS THAN MAXVALUE);
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+#
# Bug#36001: Partitions: spelling and using some error messages
#
--error ER_FOREIGN_KEY_ON_PARTITIONED