mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Speedup:
- Don't call update_virtual_fields() if table->vfield is not set - Don't prealloc memory for in open_tables() as this is very seldom used. sql/records.cc: Don't call update_virtual_fields() if table->vfield is not set sql/sql_base.cc: Don't prealloc memory for in open_tables() as this is very seldom used. Don't call update_virtual_fields() if table->vfield is not set sql/sql_delete.cc: Don't call update_virtual_fields() if table->vfield is not set sql/sql_handler.cc: Don't call update_virtual_fields() if table->vfield is not set sql/sql_join_cache.cc: Don't call update_virtual_fields() if table->vfield is not set Move some frequent values to local variables sql/sql_table.cc: Don't call update_virtual_fields() if table->vfield is not set sql/sql_update.cc: Don't call update_virtual_fields() if table->vfield is not set sql/table.cc: Assert if update_virtual_fields is called with wrong parameters
This commit is contained in:
@ -4706,7 +4706,7 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags)
|
||||
temporary mem_root for new .frm parsing.
|
||||
TODO: variables for size
|
||||
*/
|
||||
init_sql_alloc(&new_frm_mem, 8024, 8024);
|
||||
init_sql_alloc(&new_frm_mem, 8024, 0);
|
||||
|
||||
thd->current_tablenr= 0;
|
||||
restart:
|
||||
@ -8648,14 +8648,9 @@ fill_record(THD * thd, List<Item> &fields, List<Item> &values,
|
||||
}
|
||||
/* Update virtual fields*/
|
||||
thd->abort_on_warning= FALSE;
|
||||
if (vcol_table)
|
||||
{
|
||||
if (vcol_table->vfield)
|
||||
{
|
||||
if (update_virtual_fields(thd, vcol_table, TRUE))
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
if (vcol_table && vcol_table->vfield &&
|
||||
update_virtual_fields(thd, vcol_table, TRUE))
|
||||
goto err;
|
||||
thd->abort_on_warning= save_abort_on_warning;
|
||||
thd->no_errors= save_no_errors;
|
||||
DBUG_RETURN(thd->is_error());
|
||||
|
Reference in New Issue
Block a user