List:Internals« Previous MessageNext Message »
From:Sergey Petrunia Date:August 7 2005 11:04am
Subject:bk commit into 5.0 tree (sergefp:1.1939)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of psergey. When psergey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1939 05/08/07 11:03:54 sergefp@stripped +5 -0
  Manual merge

  sql/mysql_priv.h
    1.337 05/08/07 11:03:50 sergefp@stripped +0 -1
    Manual merge

  mysql-test/r/fulltext_order_by.result
    1.17 05/08/07 11:03:50 sergefp@stripped +1 -1
    Manual merge

  sql/sql_union.cc
    1.123 05/08/07 11:00:01 sergefp@stripped +0 -0
    Auto merged

  sql/sql_select.cc
    1.350 05/08/07 11:00:01 sergefp@stripped +0 -0
    Auto merged

  mysql-test/t/fulltext_order_by.test
    1.19 05/08/07 11:00:00 sergefp@stripped +0 -0
    Auto merged

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	sergefp
# Host:	newbox.mylan
# Root:	/home/psergey/mysql-5.0-bug11869-part2/RESYNC

--- 1.336/sql/mysql_priv.h	2005-08-04 11:27:48 +00:00
+++ 1.337/sql/mysql_priv.h	2005-08-07 11:03:50 +00:00
@@ -284,6 +284,11 @@
 #define OPTION_SETUP_TABLES_DONE        (1L << 30) // intern
 /* If not set then the thread will ignore all warnings with level notes. */
 #define OPTION_SQL_NOTES                (1L << 31) // THD, user
+/* 
+  Force the used temporary table to be a MyISAM table (because we will use
+  fulltext functions when reading from it.
+*/
+#define TMP_TABLE_FORCE_MYISAM          (1L << 30) 
 
 /*
   Maximum length of time zone name that we support

--- 1.349/sql/sql_select.cc	2005-08-02 19:00:48 +00:00
+++ 1.350/sql/sql_select.cc	2005-08-07 11:00:01 +00:00
@@ -8359,7 +8359,7 @@
   /* If result table is small; use a heap */
   if (blob_count || using_unique_constraint ||
       (select_options & (OPTION_BIG_TABLES | SELECT_SMALL_RESULT)) ==
-      OPTION_BIG_TABLES)
+      OPTION_BIG_TABLES ||(select_options & TMP_TABLE_FORCE_MYISAM))
   {
     table->file=get_new_handler(table,table->s->db_type= DB_TYPE_MYISAM);
     if (group &&

--- 1.122/sql/sql_union.cc	2005-07-06 23:47:54 +00:00
+++ 1.123/sql/sql_union.cc	2005-08-07 11:00:01 +00:00
@@ -295,15 +295,23 @@
         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);

--- 1.16/mysql-test/r/fulltext_order_by.result	2005-07-14 15:52:18 +00:00
+++ 1.17/mysql-test/r/fulltext_order_by.result	2005-08-07 11:03:50 +00:00
@@ -158,5 +158,15 @@
 match(c.beitrag) against ('+abc' in boolean mode)
 order by 
 match(betreff) against ('+abc' in boolean mode) desc;
-ERROR HY000: The used table type doesn't support FULLTEXT indexes
+text	id	betreff
+(select b.id, b.betreff from t3 b) union 
+(select b.id, b.betreff from t3 b) 
+order by match(betreff) against ('+abc' in boolean mode) desc;
+id	betreff
+select distinct b.id, b.betreff from t3 b 
+order by match(betreff) against ('+abc' in boolean mode) desc;
+id	betreff
+select b.id, b.betreff from t3 b group by b.id+1 
+order by match(betreff) against ('+abc' in boolean mode) desc;
+id	betreff
 drop table t1,t2,t3;

--- 1.18/mysql-test/t/fulltext_order_by.test	2005-07-28 13:12:33 +00:00
+++ 1.19/mysql-test/t/fulltext_order_by.test	2005-08-07 11:00:00 +00:00
@@ -135,6 +135,17 @@
 order by 
   match(betreff) against ('+abc' in boolean mode) desc;
 
+# BUG#11869 part2: used table type doesn't support FULLTEXT indexes error
+(select b.id, b.betreff from t3 b) union 
+(select b.id, b.betreff from t3 b) 
+order by match(betreff) against ('+abc' in boolean mode) desc;
+
+select distinct b.id, b.betreff from t3 b 
+order by match(betreff) against ('+abc' in boolean mode) desc;
+
+select b.id, b.betreff from t3 b group by b.id+1 
+order by match(betreff) against ('+abc' in boolean mode) desc;
+
 drop table t1,t2,t3;
 
 # End of 4.1 tests
Thread
bk commit into 5.0 tree (sergefp:1.1939)Sergey Petrunia7 Aug