diff options
author | unknown <monty@mysql.com> | 2005-02-22 15:47:00 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-02-22 15:47:00 +0200 |
commit | ce99d4430f71a0e83298e67f2e33b660630c715d (patch) | |
tree | 775f6aaae95a3574b8d285d2433c3797b653e482 /sql/sql_derived.cc | |
parent | 6965e72bd07874efee8ff6f94ab664533fc422e0 (diff) | |
parent | 2ae6eb094bb02a3e41ab611c9e9f27982a2ef9c3 (diff) | |
download | mariadb-git-ce99d4430f71a0e83298e67f2e33b660630c715d.tar.gz |
Merge with 4.1
BitKeeper/etc/logging_ok:
auto-union
client/mysql.cc:
Auto merged
extra/my_print_defaults.c:
Auto merged
include/m_string.h:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/r/user_var.result:
Auto merged
mysql-test/t/user_var.test:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
strings/ctype-simple.c:
Auto merged
strings/ctype-ucs2.c:
Auto merged
strings/ctype-utf8.c:
Auto merged
libmysql/libmysql.c:
ul
mysql-test/r/ps_1general.result:
Merge
mysql-test/t/derived.test:
Merge
mysql-test/t/ps_1general.test:
Merge
mysql-test/t/type_float.test:
Merge
sql/field.cc:
ul
sql/item.cc:
ul
sql/item.h:
ul
sql/item_func.h:
ul
sql/item_strfunc.cc:
ul
sql/item_sum.cc:
ul
sql/item_sum.h:
ul
sql/procedure.h:
ul
sql/sql_derived.cc:
Trivial merge
sql/sql_parse.cc:
ul
sql/sql_update.cc:
Trivial merge
strings/strtod.c:
Use updated code from 4.1
This is bascily same code as we had before or 5.0, execpt that we now have higher accuracy for floating points value that are integers (like 123.45E+02)
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r-- | sql/sql_derived.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index c01728e68d5..eb7b3e8a319 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -124,10 +124,16 @@ int mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *orig_table_list) /* Temp table is created so that it hounours if UNION without ALL is to be processed + + As 'distinct' parameter we always pass FALSE (0), because underlying + query will control distinct condition by itself. Correct test of + distinct underlying query will be is_union && + !unit->union_distinct->next_select() (i.e. it is union and last distinct + SELECT is last SELECT of UNION). */ if (!(table= create_tmp_table(thd, &derived_result->tmp_table_param, unit->types, (ORDER*) 0, - is_union && unit->union_distinct, 1, + FALSE, 1, (first_select->options | thd->options | TMP_TABLE_ALL_COLUMNS), HA_POS_ERROR, |