Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-39095

MariaDB server syntax checker

    XMLWordPrintable

Details

    • New Feature
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Scripts & Clients
    • None

    Description

      Tool for checking if MariaDB server can execute queries stored in a file or from command line. This is usable when one wants to migrate to MariaDB and one wants to ensure
      that MariaDB can parse all queries an application is used. If MariaDB can parse the statements it is very likely that it can also execute it.

      For example, if one would like to migrate from MySQL, one could run MySQL for some time with the general log on and then check the log and all stored procedures with the tool to
      ensure that MariaDB server can handle all the queries.

      Usage:
      mariadb-check-syntax files
      or
      cat files | mariadb-check-syntax

      The tool should provide errors for all lines the MariaDB server cannot parse.
      The error message should include the file, the line number, the query and the error from the parser.

      Note that the tool needs to be closely linked to the MariaDB server from the same distribution to ensure that one is testing the exact syntax the server provides.

      Some suggested ways to achieve this:
      1) Add an option --check-syntax[=file] to mariadbd that would check the commands in the file or from the stream and write commands it could not parse.
      2) Create an utility that links with part of the mariadb server that can do the parsing. Philip Stoev did something similar to create a syntax checker a long time ago.
      2) Extract the parser into a separate tool.

      1) Is probably easier to do.

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              monty Michael Widenius
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.