Skip to content

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

@htyoung

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

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