Merge remote-tracking branch 'origin/10.1' into 10.1-serg-merge

This commit is contained in:
Sergei Golubchik 2014-05-26 21:14:33 +02:00
commit 5a61516afd
15 changed files with 47 additions and 41 deletions

View file

@ -14,8 +14,8 @@
MACRO (MYSQL_CHECK_LZO_STATIC)
CHECK_INCLUDE_FILES(lzo/lzo1x.h HAVE_LZO_H)
CHECK_LIBRARY_EXISTS(liblzo2.a lzo1x_1_compress "" HAVE_LZO_LIB)
#CHECK_INCLUDE_FILES(lzo/lzo1x.h HAVE_LZO_H)
#CHECK_LIBRARY_EXISTS(liblzo2.a lzo1x_1_compress "" HAVE_LZO_LIB)
IF(HAVE_LZO_LIB AND HAVE_LZO_H)
ADD_DEFINITIONS(-DHAVE_LZO=1)
@ -25,10 +25,10 @@ ENDMACRO()
MACRO (MYSQL_CHECK_LZO)
CHECK_INCLUDE_FILES(lzo/lzo1x.h HAVE_LZO_H)
CHECK_LIBRARY_EXISTS(lzo2 lzo1x_1_compress "" HAVE_LZO_LIB)
#CHECK_INCLUDE_FILES(lzo/lzo1x.h HAVE_LZO_H)
#CHECK_LIBRARY_EXISTS(lzo2 lzo1x_1_compress "" HAVE_LZO_SHARED_LIB)
IF(HAVE_LZO_LIB AND HAVE_LZO_H)
IF(HAVE_LZO_SHARED_LIB AND HAVE_LZO_H)
ADD_DEFINITIONS(-DHAVE_LZO=1)
LINK_LIBRARIES(lzo2)
ENDIF()

View file

@ -63,7 +63,6 @@ static ulint srv_data_read, srv_data_written;
#include <linux/fs.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <linux/falloc.h>
#endif
#include "row0mysql.h"

View file

