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

Extention of DIGEST

    XMLWordPrintable

Details

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

    Description

      Hello,

      My goal, will be to display the DIGEST of the query in general_log and slow_query_log, (or create a new file with this informations to not break old tools witch can ingest this result)

      like 1687483 Query SELECT FROM_DAYS(CAST(SUBSTRING(MIN(PARTITION_NAME), 2) AS UNSIGNED) - 1) AS partition_date [cc4ac87fb2e9a58f605bfeb7c4e7d291]

      The idea there is to simply match query from PF to exemple in general_log, or slow_query. I think really easy to add and it can give big benefit with optimization.
      Because in case of ORM you can only see SELECT xxxxxxx (really long) and even not the from.

      Despite to make the same as MySQL : https://jira.mariadb.org/browse/MDEV-26259

      it could be nice if MariaDB could have a function to give his own DIGEST and DIGEST_TEXT (doestn't matter if the same as MySQL or not, of course better if yes)

      To be hostnest i developed my own function to generate DIGEST_TEXT, the problem with mariadb there is bug too : (that is had to reproduce ...)

      SELECT id FROM mysql_server;
      -- Not the same query than :
      SELECT `id` FROM mysql_server; --HUK
       
      -- will give SELECT `id` FROM `mysql_server`
       
      SELECT id FROM mysql_server; -- id without ` , -- it's the same problem for all KEYS WORDS
      -- will give SELECT ID FROM `mysql_server`
      

      These 2 query are equal by not give the same digest_text and of course not the same DIGEST too.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Aurelien_LEQUOY Aurélien LEQUOY
            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.