diff options
author | unknown <sergefp@mysql.com> | 2005-08-07 21:32:26 +0000 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2005-08-07 21:32:26 +0000 |
commit | 7ca7da411e340eee3efbdb8707876ba5dfe4686c (patch) | |
tree | 19c52ad26d2fdf1af81b89c06a0300c8fc241e1c /sql/sql_union.cc | |
parent | 9cd28273aa1d65090fda2702d28a2300d62e653d (diff) | |
parent | f34d542c68068c2912888e967a2d55a2df9a1f0f (diff) | |
download | mariadb-git-7ca7da411e340eee3efbdb8707876ba5dfe4686c.tar.gz |
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-bug11869-part3
BitKeeper/deleted/.del-not_windows.inc:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
mysql-test/t/rpl_flush_tables.test:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql-common/my_time.c:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_union.cc:
Auto merged
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index c414f5e9e72..cdbe8a986b2 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -119,8 +119,6 @@ void st_select_lex_unit::init_prepare_fake_select_lex(THD *thd) { thd->lex->current_select= fake_select_lex; - fake_select_lex->ftfunc_list_alloc.empty(); - fake_select_lex->ftfunc_list= &fake_select_lex->ftfunc_list_alloc; fake_select_lex->table_list.link_in_list((byte *)&result_table_list, (byte **) &result_table_list.next_local); @@ -301,15 +299,24 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, goto err; } } + + ulong create_options= (first_select_in_union()->options | thd_arg->options | + TMP_TABLE_ALL_COLUMNS) & ~TMP_TABLE_FORCE_MYISAM; + /* + Force the temporary table to be a MyISAM table if we're going to use + fullext functions (MATCH ... AGAINST .. IN BOOLEAN MODE) when reading + from it (this should be removed in 5.2 when fulltext search is moved + out of MyISAM). + */ + if (global_parameters->ftfunc_list->elements) + create_options= create_options | TMP_TABLE_FORCE_MYISAM; union_result->tmp_table_param.field_count= types.elements; if (!(table= create_tmp_table(thd_arg, &union_result->tmp_table_param, types, (ORDER*) 0, (bool) union_distinct, 1, - (first_select_in_union()->options | - thd_arg->options | - TMP_TABLE_ALL_COLUMNS), - HA_POS_ERROR, (char *) tmp_table_alias))) + create_options, HA_POS_ERROR, + (char *) tmp_table_alias))) goto err; table->file->extra(HA_EXTRA_WRITE_CACHE); table->file->extra(HA_EXTRA_IGNORE_DUP_KEY); |