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.
This commit is contained in:
parent
1bcac85f04
commit
0bbae24750
@ -201,6 +201,8 @@ int mysql_update(THD *thd,
|
|||||||
table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET;
|
table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
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,
|
bitmap_set_bit(table->write_set,
|
||||||
table->timestamp_field->field_index);
|
table->timestamp_field->field_index);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user