summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2014-06-26 22:04:04 +0400
committerSergei Petrunia <psergey@askmonty.org>2014-06-26 22:04:04 +0400
commit9394f2f9b0a95086708237f16bc19bb6e58ebf12 (patch)
tree8bc9221dd947e7041cdb882f0672514dd98b0d02
parent3d7eeb6307242a7b4a810732322d043b736c5919 (diff)
parentc6d29cd30db9053023124bf74f17f6ee9d8e168d (diff)
downloadmariadb-git-9394f2f9b0a95086708237f16bc19bb6e58ebf12.tar.gz
Merge branch '10.1' of github.com:MariaDB/server into 10.1
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_have_lz4_basic.result3
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_have_lzo_basic.result3
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_have_lz4_basic.test5
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_have_lzo_basic.test5
-rw-r--r--storage/innobase/handler/ha_innodb.cc30
-rw-r--r--storage/innobase/include/srv0srv.h5
-rw-r--r--storage/innobase/include/univ.i12
-rw-r--r--storage/innobase/srv/srv0srv.cc15
-rw-r--r--storage/xtradb/handler/ha_innodb.cc30
-rw-r--r--storage/xtradb/include/srv0srv.h5
-rw-r--r--storage/xtradb/include/univ.i12
-rw-r--r--storage/xtradb/srv/srv0srv.cc15
12 files changed, 36 insertions, 104 deletions
diff --git a/mysql-test/suite/sys_vars/r/innodb_have_lz4_basic.result b/mysql-test/suite/sys_vars/r/innodb_have_lz4_basic.result
deleted file mode 100644
index 2f816066579..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_have_lz4_basic.result
+++ /dev/null
@@ -1,3 +0,0 @@
-select @@global.innodb_have_lz4;
-@@global.innodb_have_lz4
-0
diff --git a/mysql-test/suite/sys_vars/r/innodb_have_lzo_basic.result b/mysql-test/suite/sys_vars/r/innodb_have_lzo_basic.result
deleted file mode 100644
index 5804aa29f9a..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_have_lzo_basic.result
+++ /dev/null
@@ -1,3 +0,0 @@
-select @@global.innodb_have_lzo;
-@@global.innodb_have_lzo
-0
diff --git a/mysql-test/suite/sys_vars/t/innodb_have_lz4_basic.test b/mysql-test/suite/sys_vars/t/innodb_have_lz4_basic.test
deleted file mode 100644
index 68a2ad7706a..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_have_lz4_basic.test
+++ /dev/null
@@ -1,5 +0,0 @@
---source include/have_innodb.inc
-
---let $inno= `select @@global.innodb_have_lz4`
---replace_result $inno 0
-select @@global.innodb_have_lz4;
diff --git a/mysql-test/suite/sys_vars/t/innodb_have_lzo_basic.test b/mysql-test/suite/sys_vars/t/innodb_have_lzo_basic.test
deleted file mode 100644
index 29550b7e139..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_have_lzo_basic.test
+++ /dev/null
@@ -1,5 +0,0 @@
---source include/have_innodb.inc
-
---let $inno= `select @@global.innodb_have_lzo`
---replace_result $inno 0
-select @@global.innodb_have_lzo;
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index a2e23ec6985..471c9d1d038 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -576,6 +576,8 @@ innodb_compression_algorithm_validate(
for update function */
struct st_mysql_value* value); /*!< in: incoming string */
+static ibool innodb_have_lzo=IF_LZO(1, 0);
+static ibool innodb_have_lz4=IF_LZ4(1, 0);
static const char innobase_hton_name[]= "InnoDB";
@@ -740,9 +742,9 @@ static SHOW_VAR innodb_status_variables[]= {
{"num_pages_page_decompressed",
(char*) &export_vars.innodb_pages_page_decompressed, SHOW_LONGLONG},
{"have_lz4",
- (char*) &export_vars.innodb_have_lz4, SHOW_LONG},
+ (char*) &innodb_have_lz4, SHOW_BOOL},
{"have_lzo",
- (char*) &export_vars.innodb_have_lzo, SHOW_LONG},
+ (char*) &innodb_have_lzo, SHOW_BOOL},
{NullS, NullS, SHOW_LONG}
};
@@ -17044,13 +17046,6 @@ 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 const char *page_compression_algorithms[]= { "none", "zlib", "lz4", "lzo", 0 };
static TYPELIB page_compression_algorithms_typelib=
{
@@ -17060,21 +17055,10 @@ static TYPELIB page_compression_algorithms_typelib=
static MYSQL_SYSVAR_ENUM(compression_algorithm, innodb_compression_algorithm,
PLUGIN_VAR_OPCMDARG,
"Compression algorithm used on page compression. One of: none, zlib, lz4, or lzo",
- innodb_compression_algorithm_validate, NULL, default_compression_algorithm,
+ innodb_compression_algorithm_validate, NULL,
+ IF_LZO(PAGE_LZO_ALGORITHM, IF_LZ4(PAGE_LZ4_ALGORITHM, PAGE_ZLIB_ALGORITHM)),
&page_compression_algorithms_typelib);
-static MYSQL_SYSVAR_ULONG(have_lz4, srv_have_lz4,
- PLUGIN_VAR_READONLY,
- "InnoDB compiled support with liblz4",
- NULL, NULL, srv_have_lz4,
- 0, 1, 0);
-
-static MYSQL_SYSVAR_ULONG(have_lzo, srv_have_lzo,
- PLUGIN_VAR_READONLY,
- "InnoDB compiled support with liblzo",
- NULL, NULL, srv_have_lzo,
- 0, 1, 0);
-
static MYSQL_SYSVAR_LONG(mtflush_threads, srv_mtflush_threads,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Number of multi-threaded flush threads",
@@ -17251,8 +17235,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(compression_algorithm),
MYSQL_SYSVAR(mtflush_threads),
MYSQL_SYSVAR(use_mtflush),
- MYSQL_SYSVAR(have_lz4),
- MYSQL_SYSVAR(have_lzo),
NULL
};
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
index c428b6a7348..905d4a0afa7 100644
--- a/storage/innobase/include/srv0srv.h
+++ b/storage/innobase/include/srv0srv.h
@@ -264,9 +264,6 @@ extern long srv_mtflush_threads;
/* If this flag is TRUE, then we will use multi threaded flush. */
extern my_bool srv_use_mtflush;
-extern ulong srv_have_lz4;
-extern ulong srv_have_lzo;
-
#ifdef __WIN__
extern ibool srv_use_native_conditions;
#endif /* __WIN__ */
@@ -919,8 +916,6 @@ struct export_var_t{
compression */
ib_int64_t innodb_pages_page_compression_error;/*!< Number of page
compression errors */
- ulint innodb_have_lz4; /*!< HAVE_LZ4 */
- ulint innodb_have_lzo; /*!< HAVE_LZO */
};
/** Thread slot in the thread table. */
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
index 3105a1fc0ce..54815c47419 100644
--- a/storage/innobase/include/univ.i
+++ b/storage/innobase/include/univ.i
@@ -331,6 +331,18 @@ typedef enum innodb_file_formats_enum innodb_file_formats_t;
/** The 2-logarithm of UNIV_PAGE_SIZE: */
#define UNIV_PAGE_SIZE_SHIFT srv_page_size_shift
+#ifdef HAVE_LZO
+#define IF_LZO(A,B) A
+#else
+#define IF_LZO(A,B) B
+#endif
+
+#ifdef HAVE_LZ4
+#define IF_LZ4(A,B) A
+#else
+#define IF_LZ4(A,B) B
+#endif
+
/** The universal page size of the database */
#define UNIV_PAGE_SIZE ((ulint) srv_page_size)
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index d7d91b078e8..71edadea9fc 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -209,18 +209,6 @@ UNIV_INTERN uint srv_flush_log_at_timeout = 1;
UNIV_INTERN ulong srv_page_size = UNIV_PAGE_SIZE_DEF;
UNIV_INTERN ulong srv_page_size_shift = UNIV_PAGE_SIZE_SHIFT_DEF;
-#ifdef HAVE_LZ4
-UNIV_INTERN ulong srv_have_lz4 = 1;
-#else
-UNIV_INTERN ulong srv_have_lz4 = 0;
-#endif
-
-#ifdef HAVE_LZO
-UNIV_INTERN ulong srv_have_lzo = 1;
-#else
-UNIV_INTERN ulong srv_have_lzo = 0;
-#endif
-
/* Try to flush dirty pages so as to avoid IO bursts at
the checkpoints. */
UNIV_INTERN char srv_adaptive_flushing = TRUE;
@@ -1434,9 +1422,6 @@ srv_export_innodb_status(void)
#endif
export_vars.innodb_page_size = UNIV_PAGE_SIZE;
- export_vars.innodb_have_lz4 = srv_have_lz4;
- export_vars.innodb_have_lzo = srv_have_lzo;
-
export_vars.innodb_log_waits = srv_stats.log_waits;
export_vars.innodb_os_log_written = srv_stats.os_log_written;
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index 28915098d6c..5d60a6f0f96 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -717,6 +717,8 @@ static MYSQL_THDVAR_BOOL(fake_changes, PLUGIN_VAR_OPCMDARG,
"This is to cause replication prefetch IO. ATTENTION: the transaction started after enabled is affected.",
NULL, NULL, FALSE);
+static ibool innodb_have_lzo=IF_LZO(1, 0);
+static ibool innodb_have_lz4=IF_LZ4(1, 0);
static SHOW_VAR innodb_status_variables[]= {
{"available_undo_logs",
@@ -934,9 +936,9 @@ static SHOW_VAR innodb_status_variables[]= {
{"num_pages_page_decompressed",
(char*) &export_vars.innodb_pages_page_decompressed, SHOW_LONGLONG},
{"have_lz4",
- (char*) &export_vars.innodb_have_lz4, SHOW_LONG},
+ (char*) &innodb_have_lz4, SHOW_BOOL},
{"have_lzo",
- (char*) &export_vars.innodb_have_lzo, SHOW_LONG},
+ (char*) &innodb_have_lzo, SHOW_BOOL},
{NullS, NullS, SHOW_LONG}
};
@@ -18217,13 +18219,6 @@ 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 const char *page_compression_algorithms[]= { "none", "zlib", "lz4", "lzo", 0 };
static TYPELIB page_compression_algorithms_typelib=
{
@@ -18233,21 +18228,10 @@ static TYPELIB page_compression_algorithms_typelib=
static MYSQL_SYSVAR_ENUM(compression_algorithm, innodb_compression_algorithm,
PLUGIN_VAR_OPCMDARG,
"Compression algorithm used on page compression. One of: none, zlib, lz4, or lzo",
- innodb_compression_algorithm_validate, NULL, default_compression_algorithm,
+ innodb_compression_algorithm_validate, NULL,
+ IF_LZO(PAGE_LZO_ALGORITHM, IF_LZ4(PAGE_LZ4_ALGORITHM, PAGE_ZLIB_ALGORITHM)),
&page_compression_algorithms_typelib);
-static MYSQL_SYSVAR_ULONG(have_lz4, srv_have_lz4,
- PLUGIN_VAR_READONLY,
- "InnoDB compiled support with liblz4",
- NULL, NULL, srv_have_lz4,
- 0, 1, 0);
-
-static MYSQL_SYSVAR_ULONG(have_lzo, srv_have_lzo,
- PLUGIN_VAR_READONLY,
- "InnoDB compiled support with liblzo",
- NULL, NULL, srv_have_lzo,
- 0, 1, 0);
-
static MYSQL_SYSVAR_LONG(mtflush_threads, srv_mtflush_threads,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Number of multi-threaded flush threads",
@@ -18462,8 +18446,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(compression_algorithm),
MYSQL_SYSVAR(mtflush_threads),
MYSQL_SYSVAR(use_mtflush),
- MYSQL_SYSVAR(have_lz4),
- MYSQL_SYSVAR(have_lzo),
NULL
};
diff --git a/storage/xtradb/include/srv0srv.h b/storage/xtradb/include/srv0srv.h
index f56d7b805f6..a02c8a96e1a 100644
--- a/storage/xtradb/include/srv0srv.h
+++ b/storage/xtradb/include/srv0srv.h
@@ -282,9 +282,6 @@ extern long srv_mtflush_threads;
/* If this flag is TRUE, then we will use multi threaded flush. */
extern my_bool srv_use_mtflush;
-extern ulong srv_have_lz4;
-extern ulong srv_have_lzo;
-
/** Server undo tablespaces directory, can be absolute path. */
extern char* srv_undo_dir;
@@ -1130,8 +1127,6 @@ struct export_var_t{
compression */
ib_int64_t innodb_pages_page_compression_error;/*!< Number of page
compression errors */
- ulint innodb_have_lz4; /*!< HAVE_LZ4 */
- ulint innodb_have_lzo; /*!< HAVE_LZO */
};
/** Thread slot in the thread table. */
diff --git a/storage/xtradb/include/univ.i b/storage/xtradb/include/univ.i
index fcabf22d3fa..ba3de00dd10 100644
--- a/storage/xtradb/include/univ.i
+++ b/storage/xtradb/include/univ.i
@@ -346,6 +346,18 @@ typedef enum innodb_file_formats_enum innodb_file_formats_t;
/** The 2-logarithm of UNIV_PAGE_SIZE: */
#define UNIV_PAGE_SIZE_SHIFT srv_page_size_shift
+#ifdef HAVE_LZO
+#define IF_LZO(A,B) A
+#else
+#define IF_LZO(A,B) B
+#endif
+
+#ifdef HAVE_LZ4
+#define IF_LZ4(A,B) A
+#else
+#define IF_LZ4(A,B) B
+#endif
+
/** The universal page size of the database */
#define UNIV_PAGE_SIZE ((ulint) srv_page_size)
diff --git a/storage/xtradb/srv/srv0srv.cc b/storage/xtradb/srv/srv0srv.cc
index 20b58077958..7c1058f536f 100644
--- a/storage/xtradb/srv/srv0srv.cc
+++ b/storage/xtradb/srv/srv0srv.cc
@@ -237,18 +237,6 @@ UNIV_INTERN ulong srv_page_size = UNIV_PAGE_SIZE_DEF;
UNIV_INTERN ulong srv_page_size_shift = UNIV_PAGE_SIZE_SHIFT_DEF;
UNIV_INTERN char srv_use_global_flush_log_at_trx_commit = TRUE;
-#ifdef HAVE_LZ4
-UNIV_INTERN ulong srv_have_lz4 = 1;
-#else
-UNIV_INTERN ulong srv_have_lz4 = 0;
-#endif
-
-#ifdef HAVE_LZO
-UNIV_INTERN ulong srv_have_lzo = 1;
-#else
-UNIV_INTERN ulong srv_have_lzo = 0;
-#endif
-
/* Try to flush dirty pages so as to avoid IO bursts at
the checkpoints. */
UNIV_INTERN char srv_adaptive_flushing = TRUE;
@@ -1813,9 +1801,6 @@ srv_export_innodb_status(void)
#endif
export_vars.innodb_page_size = UNIV_PAGE_SIZE;
- export_vars.innodb_have_lz4 = srv_have_lz4;
- export_vars.innodb_have_lzo = srv_have_lzo;
-
export_vars.innodb_log_waits = srv_stats.log_waits;
export_vars.innodb_os_log_written = srv_stats.os_log_written;