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

Error parsing default values for tables #1347

Open
kyleconroy opened this issue Sep 20, 2021 · 0 comments
Open

Error parsing default values for tables #1347

kyleconroy opened this issue Sep 20, 2021 · 0 comments

Comments

@kyleconroy
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
CREATE TABLE t1 (
  -- literal defaults
  i INT         DEFAULT 0,
  c VARCHAR(10) DEFAULT '',
  -- expression defaults
  f FLOAT       DEFAULT (RAND() * RAND()),
  b BINARY(16)  DEFAULT (UUID_TO_BIN(UUID())),
  d DATE        DEFAULT (CURRENT_DATE + INTERVAL 1 YEAR),
  p POINT       DEFAULT (Point(0,0)),
  j JSON        DEFAULT (JSON_ARRAY())
);
  1. What did you expect to see?

No parsing error

  1. What did you see instead?

A parsing error

  1. What version of TiDB SQL Parser are you using?
github.com/pingcap/parser v0.0.0-20210914110036-002913dd28ec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant