matrixorigin / matrixorigin/matrixone
[Bug]: HASH PARTITIONING can use VALUES LESS THAN AND VALUES IN in partition definition
- Dominant language
- Go
- Stars
- 1.9k
- Forks
- 311
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 768
Description
### Is there an existing issue for the same bug?
- [X] I have checked the existing issues.
### Branch Name
main
### Commit ID
afd7c53370cd67a1b21b84e2463ce60702493d06
### Other Environment Information
```Markdown
- Hardware parameters:
- OS type:
- Others:
```
### Actual Behavior
MO:
mysql> CREATE TABLE t1 (
-> a int not null,
-> b int not null,
-> c int not null,
-> primary key(a,b))
-> partition by hash (a)
-> partitions 2
-> (partition x1 values less than (4),
-> partition x2 values less than (5));
Query OK, 0 rows affected (0.08 sec)
mysql> CREATE TABLE t1 (
-> a int not null,
-> b int not null,
-> c int not null,
-> primary key(a,b))
-> partition by hash (a)
-> partitions 2
-> (partition x1 values in (4),
-> partition x2 values in (5));
Query OK, 0 rows affected (0.06 sec)
MYSQL:
mysql> CREATE TABLE t1 (
-> a int not null,
-> b int not null,
-> c int not null,
-> primary key(a,b))
-> partition by hash (a)
-> partitions 2
-> (partition x1 values less than (4),
-> partition x2 values less than (5));
ERROR 1480 (HY000): Only RANGE PARTITIONING can use VALUES LESS THAN in partition definition
mysql> CREATE TABLE t1 (
-> a int not null,
-> b int not null,
-> c int not null,
-> primary key(a,b))
-> partition by hash (a)
-> partitions 2
-> (partition x1 values in (4),
-> partition x2 values in (5));
ERROR 1480 (HY000): Only LIST PARTITIONING can use VALUES IN in partition definition
### Expected Behavior
_No response_
### Steps to Reproduce
```Markdown
CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key(a,b))
partition by hash (a)
partitions 2
(partition x1 values less than (4),
partition x2 values less than (5));
```
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.