summaryrefslogtreecommitdiff
path: root/storage/innobase
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-04-30 15:21:52 +0300
committerMonty <monty@mariadb.org>2018-04-30 15:21:52 +0300
commita1fe7d75dc0468ebf2f31e6e7ddeef186abcd230 (patch)
tree597212e3eec8fc08961f1d93e9d3caa52ff4db01 /storage/innobase
parent7d6b55b99aa11bc888bdf7ad1ccdf845909a91c5 (diff)
downloadmariadb-git-a1fe7d75dc0468ebf2f31e6e7ddeef186abcd230.tar.gz
Removed even more warning that was found with -Wunused
- Removed test if HA_FT_WTYPE == HA_KEYTYPE_FLOAT as this never worked (HA_KEYTYPE_FLOAT is an enum) - Define HA_FT_MAXLEN to 126 (was tested before but never defined)
Diffstat (limited to 'storage/innobase')
-rw-r--r--storage/innobase/buf/buf0buf.cc4
-rw-r--r--storage/innobase/buf/buf0lru.cc4
2 files changed, 3 insertions, 5 deletions
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index 12d7f275e1e..250b879467d 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -7357,10 +7357,10 @@ buf_pool_reserve_tmp_slot(
/* Both snappy and lzo compression methods require that
output buffer used for compression is bigger than input
buffer. Increase the allocated buffer size accordingly. */
-#if HAVE_SNAPPY
+#if defined(HAVE_SNAPPY)
size = snappy_max_compressed_length(size);
#endif
-#if HAVE_LZO
+#if defined(HAVE_LZO)
size += LZO1X_1_15_MEM_COMPRESS;
#endif
free_slot->comp_buf = static_cast<byte*>(aligned_malloc(size, srv_page_size));
diff --git a/storage/innobase/buf/buf0lru.cc b/storage/innobase/buf/buf0lru.cc
index aadaac7c1d9..8ec2c883075 100644
--- a/storage/innobase/buf/buf0lru.cc
+++ b/storage/innobase/buf/buf0lru.cc
@@ -1208,10 +1208,8 @@ buf_LRU_old_adjust_len(
ut_ad(buf_pool_mutex_own(buf_pool));
ut_ad(buf_pool->LRU_old_ratio >= BUF_LRU_OLD_RATIO_MIN);
ut_ad(buf_pool->LRU_old_ratio <= BUF_LRU_OLD_RATIO_MAX);
-#if BUF_LRU_OLD_RATIO_MIN * BUF_LRU_OLD_MIN_LEN <= BUF_LRU_OLD_RATIO_DIV * (BUF_LRU_OLD_TOLERANCE + 5)
-# error "BUF_LRU_OLD_RATIO_MIN * BUF_LRU_OLD_MIN_LEN <= BUF_LRU_OLD_RATIO_DIV * (BUF_LRU_OLD_TOLERANCE + 5)"
-#endif
#ifdef UNIV_LRU_DEBUG
+ compile_time_assert(BUF_LRU_OLD_RATIO_MIN * BUF_LRU_OLD_MIN_LEN <= BUF_LRU_OLD_RATIO_DIV * (BUF_LRU_OLD_TOLERANCE + 5));
/* buf_pool->LRU_old must be the first item in the LRU list
whose "old" flag is set. */
ut_a(buf_pool->LRU_old->old);