diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index cb2b3a3a4e0..73535c2cd92 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -4193,7 +4193,6 @@ int select_insert::send_data(List &values) bool error=0; thd->count_cuted_fields= CHECK_FIELD_WARN; // Calculate cuted fields - table->reset_default_fields(); store_values(values); if (table->default_field && unlikely(table->update_default_fields(info.ignore))) diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 489835c0a5f..fe574db528f 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -1106,7 +1106,6 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, } } restore_record(table, s->default_values); - table->reset_default_fields(); while ((item= it++)) { diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 033f98fd719..f56ec5c83c9 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -51,7 +51,7 @@ compare_record(TABLE*). */ bool records_are_comparable(const TABLE *table) { - return !table->versioned(VERS_TRX_ID) && + return !table->versioned() && (((table->file->ha_table_flags() & HA_PARTIAL_COLUMN_READ) == 0) || bitmap_is_subset(table->write_set, table->read_set)); } diff --git a/sql/table.cc b/sql/table.cc index 828bccf0927..c85cfa203a2 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -9164,13 +9164,11 @@ bool TABLE::vers_update_fields() { DBUG_ASSERT(0); } - vers_start_field()->set_has_explicit_value(); } if (!versioned(VERS_TIMESTAMP) || !vers_end_field()->has_explicit_value()) { vers_end_field()->set_max(); - vers_end_field()->set_has_explicit_value(); res= true; } @@ -9185,7 +9183,6 @@ void TABLE::vers_update_end() if (vers_end_field()->store_timestamp(in_use->query_start(), in_use->query_start_sec_part())) DBUG_ASSERT(0); - vers_end_field()->set_has_explicit_value(); } /**