List:Commits« Previous MessageNext Message »
From:Christopher Powers Date:February 20 2012 8:58pm
Subject:bzr push into mysql-trunk-wl5259 branch (chris.powers:3385 to 3386) WL#5259
View as plain text  
 3386 Christopher Powers	2012-02-20
      WL#5259 PERFORMANCE_SCHEMA host cache
      
      Change table_host_cache::materialize() to handle circularly linked host cache

    modified:
      storage/perfschema/table_host_cache.cc
 3385 Marc Alff	2012-02-20
      Simplified test output

    modified:
      mysql-test/suite/perfschema/include/hostcache_dump.inc
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
      mysql-test/suite/perfschema/r/hostcache_peer_addr.result
=== modified file 'storage/perfschema/table_host_cache.cc'
--- a/storage/perfschema/table_host_cache.cc	2012-02-06 09:13:43 +0000
+++ b/storage/perfschema/table_host_cache.cc	2012-02-20 20:55:15 +0000
@@ -226,7 +226,6 @@ table_host_cache::table_host_cache()
 
 void table_host_cache::materialize(THD *thd)
 {
-  Host_entry *current;
   uint size;
   uint index;
   row_host_cache *rows;
@@ -253,7 +252,9 @@ void table_host_cache::materialize(THD *
 
   index= 0;
   row= rows;
-  current= hostname_cache_first();
+
+  Host_entry *first= hostname_cache_first();
+  Host_entry *current= first;
 
   while ((current != NULL) && (index < size))
   {
@@ -261,6 +262,9 @@ void table_host_cache::materialize(THD *
     index++;
     row++;
     current= current->next();
+    /* Host cache is a circular linked list. */
+    if (current == first)
+      break;
   }
 
   m_all_rows= rows;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5259 branch (chris.powers:3385 to 3386) WL#5259Christopher Powers21 Feb