summaryrefslogtreecommitdiff
path: root/sql/sql_derived.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-03-23 14:43:24 +0100
committerunknown <serg@serg.mylan>2004-03-23 14:43:24 +0100
commitc0a9df1aaedc4a44299398b858021d49ccbfd2ea (patch)
tree303d154fcdcdeb732e85c89c418f9b45836d801e /sql/sql_derived.cc
parent78b4ba746b79ea7d89044e3eecd56338a8f4eb6f (diff)
downloadmariadb-git-c0a9df1aaedc4a44299398b858021d49ccbfd2ea.tar.gz
correct support for a mix of UNION/UNION ALL in the same query.
Bug#1428
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r--sql/sql_derived.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index 4bfb8cdfe3c..ea47ca9f71d 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -138,7 +138,7 @@ static int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit,
*/
if (!(table= create_tmp_table(thd, &derived_result->tmp_table_param,
unit->types, (ORDER*) 0,
- is_union && !unit->union_option, 1,
+ is_union && unit->union_distinct, 1,
(first_select->options | thd->options |
TMP_TABLE_ALL_COLUMNS),
HA_POS_ERROR,