summaryrefslogtreecommitdiff
path: root/storage/myisam/mi_write.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/myisam/mi_write.c')
-rw-r--r--storage/myisam/mi_write.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/myisam/mi_write.c b/storage/myisam/mi_write.c
index 7bb063f2c10..915ea2b21b8 100644
--- a/storage/myisam/mi_write.c
+++ b/storage/myisam/mi_write.c
@@ -962,7 +962,7 @@ static int keys_free(uchar *key, TREE_FREE mode, bulk_insert_param *param)
}
-int mi_init_bulk_insert(MI_INFO *info, ulong cache_size, ha_rows rows)
+int mi_init_bulk_insert(MI_INFO *info, size_t cache_size, ha_rows rows)
{
MYISAM_SHARE *share=info->s;
MI_KEYDEF *key=share->keyinfo;
@@ -970,7 +970,7 @@ int mi_init_bulk_insert(MI_INFO *info, ulong cache_size, ha_rows rows)
uint i, num_keys, total_keylength;
ulonglong key_map;
DBUG_ENTER("_mi_init_bulk_insert");
- DBUG_PRINT("enter",("cache_size: %lu", cache_size));
+ DBUG_PRINT("enter",("cache_size: %lu", (ulong) cache_size));
DBUG_ASSERT(!info->bulk_insert &&
(!rows || rows >= MI_MIN_ROWS_TO_USE_BULK_INSERT));
@@ -988,11 +988,11 @@ int mi_init_bulk_insert(MI_INFO *info, ulong cache_size, ha_rows rows)
}
if (num_keys==0 ||
- num_keys * MI_MIN_SIZE_BULK_INSERT_TREE > cache_size)
+ num_keys * (size_t) MI_MIN_SIZE_BULK_INSERT_TREE > cache_size)
DBUG_RETURN(0);
if (rows && rows*total_keylength < cache_size)
- cache_size= (ulong)rows;
+ cache_size= (size_t) rows;
else
cache_size/=total_keylength*16;