Bug #46478 | timestamp field incorrectly defaulted when partition is reorganized | ||
---|---|---|---|
Submitted: | 30 Jul 2009 14:46 | Modified: | 16 Sep 2009 8:29 |
Reporter: | Anca Dogaru | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Partitions | Severity: | S3 (Non-critical) |
Version: | 5.1.36 | OS: | Any |
Assigned to: | Mattias Jonsson | CPU Architecture: | Any |
Tags: | current_timestamp, partitioning |
[30 Jul 2009 14:46]
Anca Dogaru
[31 Jul 2009 7:02]
Sveta Smirnova
Thank you for the report. Verified as described.
[5 Aug 2009 15:27]
Mikael Ronström
The change of record data for timestamp records can be avoided by setting table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET in the beginning of fast_alter_partition_table The problem that timestamp records can move due to new timezone is however still an issue, but that's a different bug
[6 Aug 2009 12:29]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/80267 3057 Mattias Jonsson 2009-08-06 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.
[7 Aug 2009 15:58]
Mattias Jonsson
Mikael approved it.
[2 Sep 2009 16:42]
Bugs System
Pushed into 5.1.39 (revid:joro@sun.com-20090902154533-8actmfcsjfqovgsb) (version source revid:mattias.jonsson@sun.com-20090812100305-d325jj82gfeu4mal) (merge vers: 5.1.38) (pib:11)
[3 Sep 2009 15:05]
Jon Stephens
Documented bugfix in the 5.1.39 changelog as follows: A partitioned table having a TIMESTAMP column with a default value of CURRENT_TIMESTAMP and this column was not defined using an ON UPDATE option, an ALTER TABLE ... REORGANIZE PARTITION statement on the table caused the TIMESTAMP column value to be set to CURRENT_TIMESTAMP regardless. Set status to NDI pending merge to 5.4 tree.
[14 Sep 2009 16:05]
Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090914155317-m1g9wodmndzdj4l1) (version source revid:alik@sun.com-20090914155317-m1g9wodmndzdj4l1) (merge vers: 5.4.4-alpha) (pib:11)
[16 Sep 2009 8:29]
Jon Stephens
Bugfix also documented in the 5.4.4 changelog. Closed.
[1 Oct 2009 5:59]
Bugs System
Pushed into 5.1.39-ndb-6.3.28 (revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (version source revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (merge vers: 5.1.39-ndb-6.3.28) (pib:11)
[1 Oct 2009 7:25]
Bugs System
Pushed into 5.1.39-ndb-7.0.9 (revid:jonas@mysql.com-20091001072547-kv17uu06hfjhgjay) (version source revid:jonas@mysql.com-20091001071652-irejtnumzbpsbgk2) (merge vers: 5.1.39-ndb-7.0.9) (pib:11)
[1 Oct 2009 13:25]
Bugs System
Pushed into 5.1.39-ndb-7.1.0 (revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (version source revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (merge vers: 5.1.39-ndb-7.1.0) (pib:11)
[2 Oct 2009 1:23]
Paul DuBois
Moved 5.4 changelog entry from 5.4.4 to 5.4.3.
[5 Oct 2009 10:50]
Bugs System
Pushed into 5.1.39-ndb-6.2.19 (revid:jonas@mysql.com-20091005103850-dwij2dojwpvf5hi6) (version source revid:jonas@mysql.com-20090930185117-bhud4ek1y0hsj1nv) (merge vers: 5.1.39-ndb-6.2.19) (pib:11)