-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into topsql-convert-reportdata-early
- Loading branch information
Showing
3 changed files
with
59 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
create database collation_check_use_collation; | ||
use collation_check_use_collation; | ||
CREATE TABLE `t` ( | ||
`a` char(10) DEFAULT NULL | ||
); | ||
CREATE TABLE `t1` ( | ||
`a` char(10) COLLATE utf8mb4_general_ci DEFAULT NULL | ||
); | ||
insert into t values ("a"); | ||
insert into t1 values ("A"); | ||
select a as a_col from t where t.a = all (select a collate utf8mb4_general_ci from t1); | ||
a_col | ||
a | ||
select a as a_col from t where t.a != any (select a collate utf8mb4_general_ci from t1); | ||
a_col | ||
select a as a_col from t where t.a <= all (select a collate utf8mb4_general_ci from t1); | ||
a_col | ||
a | ||
select a as a_col from t where t.a <= any (select a collate utf8mb4_general_ci from t1); | ||
a_col | ||
a | ||
select a as a_col from t where t.a = (select a collate utf8mb4_general_ci from t1); | ||
a_col | ||
a | ||
use test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# These tests check that the used collation is correct. | ||
|
||
# prepare database | ||
create database collation_check_use_collation; | ||
use collation_check_use_collation; | ||
|
||
# Check subquery. | ||
CREATE TABLE `t` ( | ||
`a` char(10) DEFAULT NULL | ||
); | ||
CREATE TABLE `t1` ( | ||
`a` char(10) COLLATE utf8mb4_general_ci DEFAULT NULL | ||
); | ||
insert into t values ("a"); | ||
insert into t1 values ("A"); | ||
select a as a_col from t where t.a = all (select a collate utf8mb4_general_ci from t1); | ||
select a as a_col from t where t.a != any (select a collate utf8mb4_general_ci from t1); | ||
select a as a_col from t where t.a <= all (select a collate utf8mb4_general_ci from t1); | ||
select a as a_col from t where t.a <= any (select a collate utf8mb4_general_ci from t1); | ||
select a as a_col from t where t.a = (select a collate utf8mb4_general_ci from t1); | ||
|
||
# cleanup environment | ||
use test |
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