Skip to content

Commit

Permalink
merge the compilation fixes from 10.0-FusionIO
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei Golubchik committed May 26, 2014
2 parents 1016ee9 + 4e68faf commit 6a85b10
Show file tree
Hide file tree
Showing 15 changed files with 47 additions and 41 deletions.
10 changes: 5 additions & 5 deletions cmake/lzo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down
1 change: 0 additions & 1 deletion storage/innobase/fil/fil0fil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion storage/innobase/fil/fil0pagecompress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
{
Expand Down
28 changes: 16 additions & 12 deletions storage/innobase/handler/ha_innodb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion storage/innobase/include/fil0pagecompress.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */

Expand Down
2 changes: 1 addition & 1 deletion storage/innobase/include/srv0srv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion storage/innobase/srv/srv0srv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
1 change: 0 additions & 1 deletion storage/xtradb/fil/fil0fil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion storage/xtradb/fil/fil0pagecompress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
{
Expand Down
28 changes: 16 additions & 12 deletions storage/xtradb/handler/ha_innodb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion storage/xtradb/include/fil0pagecompress.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */

Expand Down
2 changes: 1 addition & 1 deletion storage/xtradb/include/srv0srv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion storage/xtradb/log/log0log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion storage/xtradb/srv/srv0srv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion storage/xtradb/srv/srv0start.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6a85b10

Please sign in to comment.