List:Commits« Previous MessageNext Message »
From:gluh Date:January 23 2007 12:27pm
Subject:bk commit into 5.1 tree (gluh:1.2396)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of gluh. When gluh 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 16:27:08+04:00, gluh@eagle.(none) +2 -0
  Merge mysql.com:/home/gluh/MySQL/Merge/5.1
  into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
  MERGE: 1.2389.1.3

  sql/sql_select.cc@stripped, 2007-01-23 16:27:05+04:00, gluh@eagle.(none) +0 -0
    Auto merged
    MERGE: 1.478.1.1

  sql/sql_show.cc@stripped, 2007-01-23 16:27:05+04:00, gluh@eagle.(none) +0 -0
    Auto merged
    MERGE: 1.381.1.2

# 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:	gluh
# Host:	eagle.(none)
# Root:	/home/gluh/MySQL/Merge/5.1-opt/RESYNC

--- 1.480/sql/sql_select.cc	2007-01-16 18:22:20 +04:00
+++ 1.481/sql/sql_select.cc	2007-01-23 16:27:05 +04:00
@@ -7722,6 +7722,22 @@ static void update_const_equal_items(CON
         key_map possible_keys= field->key_start;
         possible_keys.intersect(field->table->keys_in_use_for_query);
         stat[0].const_keys.merge(possible_keys);
+
+        /*
+          For each field in the multiple equality (for which we know that it 
+          is a constant) we have to find its corresponding key part, and set 
+          that key part in const_key_parts.
+        */  
+        if (!possible_keys.is_clear_all())
+        {
+          TABLE *tab= field->table;
+          KEYUSE *use;
+          for (use= stat->keyuse; use && use->table == tab; use++)
+            if (possible_keys.is_set(use->key) && 
+                tab->key_info[use->key].key_part[use->keypart].field ==
+                field)
+              tab->const_key_parts[use->key]|= use->keypart_map;
+        }
       }
     }
   }

--- 1.386/sql/sql_show.cc	2007-01-18 21:38:44 +04:00
+++ 1.387/sql/sql_show.cc	2007-01-23 16:27:05 +04:00
@@ -4497,8 +4497,10 @@ get_referential_constraints_record(THD *
                              f_key_info->forein_id->length, cs);
       table->field[4]->store(f_key_info->referenced_db->str, 
                              f_key_info->referenced_db->length, cs);
-      table->field[5]->store(f_key_info->referenced_table->str, 
+      table->field[10]->store(f_key_info->referenced_table->str, 
                              f_key_info->referenced_table->length, cs);
+      table->field[5]->store(f_key_info->referenced_key_name->str, 
+                             f_key_info->referenced_key_name->length, cs);
       table->field[6]->store(STRING_WITH_LEN("NONE"), cs);
       table->field[7]->store(f_key_info->update_method->str, 
                              f_key_info->update_method->length, cs);
@@ -5668,6 +5670,7 @@ ST_FIELD_INFO referential_constraints_fi
   {"UPDATE_RULE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
   {"DELETE_RULE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
   {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
+  {"REFERENCED_TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
   {0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
 };
 
Thread
bk commit into 5.1 tree (gluh:1.2396)gluh23 Jan