SET autocommit = 0;
START TRANSACTION;
Comparing results from 2 queries (unless we deadlock or some such)...
*** Query 1: SELECT * FROM t1 WHERE `pk` > 1000 ORDER BY `int1_key`
*** Disabling query log (we may deadlock and not do this after all)
*** Creating temp table with results from query 'SELECT * FROM t1 WHERE `pk` > 1000 ORDER BY `int1_key`' unless we deadlock or time out.
*** Enabling query log
*** Filler:
SELECT SLEEP(1);
SLEEP(1)
0
*** Query 2: SELECT * FROM t1 WHERE `pk` > 1000 ORDER BY `int1_key` LIMIT 987654321
*** Disabling query log (we may deadlock and not do this after all)
*** Creating temp table with results from query 'SELECT * FROM t1 WHERE `pk` > 1000 ORDER BY `int1_key` LIMIT 987654321' unless we deadlock or time out.
*** Enabling query log
*** Filler: Do something other than sleep while waiting for other transactions to do stuff...
CREATE TEMPORARY TABLE tmpSelectLimitNoLimit (a INT, b VARCHAR(255), c TIMESTAMP, KEY(a));
INSERT INTO tmpSelectLimitNoLimit VALUES
(-1, 'This is a filler', NOW()),
(0, 'More stuff', NOW()),
(999999999, 'Even more bogus data', NOW()),
(-98765, 'Even more bogus data', NOW());
SELECT * FROM tmpSelectLimitNoLimit WHERE a < -99999999 ORDER BY a;
a b c
*** Query 3: SELECT * FROM t1 WHERE `pk` > 1000 ORDER BY `int1_key` LIMIT 987654321
*** Disabling query log (we may deadlock and not do this after all)
*** Creating temp table with results from query 'SELECT * FROM t1 WHERE `pk` > 1000 ORDER BY `int1_key` LIMIT 987654321' unless we deadlock or time out.
*** Enabling query log
*** Filler:
UPDATE tmpSelectLimitNoLimit SET a = 3;
SELECT SLEEP(1);
SLEEP(1)
0
*** Query 4: SELECT * FROM t1 WHERE `pk` > 1000 ORDER BY `int1_key`
*** Disabling query log (we may deadlock and not do this after all)
*** Creating temp table with results from query 'SELECT * FROM t1 WHERE `pk` > 1000 ORDER BY `int1_key`' unless we deadlock or time out.
*** Enabling query log
***************************************************************************
* Checking REPEATABLE READ by comparing result sets from same transaction
***************************************************************************
*** Query log disabled. See include files used by test for query details.
*** Comparing query 1 (A) with query 2 (B):
###########################
# Detect missing rows:
###########################
A.pk B.pk A.id B.id A.int1 B.int1 A.int1_key B.int1_key A.int1_unique B.int1_unique A.int2 B.int2 A.int2_key B.int2_key A.int2_unique B.int2_unique A.for_update B.for_update A.timestamp B.timestamp A.connection_id B.connection_id A.thread_id B.thread_id A.is_uncommitted B.is_uncommitted A.is_consistent B.is_consistent
###########################
# Detect changed rows:
###########################
A.pk B.pk A.id B.id A.int1 B.int1 A.int1_key B.int1_key A.int1_unique B.int1_unique A.int2 B.int2 A.int2_key B.int2_key A.int2_unique B.int2_unique A.for_update B.for_update A.timestamp B.timestamp A.connection_id B.connection_id A.thread_id B.thread_id A.is_uncommitted B.is_uncommitted A.is_consistent B.is_consistent
*** Comparing query 2 (A) with query 3 (B):
###########################
# Detect missing rows:
###########################
A.pk B.pk A.id B.id A.int1 B.int1 A.int1_key B.int1_key A.int1_unique B.int1_unique A.int2 B.int2 A.int2_key B.int2_key A.int2_unique B.int2_unique A.for_update B.for_update A.timestamp B.timestamp A.connection_id B.connection_id A.thread_id B.thread_id A.is_uncommitted B.is_uncommitted A.is_consistent B.is_consistent
###########################
# Detect changed rows:
###########################
A.pk B.pk A.id B.id A.int1 B.int1 A.int1_key B.int1_key A.int1_unique B.int1_unique A.int2 B.int2 A.int2_key B.int2_key A.int2_unique B.int2_unique A.for_update B.for_update A.timestamp B.timestamp A.connection_id B.connection_id A.thread_id B.thread_id A.is_uncommitted B.is_uncommitted A.is_consistent B.is_consistent
*** Comparing query 3 (A) with query 4 (B):
###########################
# Detect missing rows:
###########################
A.pk B.pk A.id B.id A.int1 B.int1 A.int1_key B.int1_key A.int1_unique B.int1_unique A.int2 B.int2 A.int2_key B.int2_key A.int2_unique B.int2_unique A.for_update B.for_update A.timestamp B.timestamp A.connection_id B.connection_id A.thread_id B.thread_id A.is_uncommitted B.is_uncommitted A.is_consistent B.is_consistent
###########################
# Detect changed rows:
###########################
A.pk B.pk A.id B.id A.int1 B.int1 A.int1_key B.int1_key A.int1_unique B.int1_unique A.int2 B.int2 A.int2_key B.int2_key A.int2_unique B.int2_unique A.for_update B.for_update A.timestamp B.timestamp A.connection_id B.connection_id A.thread_id B.thread_id A.is_uncommitted B.is_uncommitted A.is_consistent B.is_consistent
COMMIT;