Skip to content

[BUG] JSQLParser 4.5 : Mysql: The parsing result is different from the previous version? #1730

Closed
@Fudeveloper

Description

@Fudeveloper

Failing SQL Feature:

Parsing is not failed, but the parsing result is different from the previous version (4.4).
It seems is imported from #1531
Does this a feature?

SQL Example:

INSERT INTO mytable VALUES (?)

Software Information:

  • JSqlParser version 4.5
  • Database (Mysql)

Trace Token Info

JSqlParser version 4.5

Call:	Statement
  Call:	SingleStatement
    Call:	Insert
      Consumed token: <"INSERT" at line 1 column 1>
      Call:	getOracleHint
      Return: getOracleHint
      Consumed token: <"INTO" at line 1 column 8>
      Call:	Table
        Call:	RelObjectNameList
          Call:	RelObjectNameExt
            Call:	RelObjectName
              Call:	RelObjectNameWithoutValue
                Consumed token: <<S_IDENTIFIER>: "mytable" at line 1 column 13>
              Return: RelObjectNameWithoutValue
            Return: RelObjectName
          Return: RelObjectNameExt
        Return: RelObjectNameList
      Return: Table
      Call:	SelectWithWithItems
        Call:	Select
          Call:	SelectBody
            Call:	SetOperationList
              Call:	Values
                Consumed token: <"VALUES" at line 1 column 21>
                Call:	SimpleExpressionList
                  Call:	SimpleExpression
                    Call:	ConcatExpression
                      Call:	BitwiseAndOr
                        Call:	AdditiveExpression
                          Call:	MultiplicativeExpression
                            Call:	BitwiseXor
                              Call:	PrimaryExpression
                                Consumed token: <"(" at line 1 column 28>
                                Call:	SimpleExpressionList
                                  Call:	SimpleExpression
                                    Call:	ConcatExpression
                                      Call:	BitwiseAndOr
                                        Call:	AdditiveExpression
                                          Call:	MultiplicativeExpression
                                            Call:	BitwiseXor
                                              Call:	PrimaryExpression
                                                Call:	SimpleJdbcParameter
                                                  Consumed token: <"?" at line 1 column 29>
                                                Return: SimpleJdbcParameter
                                              Return: PrimaryExpression
                                            Return: BitwiseXor
                                          Return: MultiplicativeExpression
                                        Return: AdditiveExpression
                                      Return: BitwiseAndOr
                                    Return: ConcatExpression
                                  Return: SimpleExpression
                                Return: SimpleExpressionList
                                Consumed token: <")" at line 1 column 30>
                              Return: PrimaryExpression
                            Return: BitwiseXor
                          Return: MultiplicativeExpression
                        Return: AdditiveExpression
                      Return: BitwiseAndOr
                    Return: ConcatExpression
                  Return: SimpleExpression
                Return: SimpleExpressionList
              Return: Values
            Return: SetOperationList
          Return: SelectBody
        Return: Select
      Return: SelectWithWithItems
    Return: Insert
  Return: SingleStatement
  Consumed token: <<EOF> at line 1 column 30>
Return: Statement

JSqlParser version 4.4 (is the same with 4.3)

Call:	Statement
  Call:	SingleStatement
    Call:	Insert
      Consumed token: <"INSERT" at line 1 column 1>
      Call:	getOracleHint
      Return: getOracleHint
      Consumed token: <"INTO" at line 1 column 8>
      Call:	Table
        Call:	RelObjectNameList
          Call:	RelObjectNameExt
            Call:	RelObjectName
              Call:	RelObjectNameWithoutValue
                Consumed token: <<S_IDENTIFIER>: "mytable" at line 1 column 13>
              Return: RelObjectNameWithoutValue
            Return: RelObjectName
          Return: RelObjectNameExt
        Return: RelObjectNameList
      Return: Table
      Consumed token: <"VALUES" at line 1 column 21>
      Consumed token: <"(" at line 1 column 28>
      Call:	SimpleExpression
        Call:	ConcatExpression
          Call:	BitwiseAndOr
            Call:	AdditiveExpression
              Call:	MultiplicativeExpression
                Call:	BitwiseXor
                  Call:	PrimaryExpression
                    Call:	SimpleJdbcParameter
                      Consumed token: <"?" at line 1 column 29>
                    Return: SimpleJdbcParameter
                  Return: PrimaryExpression
                Return: BitwiseXor
              Return: MultiplicativeExpression
            Return: AdditiveExpression
          Return: BitwiseAndOr
        Return: ConcatExpression
      Return: SimpleExpression
      Consumed token: <")" at line 1 column 30>
    Return: Insert
  Return: SingleStatement
  Consumed token: <<EOF> at line 1 column 30>
Return: Statement

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