diff options
author | sergefp@mysql.com <> | 2007-07-31 15:19:06 +0400 |
---|---|---|
committer | sergefp@mysql.com <> | 2007-07-31 15:19:06 +0400 |
commit | c37f9b9e7948f84d2d3aa4f9f6b38d4b2ca4b903 (patch) | |
tree | 60a41568ca63538bab34c0c18863aa163cba4323 /sql/sql_select.cc | |
parent | b38206978dd29149bf414a46b25571633ed778bc (diff) | |
download | mariadb-git-c37f9b9e7948f84d2d3aa4f9f6b38d4b2ca4b903.tar.gz |
BUG#29582: huge memory consumption with union, subselect, joins:
- Don't call mysql_select() several times for the select that enumerates
a temporary table with the results of the UNION. Making this call for
every subquery execution caused O(#enumerated-rows-in-the-outer-query)
memory allocations.
- Instead, call join->reinit() and join->exec(), and
= disable constant table detection for such joins,
= provide special handling for table-less constant subqueries.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index c62a19b2752..ebc48c2967c 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -2416,7 +2416,7 @@ make_join_statistics(JOIN *join, TABLE_LIST *tables, COND *conds, if ((table->s->system || table->file->records <= 1) && ! s->dependent && !(table->file->table_flags() & HA_NOT_EXACT_COUNT) && - !table->fulltext_searched) + !table->fulltext_searched && !join->no_const_tables) { set_position(join,const_count++,s,(KEYUSE*) 0); } |