| 1 |
SET GLOBAL innodb_undo_log_truncate = 0; |
| 2 |
create table t1 (keyc int primary key default 0, c char(6)) engine=innodb; |
| 3 |
create table t2 (keyc int primary key default 0, c char(6)) engine=innodb; |
| 4 |
CREATE PROCEDURE p(t VARCHAR(64)) |
| 5 |
BEGIN |
| 6 |
DECLARE i TEXT DEFAULT 'insert into t1 select seq,repeat(chr(48),6) |
| 7 |
from seq_1_to_20000'; |
| 8 |
DECLARE u1 TEXT DEFAULT 'update t1 set c=repeat(chr(32),6)'; |
| 9 |
DECLARE u2 TEXT DEFAULT 'update t1 set c=repeat(chr(64),6)'; |
| 10 |
EXECUTE IMMEDIATE REPLACE(i,'t1', t); |
| 11 |
EXECUTE IMMEDIATE REPLACE(u1,'t1', t); |
| 12 |
EXECUTE IMMEDIATE REPLACE(u2,'t1', t); |
| 13 |
END; |
| 14 |
$$ |
| 15 |
connect con1,localhost,root,,; |
| 16 |
begin; |
| 17 |
call p('t1'); |
| 18 |
connection default; |
| 19 |
call p('t2'); |
| 20 |
connection con1; |
| 21 |
commit; |
| 22 |
disconnect con1; |
| 23 |
connection default; |
| 24 |
DROP PROCEDURE p; |
| 25 |
SET GLOBAL innodb_undo_log_truncate = 1; |
| 26 |
SET GLOBAL innodb_max_undo_log_size=DEFAULT; |
| 27 |
SET GLOBAL innodb_max_purge_lag_wait=0; |
| 28 |
# Prepare full backup |
| 29 |
# shutdown server |
| 30 |
# remove datadir |
| 31 |
# xtrabackup move back |
| 32 |
# restart |
| 33 |
select count(*) from t1; |
| 34 |
count(*) |
| 35 |
20000 |
| 36 |
select count(*) from t2; |
| 37 |
count(*) |
| 38 |
20000 |
| 39 |
DROP TABLE t1,t2; |