summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-10-26 17:21:26 +0100
committerSergei Golubchik <serg@mariadb.org>2020-10-27 09:24:15 +0100
commitd03ea82759aef7734f162c3137b10aa2476b35e9 (patch)
tree4530dc4d0a4f41f3e1cab9edcf4401719fbaf18e
parenta7d5e85c4935080458fea21c718f56c7bf6f02bd (diff)
downloadmariadb-git-d03ea82759aef7734f162c3137b10aa2476b35e9.tar.gz
test case for BUG#31650096
-rw-r--r--mysql-test/r/bootstrap_innodb.result7
-rw-r--r--mysql-test/t/bootstrap_innodb.test27
2 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/r/bootstrap_innodb.result b/mysql-test/r/bootstrap_innodb.result
new file mode 100644
index 00000000000..2fc7800843b
--- /dev/null
+++ b/mysql-test/r/bootstrap_innodb.result
@@ -0,0 +1,7 @@
+create table t1(a int) engine=innodb;
+select * from t1;
+a
+1
+2
+5
+drop table t1;
diff --git a/mysql-test/t/bootstrap_innodb.test b/mysql-test/t/bootstrap_innodb.test
new file mode 100644
index 00000000000..ddaefb32155
--- /dev/null
+++ b/mysql-test/t/bootstrap_innodb.test
@@ -0,0 +1,27 @@
+source include/have_static_innodb.inc;
+source include/not_embedded.inc;
+
+let $datadir= `select @@datadir`;
+
+create table t1(a int) engine=innodb;
+source include/shutdown_mysqld.inc;
+
+write_file $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql;
+use test;
+insert t1 values (1);
+start transaction;
+insert t1 values (2);
+savepoint s1;
+insert t1 values (3);
+savepoint s2;
+insert t1 values (4);
+rollback to savepoint s1;
+insert t1 values (5);
+commit;
+EOF
+exec $MYSQLD_BOOTSTRAP_CMD --datadir=$datadir --innodb < $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1;
+remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql;
+
+source include/start_mysqld.inc;
+select * from t1;
+drop table t1;