summaryrefslogtreecommitdiff
path: root/storage/maria
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2013-06-06 15:14:23 +0300
committerMichael Widenius <monty@askmonty.org>2013-06-06 15:14:23 +0300
commit5730786041237db73e330ca388c98561ade8c43c (patch)
tree4f94b267ab6fd3c6133f9e1d78232ced0f49af83 /storage/maria
parentbef95a4bbea0a3a42ad26798d3c3aa326dc282bf (diff)
downloadmariadb-git-5730786041237db73e330ca388c98561ade8c43c.tar.gz
Fixed some cache variables that could be set to higher value than what the code supported (size_t)
Fixed some cases that didn't work with > 4G buffers. Fixed compiler warnings include/mysql_com.h: Avoid compiler warning with strncmp() sql-common/client.c: Fixed long comment; Added () sql/filesort.cc: Fix code to get filesort to work with big buffers sql/sys_vars.cc: Fixed some cache variables that could be set to higher value than the size_t Limit query cache to ULONG_MAX as the query cache buffer variables are ulong storage/federatedx/ha_federatedx.cc: Remove not used variable storage/maria/ha_maria.cc: Fix that bulk_insert() works with big buffers storage/maria/ma_write.c: Fix that bulk_insert() works with big buffers storage/myisam/ha_myisam.cc: Fix that bulk_insert() works with big buffers storage/myisam/mi_write.c: Fix that bulk_insert() works with big buffers storage/sphinx/snippets_udf.cc: Fixed compiler warnings
Diffstat (limited to 'storage/maria')
-rw-r--r--storage/maria/ha_maria.cc4
-rw-r--r--storage/maria/ma_write.c8
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;