Below is the list of changes that have just been committed into a local
5.1 repository of justin.he. When justin.he does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-03-22 12:16:52+08:00, Justin.He@stripped +1 -0
Bug#27127, Incorrect behaviour of timestamp column with DEFAULT CURRENT_TIMESTAMP
correct the bitmap_set_bit when a field is timestamp and described
with default CURRENT_TIMESTAMP or on update CURRENT_TIMESTAMP,
then it will reduce a little time cost when the field doesnot need
to write.
sql/sql_update.cc@stripped, 2007-03-22 12:16:49+08:00, Justin.He@stripped +4 -2
here table->timestamp_field represent only the timestamp field related to
CURRENT_TIMESTAMP,
when the timestamp_field_type is 0 or 1, it need not to write the field data further.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: Justin.He
# Host: dev3-240.dev.cn.tlan
# Root: /home/justin.he/mysql/mysql-5.1/bug27127-5.1-new-ndb-bj
--- 1.232/sql/sql_update.cc 2007-03-22 12:17:00 +08:00
+++ 1.233/sql/sql_update.cc 2007-03-22 12:17:00 +08:00
@@ -201,8 +201,10 @@
table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET;
else
{
- bitmap_set_bit(table->write_set,
- table->timestamp_field->field_index);
+ if (table->timestamp_field_type == TIMESTAMP_AUTO_SET_ON_UPDATE ||
+ table->timestamp_field_type == TIMESTAMP_AUTO_SET_ON_BOTH)
+ bitmap_set_bit(table->write_set,
+ table->timestamp_field->field_index);
}
}
| Thread |
|---|
| • bk commit into 5.1 tree (Justin.He:1.2486) BUG#27127 | justin.he | 22 Mar |