forked from pingcap/tiflash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incorrect result of max aggregation fun with collation ci (pingca…
…p#7002) (pingcap#7016) close pingcap#6807
- Loading branch information
1 parent
dd1747a
commit 2f9e02c
Showing
4 changed files
with
41 additions
and
1 deletion.
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
File renamed without changes.
File renamed without changes.
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,39 @@ | ||
# Copyright 2023 PingCAP, Ltd. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Preparation. | ||
mysql> drop table if exists test.t1 | ||
mysql> CREATE TABLE test.t1 (a varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL,id int(11) NOT NULL,PRIMARY KEY (id) /*T![clustered_index] CLUSTERED */) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | ||
mysql> insert into test.t1(a ,id) values('jlsf',1),(null,2),('YmkS',3),('0',4); | ||
mysql> drop table if exists test.t2 | ||
mysql> CREATE TABLE test.t2 (a varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL,b char(20) COLLATE utf8mb4_general_ci DEFAULT NULL,id int(11) NOT NULL,PRIMARY KEY (id) /*T![clustered_index] CLUSTERED */) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | ||
mysql> insert into test.t2(a,b,id) values('yMKs','jlsf',1),('yyds','YmkS',2),('cc',4,3),(null,null,4),('abc',null,5),(null,'df',6); | ||
|
||
mysql> alter table test.t1 set tiflash replica 1 | ||
mysql> alter table test.t2 set tiflash replica 1 | ||
|
||
func> wait_table test t1 | ||
func> wait_table test t2 | ||
|
||
|
||
mysql> use test; set @@tidb_isolation_read_engines='tiflash'; set @@tidb_enforce_mpp=1; select max(a) from t1 where a in ( select b from t2 where a>b); | ||
+--------+ | ||
| max(a) | | ||
+--------+ | ||
| YmkS | | ||
+--------+ | ||
|
||
# Clean up. | ||
# mysql> drop table if exists test.t1 | ||
# mysql> drop table if exists test.t2 |