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() &&
|
if (table->versioned())
|
||||||
table->vers_update_fields())
|
table->vers_update_fields();
|
||||||
{
|
|
||||||
error= 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((res= table_list->view_check_option(thd,
|
if ((res= table_list->view_check_option(thd,
|
||||||
(values_list.elements == 1 ?
|
(values_list.elements == 1 ?
|
||||||
@ -3799,9 +3795,8 @@ int select_insert::send_data(List<Item> &values)
|
|||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
|
|
||||||
thd->count_cuted_fields= CHECK_FIELD_WARN; // Calculate cuted fields
|
thd->count_cuted_fields= CHECK_FIELD_WARN; // Calculate cuted fields
|
||||||
if (table->versioned() &&
|
if (table->versioned())
|
||||||
table->vers_update_fields())
|
table->vers_update_fields();
|
||||||
DBUG_RETURN(1);
|
|
||||||
store_values(values);
|
store_values(values);
|
||||||
if (table->default_field && table->update_default_fields(0, info.ignore))
|
if (table->default_field && table->update_default_fields(0, info.ignore))
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
|
@ -763,11 +763,8 @@ int mysql_update(THD *thd,
|
|||||||
TRG_EVENT_UPDATE))
|
TRG_EVENT_UPDATE))
|
||||||
break; /* purecov: inspected */
|
break; /* purecov: inspected */
|
||||||
|
|
||||||
if (table->versioned() && table->vers_update_fields())
|
if (table->versioned())
|
||||||
{
|
table->vers_update_fields();
|
||||||
error= 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
found++;
|
found++;
|
||||||
|
|
||||||
@ -2173,12 +2170,8 @@ int multi_update::send_data(List<Item> ¬_used_values)
|
|||||||
if (table->default_field && table->update_default_fields(1, ignore))
|
if (table->default_field && table->update_default_fields(1, ignore))
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
|
|
||||||
if (table->versioned() &&
|
if (table->versioned())
|
||||||
table->vers_update_fields())
|
table->vers_update_fields();
|
||||||
{
|
|
||||||
error= 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((error= cur_table->view_check_option(thd, ignore)) !=
|
if ((error= cur_table->view_check_option(thd, ignore)) !=
|
||||||
VIEW_CHECK_OK)
|
VIEW_CHECK_OK)
|
||||||
@ -2514,11 +2507,8 @@ int multi_update::do_updates()
|
|||||||
goto err2;
|
goto err2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (table->versioned() &&
|
if (table->versioned())
|
||||||
table->vers_update_fields())
|
table->vers_update_fields();
|
||||||
{
|
|
||||||
goto err2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((local_error=table->file->ha_update_row(table->record[1],
|
if ((local_error=table->file->ha_update_row(table->record[1],
|
||||||
table->record[0])) &&
|
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);
|
DBUG_RETURN(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TABLE::vers_update_fields()
|
void TABLE::vers_update_fields()
|
||||||
{
|
{
|
||||||
DBUG_ENTER("vers_update_fields");
|
DBUG_ENTER("vers_update_fields");
|
||||||
|
|
||||||
DBUG_ASSERT(versioned());
|
DBUG_ASSERT(versioned());
|
||||||
DBUG_ASSERT(!vers_start_field()->set_time());
|
bool res= !vers_start_field()->set_time();
|
||||||
DBUG_ASSERT(!vers_end_field()->set_max_timestamp());
|
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_start_field()->field_index);
|
||||||
bitmap_set_bit(write_set, vers_end_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_field(Field *vf);
|
||||||
int update_virtual_fields(handler *h, enum_vcol_update_mode update_mode);
|
int update_virtual_fields(handler *h, enum_vcol_update_mode update_mode);
|
||||||
int update_default_fields(bool update, bool ignore_errors);
|
int update_default_fields(bool update, bool ignore_errors);
|
||||||
bool vers_update_fields();
|
void vers_update_fields();
|
||||||
void reset_default_fields();
|
void reset_default_fields();
|
||||||
inline ha_rows stat_records() { return used_stat_records; }
|
inline ha_rows stat_records() { return used_stat_records; }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user