summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-03-08 20:45:45 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-03-08 20:45:45 +0200
commitab7e2b048d7d0835ae7473873169b7606114348e (patch)
tree26660daf3f339f8bc54d2449985d951bc37b7921 /extra
parentbf71d263621c90cbddc7bde9bf071dae503f333f (diff)
parent6567636b09ba410a330cd45285e489c628c4ff37 (diff)
downloadmariadb-git-ab7e2b048d7d0835ae7473873169b7606114348e.tar.gz
Merge 10.1 into 10.2
Diffstat (limited to 'extra')
-rw-r--r--extra/mariabackup/backup_mysql.cc15
-rw-r--r--extra/mariabackup/xtrabackup.cc10
2 files changed, 22 insertions, 3 deletions
diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc
index a691cb664f1..184cd1b4504 100644
--- a/extra/mariabackup/backup_mysql.cc
+++ b/extra/mariabackup/backup_mysql.cc
@@ -55,8 +55,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
#include "encryption_plugin.h"
#include <sstream>
#include <sql_error.h>
-#include <ut0ut.h>
-
+#include "page0zip.h"
char *tool_name;
char tool_args[2048];
@@ -352,6 +351,7 @@ get_mysql_vars(MYSQL *connection)
char *innodb_undo_directory_var = NULL;
char *innodb_page_size_var = NULL;
char *innodb_undo_tablespaces_var = NULL;
+ char *page_zip_level_var = NULL;
char *endptr;
unsigned long server_version = mysql_get_server_version(connection);
@@ -381,6 +381,7 @@ get_mysql_vars(MYSQL *connection)
{"innodb_undo_directory", &innodb_undo_directory_var},
{"innodb_page_size", &innodb_page_size_var},
{"innodb_undo_tablespaces", &innodb_undo_tablespaces_var},
+ {"innodb_compression_level", &page_zip_level_var},
{NULL, NULL}
};
@@ -514,7 +515,13 @@ get_mysql_vars(MYSQL *connection)
}
if (innodb_undo_tablespaces_var) {
- srv_undo_tablespaces = strtoul(innodb_undo_tablespaces_var, &endptr, 10);
+ srv_undo_tablespaces = strtoul(innodb_undo_tablespaces_var,
+ &endptr, 10);
+ ut_ad(*endptr == 0);
+ }
+
+ if (page_zip_level_var != NULL) {
+ page_zip_level = strtoul(page_zip_level_var, &endptr, 10);
ut_ad(*endptr == 0);
}
@@ -1662,6 +1669,7 @@ bool write_backup_config_file()
"innodb_page_size=%lu\n"
"innodb_undo_directory=%s\n"
"innodb_undo_tablespaces=%lu\n"
+ "innodb_compression_level=%u\n"
"%s%s\n"
"%s\n",
innodb_checksum_algorithm_names[srv_checksum_algorithm],
@@ -1671,6 +1679,7 @@ bool write_backup_config_file()
srv_page_size,
srv_undo_dir,
srv_undo_tablespaces,
+ page_zip_level,
innobase_buffer_pool_filename ?
"innodb_buffer_pool_filename=" : "",
innobase_buffer_pool_filename ?
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 5737fcfca64..889d3ca3bac 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -834,6 +834,7 @@ enum options_xtrabackup
OPT_XTRA_TABLES_EXCLUDE,
OPT_XTRA_DATABASES_EXCLUDE,
OPT_PROTOCOL,
+ OPT_INNODB_COMPRESSION_LEVEL,
OPT_LOCK_DDL_PER_TABLE,
OPT_ROCKSDB_DATADIR,
OPT_BACKUP_ROCKSDB,
@@ -1365,6 +1366,11 @@ struct my_option xb_server_options[] =
(G_PTR*)&srv_undo_tablespaces, (G_PTR*)&srv_undo_tablespaces,
0, GET_ULONG, REQUIRED_ARG, 0, 0, 126, 0, 1, 0},
+ {"innodb_compression_level", OPT_INNODB_COMPRESSION_LEVEL,
+ "Compression level used for zlib compression.",
+ (G_PTR*)&page_zip_level, (G_PTR*)&page_zip_level,
+ 0, GET_UINT, REQUIRED_ARG, 6, 0, 9, 0, 0, 0},
+
{"defaults_group", OPT_DEFAULTS_GROUP, "defaults group in config file (default \"mysqld\").",
(G_PTR*) &defaults_group, (G_PTR*) &defaults_group,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -1701,6 +1707,10 @@ xb_get_one_option(int optid,
ADD_PRINT_PARAM_OPT(innodb_checksum_algorithm_names[srv_checksum_algorithm]);
break;
+ case OPT_INNODB_COMPRESSION_LEVEL:
+ ADD_PRINT_PARAM_OPT(page_zip_level);
+ break;
+
case OPT_INNODB_BUFFER_POOL_FILENAME:
ADD_PRINT_PARAM_OPT(innobase_buffer_pool_filename);