List:Commits« Previous MessageNext Message »
From:mhansson Date:January 23 2007 9:12am
Subject:bk commit into 5.1 tree (mhansson:1.2383)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of martin. When martin 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@stripped, 2007-01-23 09:12:33+01:00, mhansson@stripped +3 -0
  Merge linux-st28.site:/home/martin/mysql/src/5.1o-virgin
  into  linux-st28.site:/home/martin/mysql/src/5.1o-dbg-bug20604
  MERGE: 1.2343.16.3

  sql/sql_base.cc@stripped, 2007-01-23 09:12:23+01:00, mhansson@stripped +0 -0
    Auto merged
    MERGE: 1.368.1.1

  sql/sql_select.cc@stripped, 2007-01-23 09:12:24+01:00, mhansson@stripped +0 -0
    Auto merged
    MERGE: 1.473.1.1

  sql/table.h@stripped, 2007-01-23 09:12:25+01:00, mhansson@stripped +0 -0
    Auto merged
    MERGE: 1.155.1.1

# 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:	mhansson
# Host:	linux-st28.site
# Root:	/home/martin/mysql/src/5.1o-dbg-bug20604/RESYNC

--- 1.370/sql/sql_base.cc	2006-12-31 01:06:35 +01:00
+++ 1.371/sql/sql_base.cc	2007-01-23 09:12:23 +01:00
@@ -5451,6 +5451,7 @@
     {
       key_map map;
       get_key_map_from_key_list(&map, table, table_list->use_index);
+      map.intersect(table->s->keys_in_use);
       if (map.is_set_all())
 	DBUG_RETURN(1);
       table->keys_in_use_for_query=map;

--- 1.477/sql/sql_select.cc	2007-01-08 11:31:02 +01:00
+++ 1.478/sql/sql_select.cc	2007-01-23 09:12:24 +01:00
@@ -2440,7 +2440,7 @@
 
   /* 
     Update info on indexes that can be used for search lookups as
-    reading const tables may has added new sargable predicates. 
+    reading const tables may have added new sargable predicates. 
   */
   if (const_count && sargables)
   {
@@ -12222,10 +12222,9 @@
   /*
     Check which keys can be used to resolve ORDER BY.
     We must not try to use disabled keys.
+    We must not consider keys that are disabled by IGNORE INDEX
   */
-  usable_keys= table->s->keys_in_use;
-  /* we must not consider keys that are disabled by IGNORE INDEX */
-  usable_keys.intersect(table->keys_in_use_for_query);
+  usable_keys= table->keys_in_use_for_query;
 
   for (ORDER *tmp_order=order; tmp_order ; tmp_order=tmp_order->next)
   {

--- 1.157/sql/table.h	2006-12-31 01:06:37 +01:00
+++ 1.158/sql/table.h	2007-01-23 09:12:25 +01:00
@@ -158,7 +158,11 @@
   LEX_STRING path;                	/* Path to .frm file (from datadir) */
   LEX_STRING normalized_path;		/* unpack_filename(path) */
   LEX_STRING connect_string;
-  key_map keys_in_use;                  /* Keys in use for table */
+
+  /* Set of keys in use for table, implemented as Bitmap.
+     Excludes keys disabled by ALTER TABLE ... DISABLE KEYS.
+   */
+  key_map keys_in_use;
   key_map keys_for_keyread;
   ha_rows min_rows, max_rows;		/* create information */
   ulong   avg_row_length;		/* create information */
@@ -179,6 +183,7 @@
   uint fields;				/* Number of fields */
   uint rec_buff_length;                 /* Size of table->record[] buffer */
   uint keys, key_parts;
+
   uint max_key_length, max_unique_length, total_key_length;
   uint uniques;                         /* Number of UNIQUE index */
   uint null_fields;			/* number of null fields */
@@ -313,7 +318,22 @@
   byte *write_row_record;		/* Used as optimisation in
 					   THD::write_row */
   byte *insert_values;                  /* used by INSERT ... UPDATE */
-  key_map quick_keys, used_keys, keys_in_use_for_query, merge_keys;
+
+  /*
+    A set of keys that can be used in the query where this table 
+    participates.
+
+    All indexes disabled on the table's TABLE_SHARE (see st_table.s)
+    will be subtracted from this set upon instantiation, i.e. for any 
+    st_table t it holds that t.keys_in_use_for_query is a subset of 
+    t.s.keys_in_use.
+
+    The set is implemented as a bitmap.
+   */
+  key_map keys_in_use_for_query;
+
+  key_map used_keys, quick_keys, merge_keys;
+
   KEY  *key_info;			/* data of keys in database */
 
   Field *next_number_field;		/* Set if next_number is activated */
Thread
bk commit into 5.1 tree (mhansson:1.2383)mhansson23 Jan