#At file:///home/anurag/mysqlsrc/mysql-5.1-bugteam-ws2/ based on revid:patrick.crews@stripped
2768 Anurag Shekhar 2009-02-05
Bug#40321 ha_myisam::info could update rec_per_key incorrectly
At line number 1753 during memcopy sizeof ulong and not ulong * as it
may fail on platforms where sizeof (ulong) != sizeof (ulong *)
modified:
storage/myisam/ha_myisam.cc
per-file messages:
storage/myisam/ha_myisam.cc
Used first element of table->key_info[0].rec_per_key for sizeof as suggested in the bug report.
=== modified file 'storage/myisam/ha_myisam.cc'
--- a/storage/myisam/ha_myisam.cc 2008-03-28 10:14:27 +0000
+++ b/storage/myisam/ha_myisam.cc 2009-02-05 11:12:44 +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:2768)Bug#40321 | Anurag Shekhar | 5 Feb |