GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Parsing "@@" throws exception · Issue #1237 · JSQLParser/JSqlParser

Parsing "@@" throws exception #1237

New issue
Copy link
New issue
Copy link
Closed
#1676
Closed
Parsing "@@" throws exception#1237
#1676
Copy link

Description

@Aceto1
Aceto1
opened on Jun 22, 2021
Issue body actions

Describe the bug
When parsing the below SQL an exception with the message: "Not yet supprted" is thrown. This is totally valid MariaDB SQL Syntax that runs just fine when directly executing on the database.

To Reproduce
Steps to reproduce the behavior:

  1. SQL: "SET @@global.time_zone = '01:00'"
  2. Parsing this SQL using JSqlParser with this statements
  3. Exception:
Encountered unexpected token: "@@" "@@"
    at line 1, column 5.

Was expecting one of:

    "ACTION"
    "ANY"
    "BYTE"
    "CASCADE"
    "CAST"
    "CHANGE"
    "CHAR"
    "CHARACTER"
    "COLUMN"
    "COLUMNS"
    "COMMENT"
    "COMMIT"
    "CREATE"
    "CYCLE"
    "DESC"
    "DESCRIBE"
    "DISABLE"
    "DIV"
    "DO"
    "DOUBLE"
    "DUPLICATE"
    "ENABLE"
    "END"
    "EXCLUDE"
    "EXTRACT"
    "FALSE"
    "FIRST"
    "FN"
    "FOLLOWING"
    "FORMAT"
    "GROUP"
    "IF"
    "INDEX"
    "INSERT"
    "INTERVAL"
    "ISNULL"
    "KEY"
    "LAST"
    "LEFT"
    "LIMIT"
    "MATERIALIZED"
    "NEXTVAL"
    "NO"
    "NOLOCK"
    "NULLS"
    "OF"
    "OFFSET"
    "ON"
    "OPEN"
    "OPTIMIZE"
    "ORDER"
    "OVER"
    "PARTITION"
    "PATH"
    "PERCENT"
    "PRECISION"
    "PRIMARY"
    "PRIOR"
    "PROCEDURE"
    "PUBLIC"
    "RANGE"
    "READ"
    "REPLACE"
    "RIGHT"
    "ROW"
    "ROWS"
    "SCHEMA"
    "SEPARATOR"
    "SEQUENCE"
    "SESSION"
    "SET"
    "SIBLINGS"
    "SIZE"
    "START"
    "TABLE"
    "TABLES"
    "TEMP"
    "TEMPORARY"
    "TO"
    "TOP"
    "TRUE"
    "TRUNCATE"
    "TYPE"
    "UNSIGNED"
    "VALIDATE"
    "VALUE"
    "VALUES"
    "VIEW"
    "XML"
    "ZONE"
    <K_DATETIMELITERAL>
    <K_DATE_LITERAL>
    <S_IDENTIFIER>
    <S_QUOTED_IDENTIFIER>

Expected behavior
The statement should be parsed just fine, since it is a valid SQL statement for MariaDB

System

  • MariaDB 10.5.8
  • Java 11
  • JSqlParser version 4.0

Activity

  1. Aceto1
    changed the title [-]MariaDB "@@" throws exception[/-] [+]Parsing "@@" throws exception[/+] on Jun 22, 2021
  2. wumpz commented on Jun 27, 2021

    @wumpz
    wumpz
    on Jun 27, 2021
    Member
    More actions

    This kind of "user variable" is not yet supported.

  3. manticore-projects
    added a commit that references this issue on Dec 16, 2022

    test: add Test for Issue JSQLParser#1237

    19572da
  4. wumpz
    closed this as completedin #1676on Dec 22, 2022
  5. wumpz
    added a commit that references this issue on Dec 22, 2022

    Assorted Fixes #4 (#1676)

    8d9db70
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

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.