diff options
author | Mattias Jonsson <mattias.jonsson@sun.com> | 2009-08-06 14:28:39 +0200 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@sun.com> | 2009-08-06 14:28:39 +0200 |
commit | dd10de57d37ccc82bad16f451aa4c8db91e694c2 (patch) | |
tree | 4e2a7b6557425290774c190c44d3a948ae5d8fb2 /sql/sql_partition.cc | |
parent | 70cd97722d3f9cf8e2e6f3def2ac7f63cf55c5eb (diff) | |
download | mariadb-git-dd10de57d37ccc82bad16f451aa4c8db91e694c2.tar.gz |
Bug#46478: timestamp field incorrectly defaulted
when partition is reoganized.
Problem was that table->timestamp_field_type was not changed
before copying rows between partitions.
fixed by setting it to TIMESTAMP_NO_AUTO_SET as the first thing
in fast_alter_partition_table, so that all if-branches is covered.
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r-- | sql/sql_partition.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index a181a6b3f13..61766e5c509 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -6077,6 +6077,9 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, lpt->pack_frm_len= 0; thd->work_part_info= part_info; + /* Never update timestamp columns when alter */ + table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET; + if (fast_alter_partition & HA_PARTITION_ONE_PHASE) { /* |