diff options
author | igor@rurik.mysql.com <> | 2006-10-31 17:31:56 -0800 |
---|---|---|
committer | igor@rurik.mysql.com <> | 2006-10-31 17:31:56 -0800 |
commit | 2a7acba7e10197ec4a651ae828ff51c0a2ff4747 (patch) | |
tree | b8cf0e80a37eba77a6cccf9e41a8871266533675 /sql/sql_show.cc | |
parent | 17eb0b353e5a112e1d0005b71190c1e3278e0583 (diff) | |
download | mariadb-git-2a7acba7e10197ec4a651ae828ff51c0a2ff4747.tar.gz |
Fixed bug #21727.
This is a performance issue for queries with subqueries evaluation
of which requires filesort.
Allocation of memory for the sort buffer at each evaluation of a
subquery may take a significant amount of time if the buffer is rather big.
With the fix we allocate the buffer at the first evaluation of the
subquery and reuse it at each subsequent evaluation.
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index eb78f4fbdae..6367be4a1d4 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -3977,7 +3977,7 @@ bool get_schema_tables_result(JOIN *join) table_list->table->file->extra(HA_EXTRA_RESET_STATE); table_list->table->file->delete_all_rows(); free_io_cache(table_list->table); - filesort_free_buffers(table_list->table); + filesort_free_buffers(table_list->table,1); table_list->table->null_row= 0; } else |