summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorunknown <sergefp@pylon.mylan>2007-07-31 15:24:22 +0400
committerunknown <sergefp@pylon.mylan>2007-07-31 15:24:22 +0400
commita66cb1f27a61f7e8e604175ede0d50b33ed516e0 (patch)
tree5220c4242f069264b520ca24609734eafe514ba5 /sql/sql_select.h
parenta9610aa0e1cb3a0a36be5084489359e994d72459 (diff)
parent8a68e7d2dc67f9725325bb55ab451806b1f7ce7c (diff)
downloadmariadb-git-a66cb1f27a61f7e8e604175ede0d50b33ed516e0.tar.gz
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into mysql.com:/home/psergey/mysql-5.0-bug29582 sql/sql_select.cc: Auto merged sql/sql_select.h: Auto merged
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index dbd555c16f8..d84fbcb8c2d 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -277,6 +277,14 @@ public:
SELECT_LEX_UNIT *unit;
// select that processed
SELECT_LEX *select_lex;
+ /*
+ TRUE <=> optimizer must not mark any table as a constant table.
+ This is needed for subqueries in form "a IN (SELECT .. UNION SELECT ..):
+ when we optimize the select that reads the results of the union from a
+ temporary table, we must not mark the temp. table as constant because
+ the number of rows in it may vary from one subquery execution to another.
+ */
+ bool no_const_tables;
JOIN *tmp_join; // copy of this JOIN to be used with temporary tables
ROLLUP rollup; // Used with rollup
@@ -406,6 +414,8 @@ public:
tmp_table_param.init();
tmp_table_param.end_write_records= HA_POS_ERROR;
rollup.state= ROLLUP::STATE_NONE;
+
+ no_const_tables= FALSE;
}
int prepare(Item ***rref_pointer_array, TABLE_LIST *tables, uint wind_num,