summaryrefslogtreecommitdiff
path: root/extra/mariabackup
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-11-11 23:07:24 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-11-13 02:11:48 +0200
commitc19ef508b89b8abd2d320153a3d8960f60a0ad84 (patch)
tree3e88ab634ab48ae09242c40b52ebf720fe3324e9 /extra/mariabackup
parent17bd6ed29ad32c2c99d503db9a167aca16558c99 (diff)
downloadmariadb-git-c19ef508b89b8abd2d320153a3d8960f60a0ad84.tar.gz
InnoDB: Remove ut_snprintf() and the use of my_snprintf(); use snprintf()
Diffstat (limited to 'extra/mariabackup')
-rw-r--r--extra/mariabackup/backup_copy.cc13
-rw-r--r--extra/mariabackup/backup_mysql.cc14
-rw-r--r--extra/mariabackup/changed_page_bitmap.cc2
-rw-r--r--extra/mariabackup/xtrabackup.cc8
4 files changed, 18 insertions, 19 deletions
diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc
index 0b501970efa..5c18098355f 100644
--- a/extra/mariabackup/backup_copy.cc
+++ b/extra/mariabackup/backup_copy.cc
@@ -252,9 +252,8 @@ datadir_iter_next_database(datadir_iter_t *it)
it->dbpath = static_cast<char*>(
malloc(it->dbpath_len));
}
- ut_snprintf(it->dbpath, it->dbpath_len,
- "%s/%s", it->datadir_path,
- it->dbinfo.name);
+ snprintf(it->dbpath, it->dbpath_len, "%s/%s",
+ it->datadir_path, it->dbinfo.name);
os_normalize_path(it->dbpath);
if (it->dbinfo.type == OS_FILE_TYPE_FILE) {
@@ -1034,8 +1033,8 @@ move_file(ds_ctxt_t *datasink,
char dst_dir_abs[FN_REFLEN];
size_t dirname_length;
- ut_snprintf(dst_file_path_abs, sizeof(dst_file_path_abs),
- "%s/%s", dst_dir, dst_file_path);
+ snprintf(dst_file_path_abs, sizeof(dst_file_path_abs),
+ "%s/%s", dst_dir, dst_file_path);
dirname_part(dst_dir_abs, dst_file_path_abs, &dirname_length);
@@ -1252,8 +1251,8 @@ backup_files(const char *from, bool prep_mode)
} else if (!prep_mode) {
/* backup fake file into empty directory */
char path[FN_REFLEN];
- ut_snprintf(path, sizeof(path),
- "%s/db.opt", node.filepath);
+ snprintf(path, sizeof(path),
+ "%s/db.opt", node.filepath);
if (!(ret = backup_file_printf(
trim_dotslash(path), "%s", ""))) {
msg("Failed to create file %s\n", path);
diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc
index aa683e320fc..4a33f9ef4e5 100644
--- a/extra/mariabackup/backup_mysql.cc
+++ b/extra/mariabackup/backup_mysql.cc
@@ -589,7 +589,7 @@ select_incremental_lsn_from_history(lsn_t *incremental_lsn)
mysql_real_escape_string(mysql_connection, buf,
opt_incremental_history_name,
(unsigned long)strlen(opt_incremental_history_name));
- ut_snprintf(query, sizeof(query),
+ snprintf(query, sizeof(query),
"SELECT innodb_to_lsn "
"FROM PERCONA_SCHEMA.xtrabackup_history "
"WHERE name = '%s' "
@@ -602,7 +602,7 @@ select_incremental_lsn_from_history(lsn_t *incremental_lsn)
mysql_real_escape_string(mysql_connection, buf,
opt_incremental_history_uuid,
(unsigned long)strlen(opt_incremental_history_uuid));
- ut_snprintf(query, sizeof(query),
+ snprintf(query, sizeof(query),
"SELECT innodb_to_lsn "
"FROM PERCONA_SCHEMA.xtrabackup_history "
"WHERE uuid = '%s' "
@@ -766,7 +766,7 @@ kill_long_queries(MYSQL *connection, time_t timeout)
is_select_query(info))) {
msg_ts("Killing query %s (duration %d sec): %s\n",
id, (int)duration, info);
- ut_snprintf(kill_stmt, sizeof(kill_stmt),
+ snprintf(kill_stmt, sizeof(kill_stmt),
"KILL %s", id);
xb_mysql_query(connection, kill_stmt, false, false);
}
@@ -1288,8 +1288,8 @@ write_current_binlog_file(MYSQL *connection)
goto cleanup;
}
- ut_snprintf(filepath, sizeof(filepath), "%s%c%s",
- log_bin_dir, FN_LIBCHAR, log_bin_file);
+ snprintf(filepath, sizeof(filepath), "%s%c%s",
+ log_bin_dir, FN_LIBCHAR, log_bin_file);
result = copy_file(ds_data, filepath, log_bin_file, 0);
}
@@ -1574,8 +1574,8 @@ char *make_argv(char *buf, size_t len, int argc, char **argv)
if (strncmp(*argv, "--password", strlen("--password")) == 0) {
arg = "--password=...";
}
- left-= ut_snprintf(buf + len - left, left,
- "%s%c", arg, argc > 1 ? ' ' : 0);
+ left-= snprintf(buf + len - left, left,
+ "%s%c", arg, argc > 1 ? ' ' : 0);
++argv; --argc;
}
diff --git a/extra/mariabackup/changed_page_bitmap.cc b/extra/mariabackup/changed_page_bitmap.cc
index a430a6cb0af..46bb3a7bcb5 100644
--- a/extra/mariabackup/changed_page_bitmap.cc
+++ b/extra/mariabackup/changed_page_bitmap.cc
@@ -441,7 +441,7 @@ log_online_open_bitmap_file_read_only(
xb_ad(name[0] != '\0');
- ut_snprintf(bitmap_file->name, FN_REFLEN, "%s%s", srv_data_home, name);
+ snprintf(bitmap_file->name, FN_REFLEN, "%s%s", srv_data_home, name);
bitmap_file->file = os_file_create_simple_no_error_handling(
0, bitmap_file->name,
OS_FILE_OPEN, OS_FILE_READ_ONLY, true, &success);
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index de32b5b864f..4c09bea28ba 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -2685,10 +2685,10 @@ xb_load_single_table_tablespace(
name = static_cast<char*>(ut_malloc_nokey(pathlen));
if (dirname != NULL) {
- ut_snprintf(name, pathlen, "%s/%s", dirname, filname);
+ snprintf(name, pathlen, "%s/%s", dirname, filname);
name[pathlen - 5] = 0;
} else {
- ut_snprintf(name, pathlen, "%s", filname);
+ snprintf(name, pathlen, "%s", filname);
name[pathlen - 5] = 0;
}
@@ -2806,8 +2806,8 @@ static dberr_t enumerate_ibd_files(process_single_tablespace_func_t callback)
dbpath = static_cast<char*>(ut_malloc_nokey(dbpath_len));
}
- ut_snprintf(dbpath, dbpath_len,
- "%s/%s", fil_path_to_mysql_datadir, dbinfo.name);
+ snprintf(dbpath, dbpath_len,
+ "%s/%s", fil_path_to_mysql_datadir, dbinfo.name);
os_normalize_path(dbpath);
if (check_if_skip_database_by_path(dbpath)) {