SET storage_engine = Falcon;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a int, unique (a));
# Establish connection conn1 (user = root)
SET storage_engine = Falcon;
*** Bug #22847 - Test 1 ***
# Switch to connection default
START TRANSACTION;
INSERT INTO t1 VALUES (null);
# Switch to connection conn1
START TRANSACTION;
INSERT INTO t1 VALUES (null);
COMMIT;
# Switch to connection default
SELECT COUNT(*) FROM t1 WHERE a IS NULL;
COUNT(*)
1
COMMIT;
SELECT COUNT(*) FROM t1 WHERE a IS NULL;
COUNT(*)
2
DELETE FROM t1;
*** Bug #22847 - Test 2 ***
SET @@tx_isolation = 'REPEATABLE-READ';
START TRANSACTION;
INSERT INTO t1 VALUES (1);
# Switch to connection conn1
INSERT INTO t1 VALUES (2);
START TRANSACTION;
UPDATE t1 SET a = 3 where a = 2;
UPDATE t1 SET a = 4 where a = 3;
# Switch to connection default
SELECT * FROM t1;
a
1
INSERT INTO t1 VALUES (2);
# Switch to connection conn1
COMMIT;
# Switch to connection default
INSERT INTO t1 VALUES (3);
SELECT * FROM t1;
a
1
2
3
COMMIT;
DELETE FROM t1;
*** Bug #22847 - Test 3 ***
# Switch to connection conn1
SET @@tx_isolation = 'READ-COMMITTED';
START TRANSACTION;
INSERT INTO t1 VALUES (1);
# Switch to connection default
INSERT INTO t1 VALUES (2);
START TRANSACTION;
UPDATE t1 SET a = 3 where a = 2;
UPDATE t1 SET a = 4 where a = 3;
# Switch to connection conn1
SELECT * FROM t1;
a
1
2
INSERT INTO t1 VALUES (3);
SELECT * FROM t1;
a
1
2
3
COMMIT;
# Switch to connection default
COMMIT;
SELECT * FROM t1;
a
1
4
3
DROP TABLE t1;
