Partition name is not quoted in the output of "SHOW CREATE TABLE" command #14477
Labels
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
severity/moderate
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
CREATE TABLE partition_test (
task_id BIGINT NOT NULL,
creation_dt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
result_data JSON
)
PARTITION BY RANGE (UNIX_TIMESTAMP(creation_dt) ) (
PARTITION
20200101
VALUES LESS THAN (UNIX_TIMESTAMP('2020-01-01 00:00:00')),PARTITION
20200102
VALUES LESS THAN (UNIX_TIMESTAMP('2020-01-02 00:00:00')),PARTITION
20200103
VALUES LESS THAN (UNIX_TIMESTAMP('2020-01-04 00:00:00')));
SHOW CREATE TABLE partition_test;
What did you expect to see?
Partition name is quoted just like what I did in the table creation statement.
What did you see instead?
Partition name is unquoted so the statement won't pass the syntax check.
CREATE TABLE
partition_test
(task_id
bigint(20) NOT NULL,creation_dt
timestamp DEFAULT CURRENT_TIMESTAMP,result_data
json DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
PARTITION BY RANGE ( unix_timestamp(
creation_dt
) ) (PARTITION 20200101 VALUES LESS THAN (1577836800),
PARTITION 20200102 VALUES LESS THAN (1577923200),
PARTITION 20200103 VALUES LESS THAN (1578096000)
)
What version of TiDB are you using (
tidb-server -V
or runselect tidb_version();
on TiDB)?Release Version: v3.0.8
Git Commit Hash: 8f13cf1
Git Branch: HEAD
UTC Build Time: 2019-12-31 11:14:59
GoVersion: go version go1.13 linux/amd64
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
The text was updated successfully, but these errors were encountered: