diff options
Diffstat (limited to 'storage/maria')
-rw-r--r-- | storage/maria/ha_maria.cc | 4 | ||||
-rw-r--r-- | storage/maria/ma_write.c | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 7958868689b..6eccc14b51a 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -2126,7 +2126,9 @@ void ha_maria::start_bulk_insert(ha_rows rows) else if (!file->bulk_insert && (!rows || rows >= MARIA_MIN_ROWS_TO_USE_BULK_INSERT)) { - maria_init_bulk_insert(file, thd->variables.bulk_insert_buff_size, rows); + maria_init_bulk_insert(file, + (size_t) thd->variables.bulk_insert_buff_size, + rows); } } DBUG_VOID_RETURN; diff --git a/storage/maria/ma_write.c b/storage/maria/ma_write.c index 944ae93b17f..a9022417986 100644 --- a/storage/maria/ma_write.c +++ b/storage/maria/ma_write.c @@ -1715,7 +1715,7 @@ static int keys_free(uchar *key, TREE_FREE mode, bulk_insert_param *param) } -int maria_init_bulk_insert(MARIA_HA *info, ulong cache_size, ha_rows rows) +int maria_init_bulk_insert(MARIA_HA *info, size_t cache_size, ha_rows rows) { MARIA_SHARE *share= info->s; MARIA_KEYDEF *key=share->keyinfo; @@ -1723,7 +1723,7 @@ int maria_init_bulk_insert(MARIA_HA *info, ulong cache_size, ha_rows rows) uint i, num_keys, total_keylength; ulonglong key_map; DBUG_ENTER("_ma_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 >= MARIA_MIN_ROWS_TO_USE_BULK_INSERT)); @@ -1741,11 +1741,11 @@ int maria_init_bulk_insert(MARIA_HA *info, ulong cache_size, ha_rows rows) } if (num_keys==0 || - num_keys * MARIA_MIN_SIZE_BULK_INSERT_TREE > cache_size) + num_keys * (size_t) MARIA_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; |