Unistore result differ from real TiKV
- 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)
It's found from https://github.com/tikv/copr-test when I'm testing [paging](https://github.com/pingcap/tidb/issues/35633)
```
./bin/tidb-server
mysql -h 127.0.0.1 -u root -P 4000 -D test < 0_data.sql
SELECT CAST( ( BINARY `col_date_key` ) AS TIME ) AS field1 FROM `table1000_int_autoinc` WHERE BINARY `col_timestamp_key` ORDER BY field1 LIMIT 6 /* QNO 897 CON_ID 104 */ ;
```
Data file is [here](https://github.com/tikv/copr-test/blob/a2e093189c1682e28e3c2b112c265cc158779296/push-down-test/prepare/0_data.sql)
### 2. What did you expect to see? (Required)
Run the test on unistore or real TiKV, the result is the same.
### 3. What did you see instead (Required)
On unistore:
```
mysql> SELECT CAST( ( BINARY `col_date_key` ) AS TIME ) AS field1 FROM `table1000_int_autoinc` WHERE BINARY `col_timestamp_key` ORDER BY field1 LIMIT 6 /* QNO 897 CON_ID 104 */ ;
+--------+
| field1 |
+--------+
| NULL |
| NULL |
| NULL |
| NULL |
| NULL |
| NULL |
+--------+
6 rows in set, 1233 warnings (0.02 sec)
```
On real tikv:
```
mysql> SELECT CAST( ( BINARY `col_date_key` ) AS TIME ) AS field1 FROM `table1000_int_autoinc` WHERE BINARY `col_timestamp_key` ORDER BY field1 LIMIT 6 /* QNO 897 CON_ID 104 */ ;
+----------+
| field1 |
+----------+
| 00:00:00 |
| 00:00:00 |
| 00:00:00 |
| 00:20:02 |
| 00:20:04 |
| 00:20:06 |
+----------+
6 rows in set, 76 warnings (0.01 sec)
```
### 4. What is your TiDB version? (Required)
master
```
mysql> select tidb_version();
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v6.2.0-alpha-322-g756a81701-dirty
Edition: Community
Git Commit Hash: 756a81701430e3ac496a70dbcc1743b2cbe312dd
Git Branch: master
UTC Build Time: 2022-07-11 09:40:48
GoVersion: go1.18.2
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
Store: tikv |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
```
Contributor guide
Assessment
This issue has not been assessed yet.