matrixorigin / matrixorigin/matrixone

[Bug]: result of "show create table " of partition table need to be optimized

Open
#18,680 1 comment 0 reactions 2 assignees Claimed by @ck89119 View on GitHub
area/partition deferred kind/feature
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

b2d8e4aefb0d7b3b3d7deb19a772c6bbfa973a9f

### 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 list (b*a)
-> partitions 3
-> (partition x1 values in (1,2,9,4),
-> partition x2 values in (3, 11, 5, 7),
-> partition x3 values in (16, 8, 5+19, 70-43));
Query OK, 0 rows affected (0.03 sec)

mysql>
mysql> SHOW CREATE TABLE t1;
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t1 | CREATE TABLE `t1` (
`a` int NOT NULL,
`b` int NOT NULL,
`c` int NOT NULL,
PRIMARY KEY (`a`,`b`)
) partition by list(b * a) partitions 3 (partition x1 values in (1, 2, 9, 4), partition x2 values in (3, 11, 5, 7), partition x3 values in (**16, 8, 5 + 19, 70 - 43**)) |
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> drop table t1;
Query OK, 0 rows affected (0.05 sec)

MYSQL:
mysql> CREATE TABLE t1 (
-> a int not null,
-> b int not null,
-> c int not null,
-> primary key(a,b))
-> partition by list (b*a)
-> partitions 3
-> (partition x1 values in (1,2,9,4),
-> partition x2 values in (3, 11, 5, 7),
-> partition x3 values in (16, 8, 5+19, 70-43));
Query OK, 0 rows affected (0.04 sec)

mysql>
mysql> SHOW CREATE TABLE t1;
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t1 | CREATE TABLE `t1` (
`a` int NOT NULL,
`b` int NOT NULL,
`c` int NOT NULL,
PRIMARY KEY (`a`,`b`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
/*!50100 PARTITION BY LIST ((`b` * `a`))
(PARTITION x1 VALUES IN (1,2,9,4) ENGINE = InnoDB,
PARTITION x2 VALUES IN (3,11,5,7) ENGINE = InnoDB,
PARTITION x3 VALUES IN (16,8,24,27) ENGINE = InnoDB) */ |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> drop table t1;
Query OK, 0 rows affected (0.01 sec)

### Expected Behavior

_No response_

### Steps to Reproduce

```Markdown
AS DESC IN ACTUAL BEHAVIOR
```

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.