Home  >  Article  >  What table is mysql.proc?

What table is mysql.proc?

尊渡假赌尊渡假赌尊渡假赌
尊渡假赌尊渡假赌尊渡假赌Original
2023-07-25 15:57:371975browse

mysql.proc is a system table in the MySQL system database, used to store metadata information about stored procedures and functions. By querying the mysql.proc table, you can obtain the definitions and parameter lists of stored procedures and functions. , return value and creation time, etc. This information is very useful for managing and maintaining stored procedures and functions in the database.

What table is mysql.proc?

Operating system for this tutorial: Windows 10 system, MySQL 8 version, Dell G3 computer.

mysql.proc is a system table in the MySQL system database, used to store metadata information about stored procedures and functions. It is a core table used to record the details of stored procedures and functions defined in the database, including names, parameters, return types, definition statements, etc.

The structure of the mysql.proc table is as follows:

CREATE TABLE mysql.proc (
  db char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  name char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  type enum('FUNCTION', 'PROCEDURE') COLLATE utf8_bin NOT NULL,
  specific_name char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  language enum('SQL') COLLATE utf8_bin NOT NULL DEFAULT 'SQL',
  sql_data_access enum('CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA') COLLATE utf8_bin NOT NULL DEFAULT 'CONTAINS_SQL',
  is_deterministic enum('YES', 'NO') COLLATE utf8_bin NOT NULL DEFAULT 'NO',
  security_type enum('INVOKER', 'DEFINER') COLLATE utf8_bin NOT NULL DEFAULT 'DEFINER',
  param_list blob NOT NULL,
  returns longblob NOT NULL,
  body longblob NOT NULL,
  definer char(93) COLLATE utf8_bin NOT NULL DEFAULT '',
  created timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  sql_mode set('REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'IGNORE_BAD_TABLE_OPTIONS', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE', 'NO_ENGINE_SUBSTITUTION', 'PAD_CHAR_TO_FULL_LENGTH') COLLATE utf8_bin NOT NULL DEFAULT '',
  comment char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  character_set_client char(32) COLLATE utf8_bin DEFAULT NULL,
  collation_connection char(32) COLLATE utf8_bin DEFAULT NULL,
  db_collation char(32) COLLATE utf8_bin DEFAULT NULL,
  body_utf8_long longblob
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Stored Procedures';

By querying the mysql.proc table, you can obtain information such as the definition, parameter list, return value, and creation time of stored procedures and functions. . This information is useful for managing and maintaining stored procedures and functions in the database. Please note that directly modifying the contents of the mysql.proc table is not recommended. You should use the CREATE PROCEDURE or CREATE FUNCTION statement to define, modify, and delete stored procedures and functions.

The above is the detailed content of What table is mysql.proc?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn