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

[mysqldef] Syntax error when removing table comments using mysqldef #511

Open
shahoxo opened this issue Apr 25, 2024 · 0 comments
Open

[mysqldef] Syntax error when removing table comments using mysqldef #511

shahoxo opened this issue Apr 25, 2024 · 0 comments
Labels
mysqldef Bugs or feature requests related to MySQL

Comments

@shahoxo
Copy link

shahoxo commented Apr 25, 2024

Platform

  • OS: macOS
  • RDBMS: MySQL (TiDB)
  • Version: 8.0 (7.5.0)

--export output

CREATE TABLE `users` (
  `id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`)
) COMMENT='something';

Input SQL

CREATE TABLE `users` (
  `id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`)
);

Current output

ALTER TABLE `user_credentials` COMMENT = ;

Expected output

ALTER TABLE `user_credentials` COMMENT = '';

Workaround

Explicitly setting the comment to an empty string in the table definition prevents the syntax error:

CREATE TABLE `users` (
  `id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`)
) COMMENT='';
@k0kubun k0kubun added the mysqldef Bugs or feature requests related to MySQL label Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mysqldef Bugs or feature requests related to MySQL
Projects
None yet
Development

No branches or pull requests

2 participants