mirror of
https://github.com/MariaDB/server.git
synced 2025-09-03 20:43:11 +03:00
use ENUM not ULONG for innodb-compression-algorithm command-line option
This commit is contained in:
@@ -16804,14 +16804,17 @@ static MYSQL_SYSVAR_BOOL(use_trim, srv_use_trim,
|
||||
#else
|
||||
#define default_compression_algorithm PAGE_ZLIB_ALGORITHM
|
||||
#endif
|
||||
static MYSQL_SYSVAR_LONG(compression_algorithm, innodb_compression_algorithm,
|
||||
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. 1 for zlib, 2 for lz3, 3 for lzo",
|
||||
NULL, NULL,
|
||||
PAGE_ZLIB_ALGORITHM,
|
||||
0,
|
||||
default_compression_algorithm,
|
||||
0);
|
||||
"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,
|
||||
|
@@ -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
|
||||
|
@@ -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. */
|
||||
|
@@ -17961,14 +17961,17 @@ static MYSQL_SYSVAR_BOOL(use_trim, srv_use_trim,
|
||||
#else
|
||||
#define default_compression_algorithm PAGE_ZLIB_ALGORITHM
|
||||
#endif
|
||||
static MYSQL_SYSVAR_LONG(compression_algorithm, innodb_compression_algorithm,
|
||||
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. 1 for zlib, 2 for lz3, 3 for lzo",
|
||||
NULL, NULL,
|
||||
PAGE_ZLIB_ALGORITHM,
|
||||
0,
|
||||
default_compression_algorithm,
|
||||
0);
|
||||
"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,
|
||||
|
@@ -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
|
||||
|
@@ -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. */
|
||||
|
Reference in New Issue
Block a user