Skip to content

[Bug] CreateTableStmt‘s toSql put comment in the wrong place #27474

Closed

Description

@htyoung

Search before asking

  • I had searched in the issues and found no similar issues.

Version

  • 1.2.7.1
  • 2.0.x

What's Wrong?

  • CreateTableStmt parsedSql generated by function toSql() put comment in wrong place
image
  • CreateTableStmt engineName will be upperCase,when user does't have Create_priv and engine in CreateTable DDL String is upperCase
image

What You Expected?

  • CreateTableStmt toSql get correct dll
  • engineName will ignore case

How to Reproduce?

  1. In AuditPlugin, if user has no create_priv, the AuditEvent.stmt will get wrong parsed sql becauseof comment in wrong place;
  2. In AuditPlugin, if user has no create_priv and user's create table ddl's ENGINE is OLAP, engineName in the instance of CreateTableStmt will be upperCase;

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added a commit that references this issue on Dec 21, 2023
    8759bce
  2. added a commit that references this issue on Dec 27, 2023
    c31c088
  3. added a commit that references this issue on Dec 28, 2023
    53db9f0
  4. added a commit that references this issue on Jan 12, 2024
    5d9dda0
  5. added a commit that references this issue on Apr 24, 2026
    387e35d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions