create range columns partition table behavior is uncompatibility with MySQL #37795
Open
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
create table t (a varchar(10)) partition by range columns (a) (partition p0 values less than (10));
2. What did you expect to see? (Required)
Should execute failed, just like MySQL 8.0:
mysql>create table t (a varchar(10)) partition by range columns (a) (partition p0 values less than (10));
(1654, 'Partition column values of incorrect type')
mysql>select version();
+-----------+
| version() |
+-----------+
| 8.0.30 |
+-----------+
3. What did you see instead (Required)
Execute sucessfully
mysql>create table t (a varchar(10)) partition by range columns (a) (partition p0 values less than (10));
Query OK, 0 rows affected
Time: 0.009s
4. What is your TiDB version? (Required)
mysql>select tidb_version()\G
***************************[ 1. row ]***************************
tidb_version() | Release Version: v6.3.0-alpha-220-g6261eb3f85
Edition: Community
Git Commit Hash: 6261eb3f857895f2a01eb74a74e1d1f85615bfaf
Git Branch: master
UTC Build Time: 2022-09-14 03:11:41
GoVersion: go1.18
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: unistore
Other
I find this issue when review #36637 , maybe it can be fix in function checkColumnsTypeAndValuesMatch