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

SHOW CREATE TABLE and Restore of column default expressions should be enclosed within parentheses #52939

Closed
CbcWestwolf opened this issue Apr 27, 2024 · 0 comments · Fixed by #52940
Assignees

Comments

@CbcWestwolf
Copy link
Member

Bug Report

In the following result of SHOW CREATE TABLE, the output of rand() should be enclosed within parentheses like MySQL.

1. Minimal reproduce step (Required)

create table t (a float default (rand()));
show create table t\G

2. What did you expect to see? (Required)

***************************[ 1. row ]***************************
Table        | t
Create Table | CREATE TABLE `t` (
  `a` float DEFAULT (rand())
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci

3. What did you see instead (Required)

*************************** 1. row ***************************
       Table: t
Create Table: CREATE TABLE `t` (
  `a` float DEFAULT rand()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin

4. What is your TiDB version? (Required)

TiDB 6.1.0 ~ master

@CbcWestwolf CbcWestwolf self-assigned this Apr 27, 2024
@CbcWestwolf CbcWestwolf changed the title SHOW CREATE TABLE and Restore of column default option should be enclosed within parentheses SHOW CREATE TABLE and Restore of column default expressions should be enclosed within parentheses Apr 27, 2024
@jebter jebter added the component/ddl This issue is related to DDL of TiDB. label Apr 28, 2024
ti-chi-bot bot pushed a commit that referenced this issue Apr 28, 2024
ti-chi-bot bot pushed a commit that referenced this issue Apr 28, 2024
ti-chi-bot bot pushed a commit that referenced this issue Apr 29, 2024
ti-chi-bot bot pushed a commit that referenced this issue Apr 29, 2024
ti-chi-bot bot pushed a commit that referenced this issue Apr 29, 2024
ti-chi-bot bot pushed a commit that referenced this issue Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants