Commit 5f68269a authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-217 - Assertion `thd->stmt_arena != thd->progress.arena' failed in...

MDEV-217 - Assertion `thd->stmt_arena != thd->progress.arena' failed in thd_progress_init on OPTIMIZE two tables when replaced by recreate

call thd_progress_end() in the copy_data_between_tables(), to match its
thd_progress_init().
parent 6e827f34
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (b INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
INSERT INTO t2 VALUES (3),(4);
OPTIMIZE TABLE t1, t2;
Table Op Msg_type Msg_text
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
test.t2 optimize note Table does not support optimize, doing recreate + analyze instead
test.t2 optimize status OK
drop table t1, t2;
--source include/have_xtradb.inc
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (b INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
INSERT INTO t2 VALUES (3),(4);
OPTIMIZE TABLE t1, t2;
drop table t1, t2;
......@@ -7381,6 +7381,7 @@ err:
error=1;
if (error < 0 && to->file->extra(HA_EXTRA_PREPARE_FOR_RENAME))
error= 1;
thd_progress_end(thd);
DBUG_RETURN(error > 0 ? -1 : 0);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment