[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.118.252.85: ~ $
################################################################################
#
# Part of checking that REPEATABLE-READ transactions are indeed repeatable read.
#
# This test executes several queries in the same transaction which should return
# the exact same results. Some of the queries will use LIMIT, others will not.
#
# In order to trigger Falcon's LIMIT optimization we need to ORDER BY an indexed
# column, use a WHERE range predicate and include the LIMIT keyword.
#
################################################################################

SET autocommit = 0;
START TRANSACTION;

--echo Comparing results from 2 queries (unless we deadlock or some such)...
# Without LIMIT
let $query= SELECT * FROM t1 WHERE `pk` > 1000 ORDER BY `int1_key`;
--echo *** Query 1: $query
--source suite/engines/rr_trx/include/record_query_all_columns.inc

--echo *** Filler: 
SELECT SLEEP(1);

# With LIMIT. We assume that t1 will not have more than <limit> rows.
# With some large limit, just to exercise the optimization but return the same results:
let $query= SELECT * FROM t1 WHERE `pk` > 1000 ORDER BY `int1_key` LIMIT 987654321;
--echo *** Query 2: $query
# Disable warnings (due to warning about unsafe binlogging with LIMIT).
--disable_warnings
--source suite/engines/rr_trx/include/record_query_all_columns.inc
--enable_warnings

--echo *** 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;

# With LIMIT.
let $query= SELECT * FROM t1 WHERE `pk` > 1000 ORDER BY `int1_key` LIMIT 987654321;
--echo *** Query 3: $query
--disable_warnings
--source suite/engines/rr_trx/include/record_query_all_columns.inc
--enable_warnings

--echo *** Filler:
UPDATE tmpSelectLimitNoLimit SET a = 3;
SELECT SLEEP(1);

#Without LIMIT:
let $query= SELECT * FROM t1 WHERE `pk` > 1000 ORDER BY `int1_key`;
--echo *** Query 4: $query
--source suite/engines/rr_trx/include/record_query_all_columns.inc

# Compare queries
--source suite/engines/rr_trx/include/check_repeatable_read_all_columns.inc

COMMIT;

Filemanager

Name Type Size Permission Actions
init_innodb.test File 110 B 0644
rr_c_count_not_zero.test File 1.02 KB 0644
rr_c_stats.test File 131 B 0644
rr_i_40-44.test File 5.54 KB 0644
rr_id_3.test File 995 B 0644
rr_id_900.test File 5.74 KB 0644
rr_insert_select_2.test File 2.11 KB 0644
rr_iud_rollback-multi-50.test File 3.02 KB 0644
rr_replace_7-8.test File 3.87 KB 0644
rr_s_select-uncommitted.test File 387 B 0644
rr_sc_select-limit-nolimit_4.test File 2.34 KB 0644
rr_sc_select-same_2.test File 1.93 KB 0644
rr_sc_sum_total.test File 968 B 0644
rr_u_10-19.test File 15.41 KB 0644
rr_u_10-19_nolimit.test File 15.03 KB 0644
rr_u_4.test File 1.36 KB 0644