summaryrefslogtreecommitdiff
path: root/sql/rpl_gtid.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-09-07 22:15:06 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-09-07 22:15:06 +0300
commit5a1868b58d26b286b6ad433096e7184895953311 (patch)
tree9cee54b5852a4e33897d4fdf22c8c85619d12662 /sql/rpl_gtid.cc
parent4901f31c13f91e130f077f2f77b32c40b0036e32 (diff)
parent980d1bf1a921a270423ab36bd5d1ce2a1cd7590b (diff)
downloadmariadb-git-5a1868b58d26b286b6ad433096e7184895953311.tar.gz
MDEV-13564 Mariabackup does not work with TRUNCATE
This is a merge from 10.2, but the 10.2 version of this will not be pushed into 10.2 yet, because the 10.2 version would include backports of MDEV-14717 and MDEV-14585, which would introduce a crash recovery regression: Tables could be lost on table-rebuilding DDL operations, such as ALTER TABLE, OPTIMIZE TABLE or this new backup-friendly TRUNCATE TABLE. The test innodb.truncate_crash occasionally loses the table due to the following bug: MDEV-17158 log_write_up_to() sometimes fails
Diffstat (limited to 'sql/rpl_gtid.cc')
-rw-r--r--sql/rpl_gtid.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/rpl_gtid.cc b/sql/rpl_gtid.cc
index ad885c925d9..4752eac283f 100644
--- a/sql/rpl_gtid.cc
+++ b/sql/rpl_gtid.cc
@@ -403,6 +403,8 @@ rpl_slave_state::truncate_state_table(THD *thd)
tlist.init_one_table(&MYSQL_SCHEMA_NAME, &rpl_gtid_slave_state_table_name, NULL, TL_WRITE);
if (!(err= open_and_lock_tables(thd, &tlist, FALSE, 0)))
{
+ tdc_remove_table(thd, TDC_RT_REMOVE_UNUSED, "mysql",
+ rpl_gtid_slave_state_table_name.str, false);
err= tlist.table->file->ha_truncate();
if (err)