Implicit casting rule is not compatible with MySQL for `BIN(current_date)`
- 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)
Run `select bin(current_date)`
### 2. What did you expect to see? (Required)
```
mysql> SELECT BIN(current_date);
+-------------------+
| BIN(current_date) |
+-------------------+
| 11111101001 |
+-------------------+
1 row in set (0.03 sec)
mysql> select current_date;
+--------------+
| current_date |
+--------------+
| 2025-02-11 |
+--------------+
1 row in set (0.00 sec)
```
### 3. What did you see instead (Required)
```
mysql> SELECT BIN(current_date);
+---------------------------+
| BIN(current_date) |
+---------------------------+
| 1001101001111111001100011 |
+---------------------------+
1 row in set (0.01 sec)
mysql> select current_date;
+--------------+
| current_date |
+--------------+
| 2025-02-11 |
+--------------+
1 row in set (0.00 sec)
```
### 4. What is your TiDB version? (Required)
Contributor guide
Assessment
This issue has not been assessed yet.