mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Revert "bugfix: UPDATE and virtual BLOBs"
This reverts commit f73bdb685d
.
This commit is contained in:
@@ -273,7 +273,6 @@ int mysql_update(THD *thd,
|
||||
SORT_INFO *file_sort= 0;
|
||||
READ_RECORD info;
|
||||
SELECT_LEX *select_lex= &thd->lex->select_lex;
|
||||
BLOB_VALUE_ORPHANAGE vblobs;
|
||||
ulonglong id;
|
||||
List<Item> all_fields;
|
||||
killed_state killed_status= NOT_KILLED;
|
||||
@@ -725,8 +724,6 @@ int mysql_update(THD *thd,
|
||||
|
||||
table->reset_default_fields();
|
||||
|
||||
vblobs.init(table);
|
||||
|
||||
/*
|
||||
We can use compare_record() to optimize away updates if
|
||||
the table handler is returning all columns OR if
|
||||
@@ -748,9 +745,6 @@ int mysql_update(THD *thd,
|
||||
|
||||
explain->tracker.on_record_after_where();
|
||||
store_record(table,record[1]);
|
||||
|
||||
vblobs.make_orphans();
|
||||
|
||||
if (fill_record_n_invoke_before_triggers(thd, table, fields, values, 0,
|
||||
TRG_EVENT_UPDATE))
|
||||
break; /* purecov: inspected */
|
||||
@@ -910,9 +904,7 @@ int mysql_update(THD *thd,
|
||||
error= 1;
|
||||
break;
|
||||
}
|
||||
vblobs.free_orphans();
|
||||
}
|
||||
vblobs.free_orphans();
|
||||
ANALYZE_STOP_TRACKING(&explain->command_tracker);
|
||||
table->auto_increment_field_not_null= FALSE;
|
||||
dup_key_found= 0;
|
||||
@@ -1760,8 +1752,6 @@ int multi_update::prepare(List<Item> ¬_used_values,
|
||||
table_count);
|
||||
values_for_table= (List_item **) thd->alloc(sizeof(List_item *) *
|
||||
table_count);
|
||||
vblobs= (BLOB_VALUE_ORPHANAGE *)thd->calloc(sizeof(*vblobs) * table_count);
|
||||
|
||||
if (thd->is_fatal_error)
|
||||
DBUG_RETURN(1);
|
||||
for (i=0 ; i < table_count ; i++)
|
||||
@@ -1794,7 +1784,6 @@ int multi_update::prepare(List<Item> ¬_used_values,
|
||||
TABLE *table= ((Item_field*)(fields_for_table[i]->head()))->field->table;
|
||||
switch_to_nullable_trigger_fields(*fields_for_table[i], table);
|
||||
switch_to_nullable_trigger_fields(*values_for_table[i], table);
|
||||
vblobs[i].init(table);
|
||||
}
|
||||
}
|
||||
copy_field= new Copy_field[max_fields];
|
||||
@@ -2076,8 +2065,6 @@ multi_update::~multi_update()
|
||||
free_tmp_table(thd, tmp_tables[cnt]);
|
||||
tmp_table_param[cnt].cleanup();
|
||||
}
|
||||
vblobs[cnt].free_orphans();
|
||||
vblobs[cnt].free();
|
||||
}
|
||||
}
|
||||
if (copy_field)
|
||||
@@ -2123,9 +2110,7 @@ int multi_update::send_data(List<Item> ¬_used_values)
|
||||
can_compare_record= records_are_comparable(table);
|
||||
|
||||
table->status|= STATUS_UPDATED;
|
||||
vblobs[offset].free_orphans();
|
||||
store_record(table,record[1]);
|
||||
vblobs[offset].make_orphans();
|
||||
if (fill_record_n_invoke_before_triggers(thd, table,
|
||||
*fields_for_table[offset],
|
||||
*values_for_table[offset], 0,
|
||||
@@ -2342,7 +2327,6 @@ int multi_update::do_updates()
|
||||
goto err;
|
||||
}
|
||||
table->file->extra(HA_EXTRA_NO_CACHE);
|
||||
empty_record(table);
|
||||
|
||||
check_opt_it.rewind();
|
||||
while(TABLE *tbl= check_opt_it++)
|
||||
@@ -2416,9 +2400,7 @@ int multi_update::do_updates()
|
||||
goto err2;
|
||||
|
||||
table->status|= STATUS_UPDATED;
|
||||
vblobs[offset].free_orphans();
|
||||
store_record(table,record[1]);
|
||||
vblobs[offset].make_orphans();
|
||||
|
||||
/* Copy data from temporary table to current table */
|
||||
for (copy_field_ptr=copy_field;
|
||||
|
Reference in New Issue
Block a user