summaryrefslogtreecommitdiff
path: root/mysql-test/suite/maria
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/maria')
-rw-r--r--mysql-test/suite/maria/maria-recovery.result38
-rw-r--r--mysql-test/suite/maria/maria-recovery.test30
2 files changed, 68 insertions, 0 deletions
diff --git a/mysql-test/suite/maria/maria-recovery.result b/mysql-test/suite/maria/maria-recovery.result
index 6c9af3eac88..915dc53b460 100644
--- a/mysql-test/suite/maria/maria-recovery.result
+++ b/mysql-test/suite/maria/maria-recovery.result
@@ -292,6 +292,44 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria AUTO_INCREMENT=17 DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
insert into t1 values(null, "f");
drop table t1;
+Test that bulk insert works with recovery
+CREATE TABLE t1 (i int, key(i)) TRANSACTIONAL=1 ENGINE=ARIA;
+CREATE TABLE t2 (i int, key(i)) TRANSACTIONAL=1 ENGINE=ARIA;
+connection admin;
+* copied t2 for feeding_recovery
+* copied t1 for feeding_recovery
+connection default;
+insert into t2 values
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (3), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
+insert into t1 select * from t2;
+insert into t2 select * from t2;
+connection admin;
+SET SESSION debug_dbug="+d,maria_flush_whole_log,maria_crash";
+* crashing mysqld intentionally
+set global aria_checkpoint_interval=1;
+ERROR HY000: Lost connection to MySQL server during query
+* recovery happens
+connection default;
+use mysqltest;
+select count(*) from t1;
+count(*)
+100
+select count(*) from t2;
+count(*)
+200
+check table t2;
+Table Op Msg_type Msg_text
+mysqltest.t2 check status OK
+drop table t1,t2;
drop database mysqltest_for_feeding_recovery;
drop database mysqltest_for_comparison;
drop database mysqltest;
diff --git a/mysql-test/suite/maria/maria-recovery.test b/mysql-test/suite/maria/maria-recovery.test
index b0f01f37d0d..a1671a56d53 100644
--- a/mysql-test/suite/maria/maria-recovery.test
+++ b/mysql-test/suite/maria/maria-recovery.test
@@ -195,6 +195,36 @@ show create table t1;
insert into t1 values(null, "f");
drop table t1;
+--echo Test that bulk insert works with recovery
+let $mms_tables=2;
+
+CREATE TABLE t1 (i int, key(i)) TRANSACTIONAL=1 ENGINE=ARIA;
+CREATE TABLE t2 (i int, key(i)) TRANSACTIONAL=1 ENGINE=ARIA;
+-- source include/maria_make_snapshot_for_feeding_recovery.inc
+insert into t2 values
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (3), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
+insert into t1 select * from t2;
+insert into t2 select * from t2;
+let $mvr_restore_old_snapshot=0;
+let $mms_compare_physically=0;
+let $mvr_debug_option="+d,maria_flush_whole_log,maria_crash";
+let $mvr_crash_statement= set global aria_checkpoint_interval=1;
+let $mms_tables=0;
+-- source include/maria_verify_recovery.inc
+select count(*) from t1;
+select count(*) from t2;
+check table t2;
+drop table t1,t2;
+
# clean up everything
let $mms_purpose=feeding_recovery;
eval drop database mysqltest_for_$mms_purpose;