SET @@storage_engine = Falcon;
#
# Mantis bug #184: REPLACE crash with two interleaving transactions
#
--echo *** Bug #184 ***
--disable_warnings
DROP DATABASE IF EXISTS db64;
--enable_warnings
CREATE DATABASE db64;

connect (conn1,localhost,root,,);
SET @@storage_engine = Falcon;
USE db64;

connection default;
USE db64;
CREATE TABLE t1 (s1 int, primary key (s1));
SET @@autocommit = 0;
INSERT INTO t1 VALUES (1);

connection conn1;
SET @@autocommit = 0;
SELECT * FROM t1;

connection default;
COMMIT;

connection conn1;
REPLACE INTO t1 VALUES (1);
SELECT * FROM t1;
COMMIT;

# Final cleanup
disconnect conn1;
connection default;
DROP DATABASE db64;
