Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explaintest: Support concurrent execution #46346

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions cmd/explaintest/r/black_list.result
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
set tidb_cost_model_version=1;
use test;
drop table if exists t;
create table t (a int);
explain format = 'brief' select * from t where a < 1;
id estRows task access object operator info
TableReader 3323.33 root data:Selection
└─Selection 3323.33 cop[tikv] lt(test.t.a, 1)
└─Selection 3323.33 cop[tikv] lt(black_list.t.a, 1)
└─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo
insert into mysql.opt_rule_blacklist values('predicate_push_down');
admin reload opt_rule_blacklist;

explain format = 'brief' select * from t where a < 1;
id estRows task access object operator info
Selection 8000.00 root lt(test.t.a, 1)
Selection 8000.00 root lt(black_list.t.a, 1)
└─TableReader 10000.00 root data:TableFullScan
└─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo
delete from mysql.opt_rule_blacklist where name='predicate_push_down';
Expand All @@ -21,14 +20,14 @@ admin reload opt_rule_blacklist;
explain format = 'brief' select * from t where a < 1;
id estRows task access object operator info
TableReader 3323.33 root data:Selection
└─Selection 3323.33 cop[tikv] lt(test.t.a, 1)
└─Selection 3323.33 cop[tikv] lt(black_list.t.a, 1)
└─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo
insert into mysql.expr_pushdown_blacklist values('<', 'tikv,tiflash,tidb', 'for test');
admin reload expr_pushdown_blacklist;

explain format = 'brief' select * from t where a < 1;
id estRows task access object operator info
Selection 8000.00 root lt(test.t.a, 1)
Selection 8000.00 root lt(black_list.t.a, 1)
└─TableReader 10000.00 root data:TableFullScan
└─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo
delete from mysql.expr_pushdown_blacklist where name='<' and store_type = 'tikv,tiflash,tidb' and reason = 'for test';
Expand All @@ -37,14 +36,14 @@ admin reload expr_pushdown_blacklist;
explain format = 'brief' select * from t where a < 1;
id estRows task access object operator info
TableReader 3323.33 root data:Selection
└─Selection 3323.33 cop[tikv] lt(test.t.a, 1)
└─Selection 3323.33 cop[tikv] lt(black_list.t.a, 1)
└─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo
insert into mysql.expr_pushdown_blacklist values('lt', 'tikv,tiflash,tidb', 'for test');
admin reload expr_pushdown_blacklist;

explain format = 'brief' select * from t where a < 1;
id estRows task access object operator info
Selection 8000.00 root lt(test.t.a, 1)
Selection 8000.00 root lt(black_list.t.a, 1)
└─TableReader 10000.00 root data:TableFullScan
└─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo
delete from mysql.expr_pushdown_blacklist where name='lt' and store_type = 'tikv,tiflash,tidb' and reason = 'for test';
Expand All @@ -53,5 +52,5 @@ admin reload expr_pushdown_blacklist;
explain format = 'brief' select * from t where a < 1;
id estRows task access object operator info
TableReader 3323.33 root data:Selection
└─Selection 3323.33 cop[tikv] lt(test.t.a, 1)
└─Selection 3323.33 cop[tikv] lt(black_list.t.a, 1)
└─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo
2 changes: 0 additions & 2 deletions cmd/explaintest/r/collation_agg_func_disabled.result
Original file line number Diff line number Diff line change
Expand Up @@ -298,5 +298,3 @@ StreamAgg 1.00 root funcs:max(Column#8)->Column#6
select max(d collate utf8mb4_bin) from tt;
max(d collate utf8mb4_bin)
{"c": "c"}
drop database collation_agg_func;
use test
2 changes: 0 additions & 2 deletions cmd/explaintest/r/collation_agg_func_enabled.result
Original file line number Diff line number Diff line change
Expand Up @@ -295,5 +295,3 @@ StreamAgg 1.00 root funcs:max(Column#8)->Column#6
select max(d collate utf8mb4_bin) from tt;
max(d collate utf8mb4_bin)
{"c": "c"}
drop database collation_agg_func;
use test
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,3 @@ Projection 80000000.00 root is_ipv4(cast(collation_check_use_collation.t0.c1, v
│ └─TableFullScan 10000.00 cop[tikv] table:t0 keep order:false, stats:pseudo
└─TableReader(Probe) 10000.00 root data:TableFullScan
└─TableFullScan 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo
use test
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,3 @@ Projection 80000000.00 root is_ipv4(cast(collation_check_use_collation.t0.c1, v
│ └─TableFullScan 10000.00 cop[tikv] table:t0 keep order:false, stats:pseudo
└─TableReader(Probe) 10000.00 root data:TableFullScan
└─TableFullScan 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo
use test
3 changes: 2 additions & 1 deletion cmd/explaintest/r/collation_misc_disabled.result
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ latin1
select @@collation_database;
@@collation_database
latin1_swedish_ci
drop database if exists cd_test_utf8;
drop database if exists cd_test_latin1;
create database if not exists test_db CHARACTER SET latin1 COLLATE latin1_swedish_ci;
with cte as (select cast('2010-09-09' as date) a union select '2010-09-09 ') select count(*) from cte;
count(*)
Expand Down Expand Up @@ -118,4 +120,3 @@ binary binary 63 Yes Yes 1
ascii_bin ascii 65 Yes Yes 1
utf8_bin utf8 83 Yes Yes 1
gbk_bin gbk 87 Yes Yes 1
use test;
3 changes: 2 additions & 1 deletion cmd/explaintest/r/collation_misc_enabled.result
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ utf8
select @@collation_database;
@@collation_database
utf8_bin
drop database if exists cd_test_utf8;
drop database if exists cd_test_latin1;
create database if not exists test_db CHARACTER SET latin1 COLLATE latin1_swedish_ci;
Error 1273: Unsupported collation when new collation is enabled: 'latin1_swedish_ci'
with cte as (select cast('2010-09-09' as date) a union select '2010-09-09 ') select count(*) from cte;
Expand Down Expand Up @@ -133,4 +135,3 @@ utf8mb4_0900_ai_ci utf8mb4 255 Yes 1
utf8mb4_bin utf8mb4 46 Yes Yes 1
utf8mb4_general_ci utf8mb4 45 Yes 1
utf8mb4_unicode_ci utf8mb4 224 Yes 1
use test;
Loading