#---- Bug #22212 (Mantis #264) ----
# Initialization
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (id INTEGER, x CHAR(20)) ENGINE=Falcon;
INSERT INTO t1 VALUES(0, 'Initialized');
COMMIT;
# Establish connection con1 (user=root)
SET AUTOCOMMIT = 0;
# Establish connection con2 (user=root)
SET AUTOCOMMIT = 0;
# Switch to connection con1
UPDATE t1 SET x = 'Update by con1' WHERE id = 0;
# Switch to connection con2
# The following UPDATE t1 SET x = 'Update by con2' WHERE id = 0 is sent without
# waiting of the client (for this session) for completion.
# That means if you see the statement printed in the protocoll
# the outcome of the statement is unknown and no following server
# message etc. does not mean that the statement was successful
# completed.
UPDATE t1 SET x = 'Update by con2' WHERE id = 0;;
# Switch to connection con1
COMMIT;
# Switch to connection con2
# Here the connection prints the outcome of the preceeding
# UPDATE t1 SET x = 'Update by con2' WHERE id = 0;
# If there is nothing printed before the next statement (COMMIT)
# appears the outcome was success.
ERROR HY000: Record has changed since last read in table 't1'
COMMIT;
SELECT * FROM t1;
id	x
0	Update by con1
COMMIT;
DROP TABLE t1;
