Database object information record table | A comprehensive understanding of the mysql system library

In the last issue of "Access Authority Control System | A Comprehensive Understanding of the MySQL System Library" , we introduced MySQL's access authority control system in detail with the MySQL authority table. In this issue, we will bring you the third part of the series "Metadata Record table|A comprehensive understanding of mysql system library", please follow us to start the system learning journey of mysql system library.

1、plugin

This table provides information for querying custom installed plug-ins (not the plug-ins enabled by default). The function of this table has been replaced by the information_schema.plugins table.

The following is the information stored in the table.

root@localhost : mysql 01:00:20> select * from plugin;
+------------------------------------------+-----------------------+
| name                                     | dl                    |
+------------------------------------------+-----------------------+
| CONNECTION_CONTROL                       | connection_control.so |
| CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS | connection_control.so |
+------------------------------------------+-----------------------+
2 rows in set (0.00 sec)

Table field meaning

  • name: Customize the plug-in name specified when installing the plug-in.

  • dl: The name of the plug-in so library for custom installation.

2、proc

This table provides query content similar to the information_schema.routines table (earlier versions mainly record stored procedures for users), but the information_schema.routines table records more detailed information.

The following is the information stored in the table.

root@localhost : mysql 01:01:09> select * from proc limit 1\G;
*************************** 1. row ***************************
                  db: sys
                name: extract_schema_from_file_name
                type: FUNCTION
       specific_name: extract_schema_from_file_name
            language: SQL
     sql_data_access: NO_SQL
    is_deterministic: YES
       security_type: INVOKER
          param_list:  path VARCHAR(512) 
             returns: varchar(64) CHARSET utf8
                body: BEGIN RETURN LEFT(SUBSTRING_INDEX(SUBSTRING_INDEX(REPLACE(path, '\\', '/'), '/', -2), '/', 1), 64); END
             definer: mysql.sys@localhost
             created: 2017-07-01 14:31:32
            modified: 2017-07-01 14:31:32
            sql_mode: 
             comment: 
 Description
 ......
character_set_client: utf8
collation_connection: utf8_general_ci
        db_collation: utf8_general_ci
           body_utf8: BEGIN RETURN LEFT(SUBSTRING_INDEX(SUBSTRING_INDEX(REPLACE(path, '\', '/'), '/', -2), '/', 1), 64); END
1 row in set (0.01 sec)

Table field meaning

  • It is similar to the information_schema.routines table. For details, refer to the routines section in the article "Server Layer Table Level Object Dictionary Table|A Comprehensive Understanding of Information_schema", so I won't repeat it here.

3、event

This table provides event information related to query plan tasks. The information in this table is the same as information_schema.events, and the information recorded in information_schema.events is more detailed.

The following is the information stored in the table.

root@localhost : mysql 01:02:41> select * from event limit 1\G;
*************************** 1. row ***************************
                  db: sbtest
                name: test_event
                body: BEGIN
insert into test_table select max(id) from sbtest1;
      END
             definer: root@%
          execute_at: NULL
      interval_value: 1
      interval_field: DAY
             created: 2018-01-21 17:05:37
            modified: 2018-01-21 17:08:56
       last_executed: NULL
              starts: 2018-01-21 09:05:37
                ends: NULL
              status: ENABLED
       on_completion: DROP
            sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
             comment: 每天统计sbtest1表中的最大自增值
          originator: 3306111
           time_zone: +08:00
character_set_client: utf8
collation_connection: utf8_general_ci
        db_collation: utf8_bin
           body_utf8: BEGIN
insert into test_table select max(id) from sbtest1;
      END
1 row in set (0.00 sec)

Table field meaning

  • The meanings of the fields in the information_schema.events table are similar. For details, please refer to the events part of the article "Server-level table-level object dictionary table|A comprehensive understanding of information_schema", which will not be repeated here.

4、func

This table provides query content similar to the information_schema.routines table (earlier versions are mainly used to record user-defined functions), but the information_schema.routines table records more details.

  • In addition, the table is also dedicated to record the function information installed from the so plug-in library.

The following is the information content stored in the table (the sample content listed here is the UDF function installed from the enterprise version so plug-in).

root@localhost : mysql 12:52:05> select * from func;
+--------------------------------+-----+--------------+-----------+
| name | ret | dl | type |
+--------------------------------+-----+--------------+-----------+
| audit_log_filter_flush | 0 | audit_log.so | function |
| audit_log_filter_remove_user | 0 | audit_log.so | function |
| audit_log_filter_set_user | 0 | audit_log.so | function |
| audit_log_filter_remove_filter | 0 | audit_log.so | function |
| audit_log_filter_set_filter | 0 | audit_log.so | function |
| set_firewall_mode | 0 | firewall.so | function |
| normalize_statement | 0 | firewall.so | function |
| mysql_firewall_flush_status | 0 | firewall.so | function |
| read_firewall_whitelist | 0 | firewall.so | aggregate |
| read_firewall_users | 0 | firewall.so | aggregate |
+--------------------------------+-----+--------------+-----------+
10 rows in set (0.00 sec)

Table field meaning

  • For details, please refer to the information_schema.routines table. For details, please refer to the routines part of the article "Server Layer Table Level Object Dictionary Table|A Comprehensive Understanding of Information_schema", which will not be repeated here.

The content of this issue is introduced here, and the reference link for the content of this issue is as follows:

https://dev.mysql.com/doc/refman/5.7/en/system-database.html

"Climbing over this mountain, you can see a piece of sea!". Keep reading our "A Comprehensive Understanding of the MySQL System Library" series of articles to share, and you can learn it systematically. Thank you for reading, we will see you in the next issue!

| About the author

Luo Xiaobo·ScaleFlux Database Technology Expert

One of the authors of "A Thousand Gold Recipes-MySQL Performance Optimization Pyramid Rule", "Data Ecology: MySQL Replication Technology and Production Practice".

Familiar with MySQL architecture, good at overall database tuning, like to specialize in open source technology, and keen on the promotion of open source technology, have done many public database topic sharing online and offline, and published nearly 100 database-related research articles.

The full text is over.

Enjoy MySQL :)

Teacher Ye's "MySQL Core Optimization" class has been upgraded to MySQL 8.0, scan the code to start the journey of MySQL 8.0 practice

Guess you like

Origin blog.csdn.net/n88Lpo/article/details/110507598