Skip to content

Commit d2ae4e8

Browse files
authored
*: stabilize integrationtest stale read timestamp (#65953)
close #65952
1 parent d122abe commit d2ae4e8

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

tests/integrationtest/r/executor/index_lookup_pushdown.result

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -512,29 +512,29 @@ IndexLookUp_7 10000.00 root
512512
│ └─TableRowIDScan_8(Probe) 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo
513513
└─TableRowIDScan_6(Probe) 0.00 cop[tikv] table:t1 keep order:false, stats:pseudo
514514
do sleep(0.1);
515-
explain select /*+ index_lookup_pushdown(t1, i) */ * from t1 as of timestamp NOW(6) - interval 0.05 second;
515+
explain select /*+ index_lookup_pushdown(t1, i) */ * from t1 as of timestamp NOW(6) - interval 0.1 second;
516516
id estRows task access object operator info
517517
TableReader_6 10000.00 root data:TableFullScan_5
518518
└─TableFullScan_5 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo
519519
Level Code Message
520520
Warning 1815 hint INDEX_LOOKUP_PUSHDOWN is inapplicable, stale read is not supported
521-
start transaction read only as of timestamp now(6) - interval 0.05 second;
521+
start transaction read only as of timestamp now(6) - interval 0.1 second;
522522
explain select /*+ index_lookup_pushdown(t1, i) */ * from t1;
523523
id estRows task access object operator info
524524
TableReader_6 10000.00 root data:TableFullScan_5
525525
└─TableFullScan_5 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo
526526
Level Code Message
527527
Warning 1815 hint INDEX_LOOKUP_PUSHDOWN is inapplicable, stale read is not supported
528528
rollback;
529-
set transaction read only as of timestamp now(6) - interval 0.05 second;
529+
set transaction read only as of timestamp now(6) - interval 0.1 second;
530530
explain select /*+ index_lookup_pushdown(t1, i) */ * from t1;
531531
id estRows task access object operator info
532532
TableReader_6 10000.00 root data:TableFullScan_5
533533
└─TableFullScan_5 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo
534534
Level Code Message
535535
Warning 1815 hint INDEX_LOOKUP_PUSHDOWN is inapplicable, stale read is not supported
536536
insert ignore into mysql.tidb VALUES ('tikv_gc_safe_point', '20240131-00:00:00.000 +0800', 'mock for index lookup push down test');
537-
set @@tidb_snapshot=(now(6) - interval 0.05 second);
537+
set @@tidb_snapshot=(now(6) - interval 0.1 second);
538538
explain select /*+ index_lookup_pushdown(t1, i) */ * from t1;
539539
id estRows task access object operator info
540540
TableReader_6 10000.00 root data:TableFullScan_5

tests/integrationtest/r/executor/stale_txn.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
select * from information_schema.ddl_jobs as of timestamp now(6) - interval 1 microsecond;
1+
select * from information_schema.ddl_jobs as of timestamp now(6) - interval 0.1 second;
22
drop table if exists t1;
33
create table t1 (id int primary key, v int);
44
insert into t1 values(1, 10);

tests/integrationtest/t/executor/index_lookup_pushdown.test

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,17 +173,17 @@ set @@tidb_replica_read='leader';
173173
explain select /*+ index_lookup_pushdown(t1, i) */ * from t1;
174174
## stale read is not supported
175175
do sleep(0.1);
176-
explain select /*+ index_lookup_pushdown(t1, i) */ * from t1 as of timestamp NOW(6) - interval 0.05 second;
177-
start transaction read only as of timestamp now(6) - interval 0.05 second;
176+
explain select /*+ index_lookup_pushdown(t1, i) */ * from t1 as of timestamp NOW(6) - interval 0.1 second;
177+
start transaction read only as of timestamp now(6) - interval 0.1 second;
178178
explain select /*+ index_lookup_pushdown(t1, i) */ * from t1;
179179
rollback;
180-
set transaction read only as of timestamp now(6) - interval 0.05 second;
180+
set transaction read only as of timestamp now(6) - interval 0.1 second;
181181
explain select /*+ index_lookup_pushdown(t1, i) */ * from t1;
182182
## historical read is not supported
183183
--disable_warnings
184184
insert ignore into mysql.tidb VALUES ('tikv_gc_safe_point', '20240131-00:00:00.000 +0800', 'mock for index lookup push down test');
185185
--enable_warnings
186-
set @@tidb_snapshot=(now(6) - interval 0.05 second);
186+
set @@tidb_snapshot=(now(6) - interval 0.1 second);
187187
explain select /*+ index_lookup_pushdown(t1, i) */ * from t1;
188188
set @@tidb_snapshot='';
189189
delete from mysql.tidb where VARIABLE_NAME='tikv_gc_safe_point' and COMMENT='mock for index lookup push down test';

tests/integrationtest/t/executor/stale_txn.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# TestIssue35686
22
## This query should not panic
33
--disable_result_log
4-
select * from information_schema.ddl_jobs as of timestamp now(6) - interval 1 microsecond;
4+
select * from information_schema.ddl_jobs as of timestamp now(6) - interval 0.1 second;
55
--enable_result_log
66

77
# TestIssue31954

0 commit comments

Comments
 (0)