Skip to content

Commit

Permalink
cleanup: remove redundant vers_field->set_notnull();
Browse files Browse the repository at this point in the history
as these fields are always declared NOT NULL anyway
  • Loading branch information
vuvova committed Feb 24, 2018
1 parent 8936b17 commit 30981dc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions sql/log_event.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13571,9 +13571,6 @@ int Rows_log_event::find_row(rpl_group_info *rgi)
// check whether master table is unversioned
if (row_end->val_int() == 0)
{
// row_start initialized with NULL when came from plain table.
// Set it notnull() because record_compare() count NULLs.
table->vers_start_field()->set_notnull();
bitmap_set_bit(table->write_set, row_end->field_index);
// Plain source table may have a PRIMARY KEY. And row_end is always
// a part of PRIMARY KEY. Set it to max value for engine to find it in
Expand Down
1 change: 0 additions & 1 deletion sql/sql_insert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1933,7 +1933,6 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
if (table->versioned(VERS_TRX_ID))
{
bitmap_set_bit(table->write_set, table->vers_start_field()->field_index);
table->vers_start_field()->set_notnull();
table->vers_start_field()->store(0, false);
}
if ((error=table->file->ha_update_row(table->record[1],
Expand Down
3 changes: 0 additions & 3 deletions sql/table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7764,14 +7764,12 @@ void TABLE::vers_update_fields()
{
if (!vers_write)
return;
vers_start_field()->set_notnull();
if (vers_start_field()->store_timestamp(in_use->system_time,
in_use->system_time_sec_part))
DBUG_ASSERT(0);
}
else
{
vers_start_field()->set_notnull();
if (!vers_write)
return;
}
Expand All @@ -7782,7 +7780,6 @@ void TABLE::vers_update_fields()

void TABLE::vers_update_end()
{
vers_end_field()->set_notnull();
if (vers_end_field()->store_timestamp(in_use->system_time,
in_use->system_time_sec_part))
DBUG_ASSERT(0);
Expand Down

0 comments on commit 30981dc

Please sign in to comment.