summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorJustin.He/justin.he@dev3-240.dev.cn.tlan <>2007-04-05 12:26:01 +0800
committerJustin.He/justin.he@dev3-240.dev.cn.tlan <>2007-04-05 12:26:01 +0800
commit10dffc5a1917b9f5d7cd7c45e20446490a19a3bd (patch)
tree396ac36ed6b03ffd28556e94d00380df8db47243 /sql/sql_update.cc
parent343bfb779d9f85cb8d5fec1c76e8898291718d11 (diff)
parentfdf57c7ac2fd52f254daa6b6b11017d480d257aa (diff)
downloadmariadb-git-10dffc5a1917b9f5d7cd7c45e20446490a19a3bd.tar.gz
Merge dev3-240.dev.cn.tlan:/home/justin.he/mysql/mysql-5.1/mysql-5.1-new-ndb
into dev3-240.dev.cn.tlan:/home/justin.he/mysql/mysql-5.1/mysql-5.1-new-ndb-bj.merge
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 19c171b1be0..56c952f34ce 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -201,8 +201,10 @@ int mysql_update(THD *thd,
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);
}
}