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

Script/routine to parse SQL enough to enumerate real used tables.

Details

    • New Feature
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5
    • Tests
    • None

    Attachments

      Issue Links

        Activity

          danblack Daniel Black added a comment -

          I thought I had a bug report, but I found an email conversion that suggested PARSE {sql} as a statement that just returns a JSON representation o the lex structure to have some wider uses and being 100% accurate with what the server has actually done.

          danblack Daniel Black added a comment - I thought I had a bug report, but I found an email conversion that suggested PARSE {sql } as a statement that just returns a JSON representation o the lex structure to have some wider uses and being 100% accurate with what the server has actually done.
          Johnston Rex Johnston added a comment -

          I've been thinking of the best way to approach this, there are a few options, in order

          1) Embrace/extend https://metacpan.org/pod/DBIx%3A%3AMyParsePP

          2) Alter EXPLAIN $query in some way, PARSE $query might be clearer. One of my thoughts was to post process EXPLAIN output, but i don't think that would be very maintainable.

          3) Use a generic sql parser and try and deal with the resultant deluge of errors. Not a great option, might be useful as a proof of concept.

          Initial use case is to extend MTR coverage by replacing table references in existing test queries with

          {view,derived table,cte}

          s.

          Johnston Rex Johnston added a comment - I've been thinking of the best way to approach this, there are a few options, in order 1) Embrace/extend https://metacpan.org/pod/DBIx%3A%3AMyParsePP 2) Alter EXPLAIN $query in some way, PARSE $query might be clearer. One of my thoughts was to post process EXPLAIN output, but i don't think that would be very maintainable. 3) Use a generic sql parser and try and deal with the resultant deluge of errors. Not a great option, might be useful as a proof of concept. Initial use case is to extend MTR coverage by replacing table references in existing test queries with {view,derived table,cte} s.

          People

            Johnston Rex Johnston
            Johnston Rex Johnston
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.