Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partition name is not quoted in the output of "SHOW CREATE TABLE" command #14477

Closed
darkelf21cn opened this issue Jan 15, 2020 · 3 comments
Closed
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.

Comments

@darkelf21cn
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. 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;

  2. What did you expect to see?
    Partition name is quoted just like what I did in the table creation statement.

  3. 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)
    )

  4. What version of TiDB are you using (tidb-server -V or run select 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

@darkelf21cn darkelf21cn added the type/bug The issue is confirmed as a bug. label Jan 15, 2020
@bb7133
Copy link
Member

bb7133 commented Jan 15, 2020

Hi @darkelf21cn , thanks for reporting! We will fix this soon. BTW, are you interested in fixing it? It should be very trivial.

@bb7133 bb7133 added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Jan 15, 2020
@bb7133 bb7133 modified the milestone: v3.0.10 Jan 15, 2020
@Rustin170506
Copy link
Member

I am working on it.🤓

@bb7133
Copy link
Member

bb7133 commented Feb 16, 2020

Hi @darkelf21cn this issue has been fixed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

4 participants