diff options
author | Mattias Jonsson <mattias.jonsson@sun.com> | 2009-08-12 12:03:05 +0200 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@sun.com> | 2009-08-12 12:03:05 +0200 |
commit | abc73040b51372ad8390604da6b88a76c6bcd1fb (patch) | |
tree | f460aa465ae53a1bd1b76d6f4cf144dd0a6957dc /mysql-test/t/partition.test | |
parent | f09fc5000413a4daaa401997968fc8f13def2f2c (diff) | |
parent | dd10de57d37ccc82bad16f451aa4c8db91e694c2 (diff) | |
download | mariadb-git-abc73040b51372ad8390604da6b88a76c6bcd1fb.tar.gz |
manual merge
Diffstat (limited to 'mysql-test/t/partition.test')
-rw-r--r-- | mysql-test/t/partition.test | 25 |
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 |