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

P_S functions STATEMENT_DIGEST_TEXT and STATEMENT_DIGEST are missing

Details

    Description

      In MySQL 8.0 the 2 functions STATEMENT_DIGEST_TEXT and STATEMENT_DIGEST where introduced. Those are pretty convenient if you want to do your own stuff related to the P_S.

      https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_statement-digest

      Because MariaDB 10.6 is actively supporting P_S it would be nice to have those functions as well. Otherwise we always have to rely on MySQL 8.0 for some query reporting stuff.

      Attachments

        Issue Links

          Activity

            Productboard is not visible to me (or public). Is this intentional?

            oli Oli Sennhauser added a comment - Productboard is not visible to me (or public). Is this intentional?

            no, sorry, it was a mistake. somebody experimenting with a new plugin for a different jira project.

            serg Sergei Golubchik added a comment - no, sorry, it was a mistake. somebody experimenting with a new plugin for a different jira project.
            Aurelien_LEQUOY Aurélien LEQUOY added a comment - - edited

            https://mariadb.com/kb/en/performance-schema-digests/

            from documentation it's say it's a MD5, but in reality :

            MariaDB [performance_schema]> select DIGEST from performance_schema.events_statements_history_long where DIGEST_TEXT = 'BEGIN' limit 1;
            +----------------------------------+
            | DIGEST                           |
            +----------------------------------+
            | af3d08bb89469f5a9513b6ed0d370be2 |
            +----------------------------------+
            1 row in set (0,000 sec)
             
            MariaDB [performance_schema]> select md5('BEGIN');
            +----------------------------------+
            | md5('BEGIN')                     |
            +----------------------------------+
            | 19aad9f2fe3ce0023298ab83f7e75775 |
            +----------------------------------+
            1 row in set (0,000 sec)
            
            

            Why not just a simple md5 ?

            Aurelien_LEQUOY AurĂ©lien LEQUOY added a comment - - edited https://mariadb.com/kb/en/performance-schema-digests/ from documentation it's say it's a MD5, but in reality : MariaDB [performance_schema]> select DIGEST from performance_schema.events_statements_history_long where DIGEST_TEXT = 'BEGIN' limit 1 ; +----------------------------------+ | DIGEST | +----------------------------------+ | af3d08bb89469f5a9513b6ed0d370be2 | +----------------------------------+ 1 row in set ( 0 , 000 sec)   MariaDB [performance_schema]> select md5( 'BEGIN' ); +----------------------------------+ | md5( 'BEGIN' ) | +----------------------------------+ | 19aad9f2fe3ce0023298ab83f7e75775 | +----------------------------------+ 1 row in set ( 0 , 000 sec) Why not just a simple md5 ?

            it's not an MD5 of the digest text. Thanks for pointing this out, I've corrected the manual.

            It is an MD5 of a sequence of parser tokens, for example "BEGIN" is 605 (in 11.0).

            serg Sergei Golubchik added a comment - it's not an MD5 of the digest text. Thanks for pointing this out, I've corrected the manual. It is an MD5 of a sequence of parser tokens, for example "BEGIN" is 605 (in 11.0).

            People

              danblack Daniel Black
              oli Oli Sennhauser
              Votes:
              1 Vote for this issue
              Watchers:
              6 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.