*** Bug #22151 ***
SET @@storage_engine = 'Falcon';
DROP DATABASE IF EXISTS test2;
# Establish connection conn1 (user = root)
SET @@storage_engine = 'Falcon';
# Switch to connection default
SET @@autocommit = 0;
CREATE DATABASE test2;
USE test2;
DROP TABLE IF EXISTS t1;
Warnings:
Note	1051	Unknown table 't1'
CREATE TABLE t1 (a int primary key, b int);
INSERT INTO t1 VALUES (0, 0), (1, 1);
COMMIT;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a int primary key, b int);
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
START TRANSACTION;
SELECT * FROM t1;
a	b
INSERT INTO t1 VALUES (0, 0);
# Switch to connection conn1
SET @@autocommit = 1;
USE test2;
INSERT INTO t1 VALUES (1, 1);
# Switch to connection default
INSERT INTO t1 VALUES (1, 2);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
ROLLBACK;
# Switch to connection conn1
INSERT INTO t1 VALUES (0, 6);
INSERT INTO t1 VALUES (0, 6);
ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
COMMIT;
# Switch to connection default
SELECT * FROM t1 ORDER BY a;
a	b
0	6
1	1
COMMIT;
SELECT count(*) FROM t1;
count(*)
2
COMMIT;
DROP DATABASE test2;
SET @@autocommit = 1;
USE test;
