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

MySQL parser does not support inline comments #178

Open
vaitkus opened this issue Jan 27, 2025 · 0 comments
Open

MySQL parser does not support inline comments #178

vaitkus opened this issue Jan 27, 2025 · 0 comments

Comments

@vaitkus
Copy link

vaitkus commented Jan 27, 2025

Issue noticed in version 1.66 (1ef083e).

MySQL parser fails when the input schema contains inline comments in the table create statement. For example, trying to parse the statement below:

CREATE TABLE `check` (
    test_time time /* mariadb-5.3 */ DEFAULT NULL
);

results in the following error:

       ERROR (line 1): Invalid statement: Was expecting comment, or use, or
                       set, or drop, or create, or alter, or insert, or
                       delimiter, or empty statement

The statement parses correctly when the /* mariadb-5.3 */ part is removed.

MySQL v8.0.40 manages to parse both versions of the statement.

Such comments are automatically generated when dumping the schema with newer versions of MariaDB.

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