-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql/logictest: require sort option or ORDER BY
A logic test using the `query` directive now fails if at least one of the following is not true: - The query returns zero or one row. - The query returns multiple rows that are all identical. - The directive has a sort option (`rowsort`, `valuesort`, `partialsort`, or `nosort`) or the `kvtrace` option. - The query has an `ORDER BY` clause. - The query has `EXPLAIN` or `SHOW [KV] TRACE` in it. This change will help prevent tests that flake due to a non-deterministic order of the results. This is one of the most common causes of flakes in logic tests. Note that the check for `ORDER BY` is a simple regex search, so it will not prevent all possible flakes due to ordering. As one example, an `ORDER BY` in a subquery will satisfy the check, even though it does not guarantee the ordering of the result of the main query: SELECT * FROM (SELECT * FROM t ORDER BY a) Release note: None
- Loading branch information
Showing
185 changed files
with
1,542 additions
and
1,450 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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.