-
Notifications
You must be signed in to change notification settings - Fork 67
add my-tester support for cascades planner. #137
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| create table t(a bigint, b bigint); | ||
| insert into t values(1, 1), (2, 2), (3, 3), (4, 4), (5, 5); | ||
| select * from t where a = 1; | ||
| a b | ||
| 1 1 | ||
| SELECT 1 FROM NON_EXISTING_TABLE; | ||
| Error 1146 (42S02): Table 'example.NON_EXISTING_TABLE' doesn't exist | ||
| SELECT 2 FROM NON_EXISTING_TABLE; | ||
| SELECT 3 FROM NON_EXISTING_TABLE; | ||
| Got one of the listed errors | ||
| SELECT 4; | ||
| 4 | ||
| 4 | ||
| SELECT 5; | ||
| 5 | ||
| 5 | ||
| SELECT 6; | ||
| 6 | ||
| 6 | ||
| 1 SELECT; | ||
| Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 1 near "1 SELECT" | ||
| 2 SELECT; | ||
| 3 SELECT; | ||
| Got one of the listed errors | ||
| explain analyze format='brief' select * from t; | ||
| id estRows actRows task access object execution info operator info memory disk | ||
| TableReader 10000.00 5 root NULL time:<num>, open:<num>, close:<num>, loops:<num>, RU:<num>, cop_task: {num:<num>, max:<num>, proc_keys:<num>, copr_cache_hit_ratio:<num>, build_task_duration:<num>, max_distsql_concurrency:<num>, rpc_info:{Cop:{num_rpc:<num>, total_time:<num>}} data:TableFullScan <num> Bytes N/A | ||
| └─TableFullScan 10000.00 5 cop[tikv] table:t tikv_task:{time:<num>, loops:<num>} keep order:false, stats:pseudo N/A N/A | ||
| explain analyze select * from t; | ||
| id estRows actRows task access object execution info operator info memory disk | ||
| TableReader_5 10000.00 5 root NULL time:<num>, open:<num>, close:<num>, loops:<num>, RU:<num>, cop_task: {num:<num>, max:<num>, proc_keys:<num>, copr_cache_hit_ratio:<num>, build_task_duration:<num>, max_distsql_concurrency:<num>, rpc_info:{Cop:{num_rpc:<num>, total_time:<num>}} data:TableFullScan_4 <num> Bytes N/A | ||
| └─TableFullScan_4 10000.00 5 cop[tikv] table:t tikv_task:{time:<num>, loops:<num>} keep order:false, stats:pseudo N/A N/A | ||
| insert into t values (6, 6); | ||
| affected rows: 1 | ||
| info: | ||
| DROP TABLE IF EXISTS t1; | ||
| affected rows: 0 | ||
| info: | ||
| CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT NOT NULL UNIQUE); | ||
| affected rows: 0 | ||
| info: | ||
| INSERT t1 VALUES (1, 1); | ||
| affected rows: 1 | ||
| info: | ||
| INSERT t1 VALUES (1, 1), (1, 1) ON DUPLICATE KEY UPDATE f1 = 2, f2 = 2; | ||
| affected rows: 3 | ||
| info: Records: 2 Duplicates: 1 Warnings: 0 | ||
| 1 | ||
| use `test`;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| SELECT 1 FROM NON_EXISTING_TABLE; | ||
AilinKid marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Got one of the listed errors | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to change this function to a custom suffix? This will make it look more universal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sense, done
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one day, when we remove the cascades planner switch (remove the old planner), we could just run cmd as below:which will overrides test result of.resultfile, then we can remove all.casultfiles if any withfind . -type -f -name "*.casult" | xargs rmThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cascades enable is out of tester now, when cascades is enabled, we will pass suffix as ".casult" in.