diff options
author | Michael Widenius <monty@askmonty.org> | 2012-03-23 18:22:39 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2012-03-23 18:22:39 +0200 |
commit | c36bdf1c889539413d5369ae628aff97d044b276 (patch) | |
tree | d53d59e615088a42a15e4eaae85b20acf6e2fe2a /sql/sql_handler.cc | |
parent | 8e825a2249440e7df0fce0123f6d543b09b29194 (diff) | |
download | mariadb-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_handler.cc')
-rw-r--r-- | sql/sql_handler.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index 4f1c63930d6..47d78abdb68 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -827,7 +827,8 @@ retry: goto ok; } /* Generate values for virtual fields */ - update_virtual_fields(thd, table); + if (table->vfield) + update_virtual_fields(thd, table); if (cond && !cond->val_int()) continue; if (num_rows >= offset_limit_cnt) |