summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-05-26 20:31:03 +0200
committerSergei Golubchik <sergii@pisem.net>2014-05-26 20:31:03 +0200
commit50354951084c3bc95dffcfff59fee58d00237da4 (patch)
tree3e47106b4ab72652048fe4f9e7a9d16abc831320 /storage
parent7e7e1bf8aa1a14cc5f12263ae1db2ab488239f63 (diff)
downloadmariadb-git-50354951084c3bc95dffcfff59fee58d00237da4.tar.gz
compilation failure on Windows
VS doesn't like #ifdefs inside a macro expansion. move them outside
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/handler/ha_innodb.cc15
-rw-r--r--storage/xtradb/handler/ha_innodb.cc15
2 files changed, 16 insertions, 14 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index f3d0cd47a23..635c127e55b 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -16797,19 +16797,20 @@ static MYSQL_SYSVAR_BOOL(use_trim, srv_use_trim,
"Use trim. Default FALSE.",
NULL, NULL, FALSE);
+#if defined(HAVE_LZO)
+#define default_compression_algorithm PAGE_LZO_ALGORITHM
+#elif defined(HAVE_LZ4)
+#define default_compression_algorithm PAGE_LZ4_ALGORITHM
+#else
+#define default_compression_algorithm PAGE_ZLIB_ALGORITHM
+#endif
static MYSQL_SYSVAR_LONG(compression_algorithm, innodb_compression_algorithm,
PLUGIN_VAR_OPCMDARG,
"Compression algorithm used on page compression. 1 for zlib, 2 for lz3, 3 for lzo",
NULL, NULL,
PAGE_ZLIB_ALGORITHM,
0,
-#if defined(HAVE_LZO) && defined(HAVE_LZ4)
- PAGE_ALGORITHM_LAST,
-#elif defined(HAVE_LZ4) && !defined(HAVE_LZO)
- PAGE_LZ4_ALGORITHM,
-#else
- PAGE_ZLIB_ALGORITHM,
-#endif
+ default_compression_algorithm,
0);
static MYSQL_SYSVAR_LONG(mtflush_threads, srv_mtflush_threads,
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index 123e72ecdd7..ef0f71a6f7d 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -17954,19 +17954,20 @@ static MYSQL_SYSVAR_BOOL(use_trim, srv_use_trim,
"Use trim. Default FALSE.",
NULL, NULL, FALSE);
+#if defined(HAVE_LZO)
+#define default_compression_algorithm PAGE_LZO_ALGORITHM
+#elif defined(HAVE_LZ4)
+#define default_compression_algorithm PAGE_LZ4_ALGORITHM
+#else
+#define default_compression_algorithm PAGE_ZLIB_ALGORITHM
+#endif
static MYSQL_SYSVAR_LONG(compression_algorithm, innodb_compression_algorithm,
PLUGIN_VAR_OPCMDARG,
"Compression algorithm used on page compression. 1 for zlib, 2 for lz3, 3 for lzo",
NULL, NULL,
PAGE_ZLIB_ALGORITHM,
0,
-#if defined(HAVE_LZO) && defined(HAVE_LZ4)
- PAGE_ALGORITHM_LAST,
-#elif defined(HAVE_LZ4) && !defined(HAVE_LZO)
- PAGE_LZ4_ALGORITHM,
-#else
- PAGE_ZLIB_ALGORITHM,
-#endif
+ default_compression_algorithm,
0);
static MYSQL_SYSVAR_LONG(mtflush_threads, srv_mtflush_threads,