-
Notifications
You must be signed in to change notification settings - Fork 412
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
Randgen test tiflash result not correct #2793
Comments
0823 nightly, no collation. result correct. mysql> select count(*) from table_100_utf8mb4collate_utf8mb4_general_ci_undef as t1 where t1. `col_varchar(20)_key_signed` not in (select `col_char(20)_key_signed` from table_10_utf8mb4collate_utf8mb4_general_ci_undef as t2 where t1. `col_varchar(20)_key_signed` not in ( `col_varchar(20)_undef_signed`, t1. `col_varbinary(20)_key_signed`, `col_char(20)_key_signed`, t1. `col_varbinary(20)_undef_signed` ));
+----------+
| count(*) |
+----------+
| 100 |
+----------+
1 row in set (0.00 sec)
mysql> set tidb_isolation_read_engines=tiflash;
Query OK, 0 rows affected (0.00 sec)
mysql> select count(*) from table_100_utf8mb4collate_utf8mb4_general_ci_undef as t1 where t1. `col_varchar(20)_key_signed` not in (select `col_char(20)_key_signed` from table_10_utf8mb4collate_utf8mb4_general_ci_undef as t2 where t1. `col_varchar(20)_key_signed` not in ( `col_varchar(20)_undef_signed`, t1. `col_varbinary(20)_key_signed`, `col_char(20)_key_signed`, t1. `col_varbinary(20)_undef_signed` ));
+----------+
| count(*) |
+----------+
| 100 |
+----------+
1 row in set (0.02 sec)
| tidb | 127.0.0.1:4000 | new_collations_enabled_on_first_bootstrap | false |
with collation open, tikv: 89 tiflash: 100 |
minimal reproduce: create table q1(a varchar(20), b varbinary(20)) CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
alter table q1 set tiflash replica 1;
insert into q1 values ('a', 'A');
create table q2(a char(20)) CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
alter table q2 set tiflash replica 1;
insert into q2 values ('A');
set SESSION tidb_isolation_read_engines = tikv;
select * from q1
where q1.a not in (
select a from q2
where q1.a not in (q1.b, q2.a)
);
-- no data
set SESSION tidb_isolation_read_engines = tiflash;
select * from q1
where q1.a not in (
select a from q2
where q1.a not in (q1.b, q2.a)
);
-- a,A |
-- consistent: both "a, A" -- inconsistent, tiflash "a,A", tikv empty. |
Chinese lihai |
sorry, fixed. |
5.2 version
expect the result is 89 , but got 100.
download and source the file
1.txt
plan is
The text was updated successfully, but these errors were encountered: