summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-01-28 15:37:01 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2019-01-28 15:37:01 +0100
commit959f7415bd5880f680320cfaebc11b4c77fe36bc (patch)
tree4d663371ea398a6b93b2289df020e64d1a86d95d
parentc2197e0cd2a12cc7b76db74437ff6f60970bf314 (diff)
parent3262afc6c50bdee489dd35feb8c5254dbc93494b (diff)
downloadmariadb-git-959f7415bd5880f680320cfaebc11b4c77fe36bc.tar.gz
Merge branch 'merge-xtradb-5.6' into 10.0
-rw-r--r--storage/xtradb/include/univ.i2
-rw-r--r--storage/xtradb/log/log0online.cc41
-rw-r--r--storage/xtradb/row/row0mysql.cc12
3 files changed, 41 insertions, 14 deletions
diff --git a/storage/xtradb/include/univ.i b/storage/xtradb/include/univ.i
index e9ff9103fdd..976bed244a0 100644
--- a/storage/xtradb/include/univ.i
+++ b/storage/xtradb/include/univ.i
@@ -48,7 +48,7 @@ Created 1/20/1994 Heikki Tuuri
#define INNODB_VERSION_BUGFIX 39
#ifndef PERCONA_INNODB_VERSION
-#define PERCONA_INNODB_VERSION 84.1
+#define PERCONA_INNODB_VERSION 84.2
#endif
/* Enable UNIV_LOG_ARCHIVE in XtraDB */
diff --git a/storage/xtradb/log/log0online.cc b/storage/xtradb/log/log0online.cc
index 736ef3e3d08..bf26690e8b3 100644
--- a/storage/xtradb/log/log0online.cc
+++ b/storage/xtradb/log/log0online.cc
@@ -1873,6 +1873,8 @@ log_online_purge_changed_page_bitmaps(
for (i = 0; i < bitmap_files.count; i++) {
+ char full_bmp_file_name[2 * FN_REFLEN + 2];
+
/* We consider the end LSN of the current bitmap, derived from
the start LSN of the subsequent bitmap file, to determine
whether to remove the current bitmap. Note that bitmap_files
@@ -1888,8 +1890,45 @@ log_online_purge_changed_page_bitmaps(
break;
}
+
+ /* In some non-trivial cases the sequence of .xdb files may
+ have gaps. For instance:
+ ib_modified_log_1_0.xdb
+ ib_modified_log_2_<mmm>.xdb
+ ib_modified_log_4_<nnn>.xdb
+ Adding this check as a safety precaution. */
+ if (bitmap_files.files[i].name[0] == '\0')
+ continue;
+
+ /* If redo log tracking is enabled, reuse 'bmp_file_home'
+ from 'log_bmp_sys'. Otherwise, compose the full '.xdb' file
+ path from 'srv_data_home', adding a path separator if
+ necessary. */
+ if (log_bmp_sys != NULL) {
+ ut_snprintf(full_bmp_file_name,
+ sizeof(full_bmp_file_name),
+ "%s%s", log_bmp_sys->bmp_file_home,
+ bitmap_files.files[i].name);
+ }
+ else {
+ char separator[2] = {0, 0};
+ const size_t srv_data_home_len =
+ strlen(srv_data_home);
+
+ ut_a(srv_data_home_len < FN_REFLEN);
+ if (srv_data_home_len != 0 &&
+ srv_data_home[srv_data_home_len - 1] !=
+ SRV_PATH_SEPARATOR) {
+ separator[0] = SRV_PATH_SEPARATOR;
+ }
+ ut_snprintf(full_bmp_file_name,
+ sizeof(full_bmp_file_name), "%s%s%s",
+ srv_data_home, separator,
+ bitmap_files.files[i].name);
+ }
+
if (!os_file_delete_if_exists(innodb_file_bmp_key,
- bitmap_files.files[i].name)) {
+ full_bmp_file_name)) {
os_file_get_last_error(TRUE);
result = TRUE;
diff --git a/storage/xtradb/row/row0mysql.cc b/storage/xtradb/row/row0mysql.cc
index e828d8a8611..d51771820a2 100644
--- a/storage/xtradb/row/row0mysql.cc
+++ b/storage/xtradb/row/row0mysql.cc
@@ -4996,18 +4996,6 @@ row_rename_table_for_mysql(
goto funct_exit;
}
- /* Wait for background fts sync to finish */
- for (retry = 1; dict_fts_index_syncing(table); ++retry) {
- DICT_BG_YIELD(trx);
- if (retry % 100 == 0) {
- ib_logf(IB_LOG_LEVEL_INFO,
- "Unable to rename table %s to new name"
- " %s because FTS sync is running on table."
- " Retrying\n",
- old_name, new_name);
- }
- }
-
/* We use the private SQL parser of Innobase to generate the query
graphs needed in updating the dictionary data from system tables. */