Open bb7133 opened 10 months ago
/label severity/major
@zanmato1984: The label(s) severity/major
cannot be applied. These labels are supported: fuzz/sqlancer, challenge-program, compatibility-breaker, first-time-contributor, contribution, good first issue, correctness, duplicate, proposal, security, ok-to-test, needs-ok-to-test, needs-more-info, needs-cherry-pick-release-5.3, needs-cherry-pick-release-5.4, needs-cherry-pick-release-6.1, needs-cherry-pick-release-6.5, needs-cherry-pick-release-7.1, needs-cherry-pick-release-7.5, affects-5.3, affects-5.4, affects-6.1, affects-6.5, affects-7.1, affects-7.5, may-affects-5.3, may-affects-5.4, may-affects-6.1, may-affects-6.5, may-affects-7.1, may-affects-7.5
.
/severity major
TiDB:
select date(b) from t;
+------------+
| date(b) |
+------------+
| 2021-00-00 |
+------------+
1 row in set (0.01 sec)
MySQL 8.0:
select date(b) from t;
+------------+
| date(b) |
+------------+
| 2021-00-00 |
+------------+
1 row in set (0.01 sec)
There may have been some change between MySQL 5.7 and 8.0. That may imply that the correctness between TiDB (non-push-down) and TiKV (push-down) are reversed.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Reported by the internal expression pushdown test: example.
A simple reproduce step:
2. What did you expect to see? (Required)
Empty result, the same with MySQL:
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
Reproduced with v7.1.4, v7.4.0 and latest master: 4ae5622ef3c1b606fec9e12e4c269f4589e7a1f9
I didn't try more versions(<v7.1)