Skip to content

Commit

Permalink
Merge branch '10.1' of github.com:MariaDB/server into 10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
spetrunia committed Jun 26, 2014
2 parents 3d7eeb6 + c6d29cd commit 9394f2f
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 104 deletions.
3 changes: 0 additions & 3 deletions mysql-test/suite/sys_vars/r/innodb_have_lz4_basic.result

This file was deleted.

3 changes: 0 additions & 3 deletions mysql-test/suite/sys_vars/r/innodb_have_lzo_basic.result

This file was deleted.

5 changes: 0 additions & 5 deletions mysql-test/suite/sys_vars/t/innodb_have_lz4_basic.test

This file was deleted.

5 changes: 0 additions & 5 deletions mysql-test/suite/sys_vars/t/innodb_have_lzo_basic.test

This file was deleted.

30 changes: 6 additions & 24 deletions storage/innobase/handler/ha_innodb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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}
};
Expand Down Expand Up @@ -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=
{
Expand All @@ -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",
Expand Down Expand Up @@ -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
};

Expand Down
5 changes: 0 additions & 5 deletions storage/innobase/include/srv0srv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ */
Expand Down Expand Up @@ -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. */
Expand Down
12 changes: 12 additions & 0 deletions storage/innobase/include/univ.i
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
15 changes: 0 additions & 15 deletions storage/innobase/srv/srv0srv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
30 changes: 6 additions & 24 deletions storage/xtradb/handler/ha_innodb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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}
};
Expand Down Expand Up @@ -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=
{
Expand All @@ -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",
Expand Down Expand Up @@ -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
};
Expand Down
5 changes: 0 additions & 5 deletions storage/xtradb/include/srv0srv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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. */
Expand Down
12 changes: 12 additions & 0 deletions storage/xtradb/include/univ.i
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
15 changes: 0 additions & 15 deletions storage/xtradb/srv/srv0srv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 9394f2f

Please sign in to comment.