--source include/not_group_replication_plugin.inc
--source include/have_binlog_format_row.inc
--source include/have_rocksdb.inc
--source include/have_debug.inc
--source include/not_valgrind.inc

--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

create table t1 (a int primary key, msg varchar(255)) engine=rocksdb;

--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
SET SESSION debug="d,crash_commit_after_prepare";
--error 0,2013
insert into t1 values (1, 'dogz');
--enable_reconnect
--source include/wait_until_connected_again.inc
select * from t1;

--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
SET SESSION debug="d,crash_commit_after_log";
--error 0,2013
insert into t1 values (2, 'catz'), (3, 'men');
--enable_reconnect
--source include/wait_until_connected_again.inc
select * from t1;

--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
SET SESSION debug="d,crash_commit_after";
--error 0,2013
insert into t1 values (4, 'cars'), (5, 'foo');
--enable_reconnect
--source include/wait_until_connected_again.inc
select * from t1;

drop table t1;
