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

built-in documentation for performance_schema tables

    XMLWordPrintable

Details

    Description

      Document all performance schema tables using per-column COMMENT, like in

      --- a/storage/perfschema/table_file_instances.cc
      +++ b/storage/perfschema/table_file_instances.cc
      @@ -49,9 +49,9 @@ table_file_instances::m_share=
         sizeof(PFS_simple_index),
         &m_table_lock,
         { C_STRING_WITH_LEN("CREATE TABLE file_instances("
      -                      "FILE_NAME VARCHAR(512) not null,"
      -                      "EVENT_NAME VARCHAR(128) not null,"
      -                      "OPEN_COUNT INTEGER unsigned not null)") },
      +                      "FILE_NAME VARCHAR(512) not null comment 'File name',"
      +                      "EVENT_NAME VARCHAR(128) not null comment 'Instrument name associated with the file',"
      +                      "OPEN_COUNT INTEGER unsigned not null comment 'Open handles on the file. A value of greater than zero means that the file is currently open')") },
         false  /* perpetual */
       };
       

      After that one can see the built-in documentation with

      show create table performance_schema.file_instances

      or, better, with

      select column_name, column_comment from information_schema.columns where table_schema='performance_schema' and table_name='file_instances'

      returning

      +-------------+----------------------------------------------------------------------------------------------+
      | column_name | column_comment                                                                               |
      +-------------+----------------------------------------------------------------------------------------------+
      | FILE_NAME   | File name                                                                                    |
      | EVENT_NAME  | Instrument name associated with the file                                                     |
      | OPEN_COUNT  | Open handles on the file. A value of greater than zero means that the file is currently open |
      +-------------+----------------------------------------------------------------------------------------------+

      The documentation text is taken from https://mariadb.com/kb/en/performance-schema-file_instances-table/

      Attachments

        Activity

          People

            cvicentiu Vicențiu Ciorbaru
            serg Sergei Golubchik
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.