List:Commits« Previous MessageNext Message »
From:reggie Date:January 6 2006 10:21pm
Subject:bk commit into 5.1 tree (rburnett:1.2024)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of rburnett. When rburnett 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.2024 06/01/06 23:21:20 rburnett@stripped +1 -0
  Merge rburnett@stripped:/home/bk/mysql-5.1-new
  into  bk-internal.mysql.com:/users/rburnett/mysql-5.1-wl2682

  sql/sql_base.cc
    1.292 06/01/06 23:21:06 rburnett@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:	rburnett
# Host:	bk-internal.mysql.com
# Root:	/users/rburnett/mysql-5.1-wl2682/RESYNC

--- 1.291/sql/sql_base.cc	2005-12-31 17:45:00 +01:00
+++ 1.292/sql/sql_base.cc	2006-01-06 23:21:06 +01:00
@@ -1703,6 +1703,7 @@
   char	key[MAX_DBKEY_LENGTH];
   uint	key_length;
   char	*alias= table_list->alias;
+  HASH_SEARCH_STATE state;
   DBUG_ENTER("open_table");
 
   /* find a unused table in the open table cache */
@@ -1863,9 +1864,11 @@
   if (thd->handler_tables)
     mysql_ha_flush(thd, (TABLE_LIST*) NULL, MYSQL_HA_REOPEN_ON_USAGE, TRUE);
 
-  for (table=(TABLE*) hash_search(&open_cache,(byte*) key,key_length) ;
+  for (table= (TABLE*) hash_first(&open_cache, (byte*) key, key_length,
+                                  &state);
        table && table->in_use ;
-       table = (TABLE*) hash_next(&open_cache,(byte*) key,key_length))
+       table= (TABLE*) hash_next(&open_cache, (byte*) key, key_length,
+                                 &state))
   {
     if (table->s->version != refresh_version)
     {
@@ -2242,10 +2245,12 @@
     uint key_length= table->s->table_cache_key.length;
 
     DBUG_PRINT("loop", ("table_name: %s", table->alias));
-    for (TABLE *search=(TABLE*) hash_search(&open_cache,
-					    (byte*) key,key_length) ;
+    HASH_SEARCH_STATE state;
+    for (TABLE *search= (TABLE*) hash_first(&open_cache, (byte*) key,
+                                             key_length, &state);
 	 search ;
-	 search = (TABLE*) hash_next(&open_cache,(byte*) key,key_length))
+         search= (TABLE*) hash_next(&open_cache, (byte*) key,
+                                    key_length, &state))
     {
       DBUG_PRINT("info", ("share: 0x%lx  locked_by_flush: %d  "
                           "locked_by_name: %d  db_stat: %u  version: %u",
@@ -5851,11 +5856,14 @@
   key_length=(uint) (strmov(strmov(key,db)+1,table_name)-key)+1;
   for (;;)
   {
+    HASH_SEARCH_STATE state;
     result= signalled= 0;
 
-    for (table=(TABLE*) hash_search(&open_cache,(byte*) key,key_length) ;
+    for (table= (TABLE*) hash_first(&open_cache, (byte*) key, key_length,
+                                    &state);
          table;
-         table = (TABLE*) hash_next(&open_cache,(byte*) key,key_length))
+         table= (TABLE*) hash_next(&open_cache, (byte*) key, key_length,
+                                   &state))
     {
       THD *in_use;
       table->s->version=0L;		/* Free when thread is ready */
Thread
bk commit into 5.1 tree (rburnett:1.2024)reggie6 Jan