mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
SQL: fix for lost code in debug macros
This commit is contained in:
committed by
Aleksey Midenkov
parent
d8c8d7b946
commit
bd0b21d22c
@ -1029,12 +1029,8 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
|
||||
}
|
||||
}
|
||||
|
||||
if (table->versioned() &&
|
||||
table->vers_update_fields())
|
||||
{
|
||||
error= 1;
|
||||
break;
|
||||
}
|
||||
if (table->versioned())
|
||||
table->vers_update_fields();
|
||||
|
||||
if ((res= table_list->view_check_option(thd,
|
||||
(values_list.elements == 1 ?
|
||||
@ -3799,9 +3795,8 @@ int select_insert::send_data(List<Item> &values)
|
||||
DBUG_RETURN(0);
|
||||
|
||||
thd->count_cuted_fields= CHECK_FIELD_WARN; // Calculate cuted fields
|
||||
if (table->versioned() &&
|
||||
table->vers_update_fields())
|
||||
DBUG_RETURN(1);
|
||||
if (table->versioned())
|
||||
table->vers_update_fields();
|
||||
store_values(values);
|
||||
if (table->default_field && table->update_default_fields(0, info.ignore))
|
||||
DBUG_RETURN(1);
|
||||
|
@ -763,11 +763,8 @@ int mysql_update(THD *thd,
|
||||
TRG_EVENT_UPDATE))
|
||||
break; /* purecov: inspected */
|
||||
|
||||
if (table->versioned() && table->vers_update_fields())
|
||||
{
|
||||
error= 1;
|
||||
break;
|
||||
}
|
||||
if (table->versioned())
|
||||
table->vers_update_fields();
|
||||
|
||||
found++;
|
||||
|
||||
@ -2173,12 +2170,8 @@ int multi_update::send_data(List<Item> ¬_used_values)
|
||||
if (table->default_field && table->update_default_fields(1, ignore))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
if (table->versioned() &&
|
||||
table->vers_update_fields())
|
||||
{
|
||||
error= 1;
|
||||
break;
|
||||
}
|
||||
if (table->versioned())
|
||||
table->vers_update_fields();
|
||||
|
||||
if ((error= cur_table->view_check_option(thd, ignore)) !=
|
||||
VIEW_CHECK_OK)
|
||||
@ -2514,11 +2507,8 @@ int multi_update::do_updates()
|
||||
goto err2;
|
||||
}
|
||||
}
|
||||
if (table->versioned() &&
|
||||
table->vers_update_fields())
|
||||
{
|
||||
goto err2;
|
||||
}
|
||||
if (table->versioned())
|
||||
table->vers_update_fields();
|
||||
|
||||
if ((local_error=table->file->ha_update_row(table->record[1],
|
||||
table->record[0])) &&
|
||||
|
11
sql/table.cc
11
sql/table.cc
@ -7564,18 +7564,21 @@ int TABLE::update_default_fields(bool update_command, bool ignore_errors)
|
||||
DBUG_RETURN(res);
|
||||
}
|
||||
|
||||
bool TABLE::vers_update_fields()
|
||||
void TABLE::vers_update_fields()
|
||||
{
|
||||
DBUG_ENTER("vers_update_fields");
|
||||
|
||||
DBUG_ASSERT(versioned());
|
||||
DBUG_ASSERT(!vers_start_field()->set_time());
|
||||
DBUG_ASSERT(!vers_end_field()->set_max_timestamp());
|
||||
bool res= !vers_start_field()->set_time();
|
||||
DBUG_ASSERT(res);
|
||||
res= !vers_end_field()->set_max_timestamp();
|
||||
DBUG_ASSERT(res);
|
||||
(void)res;
|
||||
|
||||
bitmap_set_bit(write_set, vers_start_field()->field_index);
|
||||
bitmap_set_bit(write_set, vers_end_field()->field_index);
|
||||
|
||||
DBUG_RETURN(FALSE);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1465,7 +1465,7 @@ public:
|
||||
int update_virtual_field(Field *vf);
|
||||
int update_virtual_fields(handler *h, enum_vcol_update_mode update_mode);
|
||||
int update_default_fields(bool update, bool ignore_errors);
|
||||
bool vers_update_fields();
|
||||
void vers_update_fields();
|
||||
void reset_default_fields();
|
||||
inline ha_rows stat_records() { return used_stat_records; }
|
||||
|
||||
|
Reference in New Issue
Block a user