List:Commits« Previous MessageNext Message »
From:Anurag Shekhar Date:February 13 2009 11:42am
Subject:bzr commit into mysql-5.1-bugteam branch (anurag.shekhar:2806)
Bug#40321
View as plain text  
#At file:///home/anurag/mysqlsrc/mysql-5.1-bugteam-ws3/ based on revid:davi.arnaut@stripped

 2806 Anurag Shekhar	2009-02-13
      Bug#40321 ha_myisam::info could update rec_per_key incorrectly
            
            MyISAM did copy of key statistics incorrectly, which may cause
      server crash or incorrect cardinality values. This may happen only on
      platforms where size of long differs from size of pointer.
            
            To determine number of bytes to be copied from array of ulong,
      MyISAM mistakenly used sizoef(pointer) instead of sizeof(ulong).
modified:
  storage/myisam/ha_myisam.cc

=== modified file 'storage/myisam/ha_myisam.cc'
--- a/storage/myisam/ha_myisam.cc	2009-02-05 06:16:00 +0000
+++ b/storage/myisam/ha_myisam.cc	2009-02-13 11:41:54 +0000
@@ -1753,7 +1753,7 @@ int ha_myisam::info(uint flag)
     if (share->key_parts)
       memcpy((char*) table->key_info[0].rec_per_key,
 	     (char*) misam_info.rec_per_key,
-	     sizeof(table->key_info[0].rec_per_key)*share->key_parts);
+	     sizeof(table->key_info[0].rec_per_key[0])*share->key_parts);
     if (share->tmp_table == NO_TMP_TABLE)
       pthread_mutex_unlock(&share->mutex);
 

Thread
bzr commit into mysql-5.1-bugteam branch (anurag.shekhar:2806)Bug#40321Anurag Shekhar13 Feb