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

performance_schema.session_connect_attrs not showing attributes

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.6.11, 11.0.0
    • N/A
    • Performance Schema
    • None

    Description

      When connecting with a MariaDB and/or MySQL Client I can see connection attributes being sent in the network packets, but I don't see them in P_S.

      mysql [localhost:11000] {msandbox} ((none)) > SELECT * FROM performance_schema.session_connect_attrs;
      Empty set (0.002 sec)
      

      I tried multiple versions of MariaDB with dbdeployer on Fedora 37

      Looking at the docs ( https://mariadb.com/kb/en/performance-schema-session_connect_attrs-table/ ) it seems that this should work.

      Attachments

        Issue Links

          Activity

            dveeden Daniël van Eeden added a comment - I found this when reviewing https://github.com/go-sql-driver/mysql/pull/1389

            there must be more to it. connect attributes are covered in the mysql-test (test name pefschema.connect_attrs), so they must work, at least in some cases. I've tried both 10.6 and 11.0 latest.

            Do you have performance_schema enabled?

            serg Sergei Golubchik added a comment - there must be more to it. connect attributes are covered in the mysql-test (test name pefschema.connect_attrs), so they must work, at least in some cases. I've tried both 10.6 and 11.0 latest. Do you have performance_schema enabled?

            mysql [localhost:11000] {msandbox} ((none)) > SELECT * FROM performance_schema.session_connect_attrs;
            Empty set (0.001 sec)
             
            mysql [localhost:11000] {msandbox} ((none)) > SELECT @@global.performance_schema;
            +-----------------------------+
            | @@global.performance_schema |
            +-----------------------------+
            |                           0 |
            +-----------------------------+
            1 row in set (0.000 sec)
            

            After adding performance_schema to my.sandbox.cnf and restaring:

            mysql [localhost:11000] {msandbox} ((none)) > SELECT * FROM performance_schema.session_connect_attrs;
            +----------------+-----------------+------------+------------------+
            | PROCESSLIST_ID | ATTR_NAME       | ATTR_VALUE | ORDINAL_POSITION |
            +----------------+-----------------+------------+------------------+
            |              3 | _os             | Linux      |                0 |
            |              3 | _client_name    | libmariadb |                1 |
            |              3 | _pid            | 806209     |                2 |
            |              3 | _client_version | 3.3.3      |                3 |
            |              3 | _platform       | x86_64     |                4 |
            |              3 | program_name    | mysql      |                5 |
            +----------------+-----------------+------------+------------------+
            6 rows in set (0.002 sec)
            

            I don't know why I overlooked this.

            Feel free to close this ticket. Might be good to make a note about this on https://mariadb.com/kb/en/performance-schema-session_connect_attrs-table/ as MySQL has performance_schema enabled by default so other people might also be surprised by this.

            dveeden Daniël van Eeden added a comment - mysql [localhost:11000] {msandbox} ((none)) > SELECT * FROM performance_schema.session_connect_attrs; Empty set (0.001 sec)   mysql [localhost:11000] {msandbox} ((none)) > SELECT @@global.performance_schema; +-----------------------------+ | @@global.performance_schema | +-----------------------------+ | 0 | +-----------------------------+ 1 row in set (0.000 sec) After adding performance_schema to my.sandbox.cnf and restaring: mysql [localhost:11000] {msandbox} ((none)) > SELECT * FROM performance_schema.session_connect_attrs; +----------------+-----------------+------------+------------------+ | PROCESSLIST_ID | ATTR_NAME | ATTR_VALUE | ORDINAL_POSITION | +----------------+-----------------+------------+------------------+ | 3 | _os | Linux | 0 | | 3 | _client_name | libmariadb | 1 | | 3 | _pid | 806209 | 2 | | 3 | _client_version | 3.3.3 | 3 | | 3 | _platform | x86_64 | 4 | | 3 | program_name | mysql | 5 | +----------------+-----------------+------------+------------------+ 6 rows in set (0.002 sec) I don't know why I overlooked this. Feel free to close this ticket. Might be good to make a note about this on https://mariadb.com/kb/en/performance-schema-session_connect_attrs-table/ as MySQL has performance_schema enabled by default so other people might also be surprised by this.

            Thanks! Good that it's solved and the test is fixed.

            greenman, please see the last comment and consider adding a warning, if you think it's needed

            serg Sergei Golubchik added a comment - Thanks! Good that it's solved and the test is fixed. greenman , please see the last comment and consider adding a warning, if you think it's needed

            People

              serg Sergei Golubchik
              dveeden Daniël van Eeden
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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