@ -232,7 +232,7 @@ fil_decompress_page(
byte* page_buf, /*!< in: preallocated buffer or NULL */
byte* buf, /*!< out: buffer from which to read; in aio
this must be appropriately aligned */
ulint len, /*!< in: length of output buffer.*/
ulong len, /*!< in: length of output buffer.*/
ulint* write_size) /*!< in/out: Actual payload size of
the compressed data. */
{

View file

@ -17006,20 +17006,24 @@ static MYSQL_SYSVAR_BOOL(use_trim, srv_use_trim,
"Use trim. Default FALSE.",
NULL, NULL, FALSE);
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,
#if defined(HAVE_LZO)
#define default_compression_algorithm PAGE_LZO_ALGORITHM
#elif defined(HAVE_LZ4)
#define default_compression_algorithm PAGE_LZ4_ALGORITHM
#else
PAGE_ZLIB_ALGORITHM,
#define default_compression_algorithm PAGE_ZLIB_ALGORITHM
#endif
0);
static const char *page_compression_algorithms[]= { "none", "zlib", "lz4", "lzo", 0 };
static TYPELIB page_compression_algorithms_typelib=
{
array_elements(page_compression_algorithms) - 1, 0,
page_compression_algorithms, 0
};
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",
NULL, NULL, default_compression_algorithm,
&page_compression_algorithms_typelib);
static MYSQL_SYSVAR_LONG(mtflush_threads, srv_mtflush_threads,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,

View file

@ -99,7 +99,7 @@ fil_decompress_page(
byte* page_buf, /*!< in: preallocated buffer or NULL */
byte* buf, /*!< out: buffer from which to read; in aio
this must be appropriately aligned */
ulint len, /*!< in: length of output buffer.*/
ulong len, /*!< in: length of output buffer.*/
ulint* write_size); /*!< in/out: Actual payload size of
the compressed data. */

View file

@ -252,7 +252,7 @@ extern my_bool srv_use_posix_fallocate;
extern my_bool srv_use_atomic_writes;
/* Compression algorithm*/
extern long innodb_compression_algorithm;
extern ulong innodb_compression_algorithm;
/* Number of flush threads */
#define MTFLUSH_MAX_WORKER 64

View file

@ -155,7 +155,7 @@ UNIV_INTERN my_bool srv_use_posix_fallocate = FALSE;
/* If this flag is TRUE, then we disable doublewrite buffer */
UNIV_INTERN my_bool srv_use_atomic_writes = FALSE;
/* If this flag IS TRUE, then we use lz4 to compress/decompress pages */
UNIV_INTERN long innodb_compression_algorithm = PAGE_ZLIB_ALGORITHM;
UNIV_INTERN ulong innodb_compression_algorithm = PAGE_ZLIB_ALGORITHM;
/* Number of threads used for multi-threaded flush */
UNIV_INTERN long srv_mtflush_threads = MTFLUSH_DEFAULT_WORKER;
/* If this flag is TRUE, then we will use multi threaded flush. */

View file

@ -61,7 +61,6 @@ static ulint srv_data_read, srv_data_written;
#include <linux/fs.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <linux/falloc.h>
#endif
#include "row0mysql.h"

View file

@ -232,7 +232,7 @@ fil_decompress_page(
byte* page_buf, /*!< in: preallocated buffer or NULL */
byte* buf, /*!< out: buffer from which to read; in aio
this must be appropriately aligned */
ulint len, /*!< in: length of output buffer.*/
ulong len, /*!< in: length of output buffer.*/
ulint* write_size) /*!< in/out: Actual payload size of
the compressed data. */
{

View file

@ -18184,20 +18184,24 @@ static MYSQL_SYSVAR_BOOL(use_trim, srv_use_trim,
"Use trim. Default FALSE.",
NULL, NULL, FALSE);
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,
#if defined(HAVE_LZO)
#define default_compression_algorithm PAGE_LZO_ALGORITHM
#elif defined(HAVE_LZ4)
#define default_compression_algorithm PAGE_LZ4_ALGORITHM
#else
PAGE_ZLIB_ALGORITHM,
#define default_compression_algorithm PAGE_ZLIB_ALGORITHM
#endif
0);
static const char *page_compression_algorithms[]= { "none", "zlib", "lz4", "lzo", 0 };
static TYPELIB page_compression_algorithms_typelib=
{
array_elements(page_compression_algorithms) - 1, 0,
page_compression_algorithms, 0
};
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",
NULL, NULL, default_compression_algorithm,
&page_compression_algorithms_typelib);
static MYSQL_SYSVAR_LONG(mtflush_threads, srv_mtflush_threads,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,

View file

@ -99,7 +99,7 @@ fil_decompress_page(
byte* page_buf, /*!< in: preallocated buffer or NULL */
byte* buf, /*!< out: buffer from which to read; in aio
this must be appropriately aligned */
ulint len, /*!< in: length of output buffer.*/
ulong len, /*!< in: length of output buffer.*/
ulint* write_size); /*!< in/out: Actual payload size of
the compressed data. */

View file

@ -270,7 +270,7 @@ extern my_bool srv_use_posix_fallocate;
extern my_bool srv_use_atomic_writes;
/* Compression algorithm*/
extern long innodb_compression_algorithm;
extern ulong innodb_compression_algorithm;
/* Number of flush threads */
#define MTFLUSH_MAX_WORKER 64

View file

@ -3043,7 +3043,7 @@ log_archive_do(
{
ibool calc_new_limit;
ib_uint64_t start_lsn;
ib_uint64_t limit_lsn;
ib_uint64_t limit_lsn=0;
calc_new_limit = TRUE;
loop:

View file

@ -173,7 +173,7 @@ UNIV_INTERN my_bool srv_use_posix_fallocate = FALSE;
/* If this flag is TRUE, then we disable doublewrite buffer */
UNIV_INTERN my_bool srv_use_atomic_writes = FALSE;
/* If this flag IS TRUE, then we use lz4 to compress/decompress pages */
UNIV_INTERN long innodb_compression_algorithm = PAGE_ZLIB_ALGORITHM;
UNIV_INTERN ulong innodb_compression_algorithm = PAGE_ZLIB_ALGORITHM;
/* Number of threads used for multi-threaded flush */
UNIV_INTERN long srv_mtflush_threads = MTFLUSH_DEFAULT_WORKER;
/* If this flag is TRUE, then we will use multi threaded flush. */

View file

@ -1558,7 +1558,7 @@ innobase_start_or_create_for_mysql(void)
lsn_t min_flushed_lsn;
lsn_t max_flushed_lsn;
#ifdef UNIV_LOG_ARCHIVE
lsn_t min_arch_log_no;
lsn_t min_arch_log_no=0;
lsn_t max_arch_log_no;
#endif /* UNIV_LOG_ARCHIVE */
ulint sum_of_new_sizes;