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 does not escape the backquotes in the identifiers #8259

Closed
kennytm opened this issue Nov 9, 2018 · 0 comments
Closed

SHOW CREATE TABLE does not escape the backquotes in the identifiers #8259

kennytm opened this issue Nov 9, 2018 · 0 comments

Comments

@kennytm
Copy link
Contributor

kennytm commented Nov 9, 2018

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
create table `foo``bar` (`id``baz` int);
show create table `foo``bar`;
  1. What did you expect to see?

The "Create Table" column should read

CREATE TABLE `foo``bar` (
  `id``baz` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
  1. What did you see instead?

The ` in the table and column names aren't escaped, producing the invalid DDL

CREATE TABLE `foo`bar` (
  `id`baz` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?

Master version.

Release Version: v2.1.0-beta-602-gf3a9745e2
Git Commit Hash: f3a9745e2c42137b069d41a5aa9df9b32195282d
Git Branch: master
UTC Build Time: 2018-11-09 05:14:59
GoVersion: go version go1.11.1 darwin/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false
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