MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:Sergey Petrunia Date:August 7 2005 9:21pm
Subject:bk commit into 5.0 tree (sergefp:1.1940) BUG#11869
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.1940 05/08/07 21:21:30 sergefp@stripped +9 -0
  BUG#11869:part 2: post-review fixes: merging into 5.0
  We're out of bits in st_select_lex->options so make TMP_TABLE_FORCE_MYISAM ==
  OPTION_FOUND_COMMENT (the latter is not used by create_tmp_table).

  sql/sql_union.cc
    1.124 05/08/07 21:21:25 sergefp@stripped +3 -3
    BUG#11869:part 2: post-review fixes: merging into 5.0
    We're out of bits in st_select_lex->options so make TMP_TABLE_FORCE_MYISAM ==
    OPTION_FOUND_COMMENT (the latter is not used by create_tmp_table).

  sql/sql_show.cc
    1.261 05/08/07 21:21:25 sergefp@stripped +2 -1
    BUG#11869:part 2: post-review fixes: merging into 5.0
    We're out of bits in st_select_lex->options so make TMP_TABLE_FORCE_MYISAM ==
    OPTION_FOUND_COMMENT (the latter is not used by create_tmp_table).

  sql/sql_select.cc
    1.351 05/08/07 21:21:25 sergefp@stripped +3 -2
    BUG#11869:part 2: post-review fixes: merging into 5.0
    We're out of bits in st_select_lex->options so make TMP_TABLE_FORCE_MYISAM ==
    OPTION_FOUND_COMMENT (the latter is not used by create_tmp_table).

  sql/sql_derived.cc
    1.74 05/08/07 21:21:25 sergefp@stripped +2 -1
    BUG#11869:part 2: post-review fixes: merging into 5.0
    We're out of bits in st_select_lex->options so make TMP_TABLE_FORCE_MYISAM ==
    OPTION_FOUND_COMMENT (the latter is not used by create_tmp_table).

  sql/mysql_priv.h
    1.338 05/08/07 21:21:25 sergefp@stripped +7 -5
    BUG#11869:part 2: post-review fixes: merging into 5.0
    We're out of bits in st_select_lex->options so make TMP_TABLE_FORCE_MYISAM ==
    OPTION_FOUND_COMMENT (the latter is not used by create_tmp_table).

  sql/item_sum.cc
    1.156 05/08/07 21:21:25 sergefp@stripped +4 -2
    BUG#11869:part 2: post-review fixes: merging into 5.0
    We're out of bits in st_select_lex->options so make TMP_TABLE_FORCE_MYISAM ==
    OPTION_FOUND_COMMENT (the latter is not used by create_tmp_table).

  mysql-test/t/fulltext_order_by.test
    1.20 05/08/07 21:21:25 sergefp@stripped +1 -3
    Drop all tables this test uses

  mysql-test/r/fulltext_order_by.result
    1.18 05/08/07 21:21:25 sergefp@stripped +1 -1
    Drop all tables this test uses

  mysql-test/r/create.result
    1.96 05/08/07 21:21:24 sergefp@stripped +1 -1
    Updated the test result

# 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

--- 1.155/sql/item_sum.cc	2005-08-02 20:17:44 +00:00
+++ 1.156/sql/item_sum.cc	2005-08-07 21:21:25 +00:00
@@ -2275,7 +2275,8 @@
   DBUG_ASSERT(table == 0);
   if (!(table= create_tmp_table(thd, tmp_table_param, list, (ORDER*) 0, 1,
 				0,
-				select_lex->options | thd->options,
+				(select_lex->options | thd->options) & 
+                                ~TMP_TABLE_FORCE_MYISAM,
 				HA_POS_ERROR, (char*)"")))
     return TRUE;
   table->file->extra(HA_EXTRA_NO_ROWS);		// Don't update rows
@@ -3057,7 +3058,8 @@
   */
   if (!(table= create_tmp_table(thd, tmp_table_param, all_fields,
                                 (ORDER*) 0, 0, TRUE,
-                                select_lex->options | thd->options,
+                                (select_lex->options | thd->options) & 
+                                ~TMP_TABLE_FORCE_MYISAM,
                                 HA_POS_ERROR, (char*) "")))
     DBUG_RETURN(TRUE);
   table->file->extra(HA_EXTRA_NO_ROWS);

--- 1.337/sql/mysql_priv.h	2005-08-07 11:03:50 +00:00
+++ 1.338/sql/mysql_priv.h	2005-08-07 21:21:25 +00:00
@@ -256,6 +256,13 @@
 #define OPTION_WARNINGS         (1L << 13)      // THD, user
 #define OPTION_AUTO_IS_NULL     (1L << 14)      // THD, user, binlog
 #define OPTION_FOUND_COMMENT    (1L << 15)      // SELECT, intern, parser
+/* 
+  Force the used temporary table to be a MyISAM table (because we will use
+  fulltext functions when reading from it. This uses the same constant as
+  OPTION_FOUND_COMMENT because we've run out of bits and these two values 
+  are not used together.
+*/
+#define TMP_TABLE_FORCE_MYISAM          (1L << 15)
 #define OPTION_SAFE_UPDATES     (1L << 16)      // THD, user
 #define OPTION_BUFFER_RESULT    (1L << 17)      // SELECT, user
 #define OPTION_BIN_LOG          (1L << 18)      // THD, user
@@ -284,11 +291,6 @@
 #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.350/sql/sql_select.cc	2005-08-07 11:00:01 +00:00
+++ 1.351/sql/sql_select.cc	2005-08-07 21:21:25 +00:00
@@ -1016,7 +1016,7 @@
 			    group_list : (ORDER*) 0),
 			   group_list ? 0 : select_distinct,
 			   group_list && simple_group,
-			   select_options,
+			   select_options & ~TMP_TABLE_FORCE_MYISAM,
 			   (order == 0 || skip_sort_order) ? select_limit :
 			   HA_POS_ERROR,
 			   (char *) "")))
@@ -1396,7 +1396,8 @@
 						(ORDER*) 0,
 						curr_join->select_distinct && 
 						!curr_join->group_list,
-						1, curr_join->select_options,
+						1, curr_join->select_options
+                                                & ~TMP_TABLE_FORCE_MYISAM,
 						HA_POS_ERROR,
 						(char *) "")))
 	  DBUG_VOID_RETURN;

--- 1.260/sql/sql_show.cc	2005-08-02 22:25:26 +00:00
+++ 1.261/sql/sql_show.cc	2005-08-07 21:21:25 +00:00
@@ -3319,7 +3319,8 @@
   if (!(table= create_tmp_table(thd, tmp_table_param,
                                 field_list, (ORDER*) 0, 0, 0, 
                                 (select_lex->options | thd->options |
-                                 TMP_TABLE_ALL_COLUMNS),
+                                 TMP_TABLE_ALL_COLUMNS) &
+                                ~TMP_TABLE_FORCE_MYISAM,
                                 HA_POS_ERROR, table_list->alias)))
     DBUG_RETURN(0);
   table_list->schema_table_param= tmp_table_param;

--- 1.73/sql/sql_derived.cc	2005-07-01 04:05:35 +00:00
+++ 1.74/sql/sql_derived.cc	2005-08-07 21:21:25 +00:00
@@ -142,7 +142,8 @@
 				  unit->types, (ORDER*) 0,
 				  FALSE, 1,
 				  (first_select->options | thd->options |
-				   TMP_TABLE_ALL_COLUMNS),
+				   TMP_TABLE_ALL_COLUMNS) &
+                                   ~TMP_TABLE_FORCE_MYISAM,
 				  HA_POS_ERROR,
 				  orig_table_list->alias)))
     {

--- 1.123/sql/sql_union.cc	2005-08-07 11:00:01 +00:00
+++ 1.124/sql/sql_union.cc	2005-08-07 21:21:25 +00:00
@@ -296,8 +296,8 @@
       }
     }
     
-    ulong create_options= first_select_in_union()->options | thd_arg->options |
-                          TMP_TABLE_ALL_COLUMNS;
+    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
@@ -310,7 +310,7 @@
     if (!(table= create_tmp_table(thd_arg,
 				  &union_result->tmp_table_param, types,
 				  (ORDER*) 0, (bool) union_distinct, 1, 
-                                  create_options, HA_POS_ERROR, 
+                                  create_options, HA_POS_ERROR,
                                   (char *) tmp_table_alias)))
       goto err;
     table->file->extra(HA_EXTRA_WRITE_CACHE);

--- 1.95/mysql-test/r/create.result	2005-08-03 05:29:41 +00:00
+++ 1.96/mysql-test/r/create.result	2005-08-07 21:21:24 +00:00
@@ -606,6 +606,6 @@
 use mysqltest;
 create view v1 as select 'foo' from dual;
 create table t1 like v1;
-ERROR HY000: 'mysqltest.v1' is not a table
+ERROR HY000: 'mysqltest.v1' is not BASE TABLE
 drop view v1;
 drop database mysqltest;

--- 1.17/mysql-test/r/fulltext_order_by.result	2005-08-07 11:03:50 +00:00
+++ 1.18/mysql-test/r/fulltext_order_by.result	2005-08-07 21:21:25 +00:00
@@ -1,4 +1,4 @@
-DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1,t2,t3;
 CREATE TABLE t1 (
 a INT AUTO_INCREMENT PRIMARY KEY,
 message CHAR(20),

--- 1.19/mysql-test/t/fulltext_order_by.test	2005-08-07 11:00:00 +00:00
+++ 1.20/mysql-test/t/fulltext_order_by.test	2005-08-07 21:21:25 +00:00
@@ -1,5 +1,5 @@
 --disable_warnings
-DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1,t2,t3;
 --enable_warnings
 
 CREATE TABLE t1 (
@@ -117,8 +117,6 @@
 order by 
   match(b.betreff) against ('+abc' in boolean mode) desc;
 
--- todo psergey: fix
---error 1214 
 select a.text, b.id, b.betreff
 from 
   t2 a inner join t3 b on a.id = b.forum inner join
Thread
bk commit into 5.0 tree (sergefp:1.1940) BUG#11869Sergey Petrunia7 Aug