summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-03-23 18:22:39 +0200
committerMichael Widenius <monty@askmonty.org>2012-03-23 18:22:39 +0200
commitc36bdf1c889539413d5369ae628aff97d044b276 (patch)
treed53d59e615088a42a15e4eaae85b20acf6e2fe2a /sql/sql_update.cc
parent8e825a2249440e7df0fce0123f6d543b09b29194 (diff)
downloadmariadb-git-c36bdf1c889539413d5369ae628aff97d044b276.tar.gz
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
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index a921a87884e..cf03cc597c8 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -506,7 +506,8 @@ int mysql_update(THD *thd,
while (!(error=info.read_record(&info)) && !thd->killed)
{
- update_virtual_fields(thd, table);
+ if (table->vfield)
+ update_virtual_fields(thd, table);
thd->examined_row_count++;
if (!select || (error= select->skip_record(thd)) > 0)
{
@@ -621,7 +622,8 @@ int mysql_update(THD *thd,
while (!(error=info.read_record(&info)) && !thd->killed)
{
- update_virtual_fields(thd, table);
+ if (table->vfield)
+ update_virtual_fields(thd, table);
thd->examined_row_count++;
if (!select || select->skip_record(thd) > 0)
{