diff options
author | unknown <sergefp@mysql.com> | 2005-08-06 21:08:28 +0000 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2005-08-06 21:08:28 +0000 |
commit | 852dcb75973a612ef5c28645018551ed7bd0055c (patch) | |
tree | 3f10d695326e0c90c60ade90588c6342eb72cb17 /sql/sql_union.cc | |
parent | 82f674f9e0c40db21f9c9b211f8e097f9b74498b (diff) | |
download | mariadb-git-852dcb75973a612ef5c28645018551ed7bd0055c.tar.gz |
BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error):
When creating temporary table for UNION, pass TMP_TABLE_FORCE_MYISAM flag to
create_tmp_table if we will be using fulltext function(s) when reading from the
temp. table.
mysql-test/r/fulltext_order_by.result:
Testcase for BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error)
mysql-test/t/fulltext_order_by.test:
Testcase for BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error)
sql/mysql_priv.h:
BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error):
Added TMP_TABLE_FORCE_MYISAM flag
sql/sql_select.cc:
BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error):
In create_tmp_table(), honor the TMP_TABLE_FORCE_MYISAM flag
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index a54fb613fd2..eeb8dfdfef5 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -296,15 +296,23 @@ int 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; + /* + 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. + */ + 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); |