the substring statement results is different
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
```
use test;
source [test.txt](https://github.com/pingcap/tidb/files/9391801/test.txt)
alter table IDT_26965 set tiflash replica 1;
select sleep(5);
select /*+ read_from_storage(tikv[IDT_26965]) */ count(*) from IDT_26965 where substring(col1, -3, 1) = '';
select /*+ read_from_storage(tiflash[IDT_26965]) */ count(*) from IDT_26965 where substring(col1, -3, 1) = '';
```
### 2. What did you expect to see? (Required)
### 3. What did you see instead (Required)
```
MySQL [test]> select /*+ read_from_storage(tikv[IDT_26965]) */ count(*) from IDT_26965 where substring(col1, -3, 1) = '';
+----------+
| count(*) |
+----------+
| 102 |
+----------+
1 row in set (0.01 sec)
MySQL [test]> select /*+ read_from_storage(tiflash[IDT_26965]) */ count(*) from IDT_26965 where substring(col1, -3, 1) = '';
+----------+
| count(*) |
+----------+
| 51 |
+----------+
1 row in set (0.02 sec)
```
### 4. What is your TiDB version? (Required)
```
Release Version: v6.3.0-alpha
Edition: Community
Git Commit Hash: 8b5b724d8a932239303a1d0ba547323eb0e5161b
Git Branch: heads/refs/tags/v6.3.0-alpha
UTC Build Time: 2022-08-19 14:31:05
GoVersion: go1.18.5
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: tikv
```
Contributor guide
Assessment
This issue has not been assessed yet.