summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_myisam.cc2
-rw-r--r--sql/ha_myisammrg.cc4
-rw-r--r--sql/table.cc2
3 files changed, 4 insertions, 4 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc
index 5ed791d0f68..95b7b338131 100644
--- a/sql/ha_myisam.cc
+++ b/sql/ha_myisam.cc
@@ -1684,7 +1684,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);
raid_type= misam_info.raid_type;
raid_chunks= misam_info.raid_chunks;
raid_chunksize= misam_info.raid_chunksize;
diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc
index f15a37efdc5..fef2e21d271 100644
--- a/sql/ha_myisammrg.cc
+++ b/sql/ha_myisammrg.cc
@@ -402,11 +402,11 @@ int ha_myisammrg::info(uint flag)
with such a number, it'll be an error later anyway.
*/
bzero((char*) table->key_info[0].rec_per_key,
- sizeof(table->key_info[0].rec_per_key) * table->s->key_parts);
+ sizeof(table->key_info[0].rec_per_key[0]) * table->s->key_parts);
#endif
memcpy((char*) table->key_info[0].rec_per_key,
(char*) mrg_info.rec_per_key,
- sizeof(table->key_info[0].rec_per_key) *
+ sizeof(table->key_info[0].rec_per_key[0]) *
min(file->keys, table->s->key_parts));
}
}
diff --git a/sql/table.cc b/sql/table.cc
index c559b4bb7fd..55a9b50605d 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -233,7 +233,7 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
ulong *rec_per_key;
if (!(rec_per_key= (ulong*) alloc_root(&outparam->mem_root,
- sizeof(ulong*)*key_parts)))
+ sizeof(ulong)*key_parts)))
goto err;
for (i=0 ; i < keys ; i++, keyinfo++)