help
NAME
help(): search and read common_schema documentation.TYPE
ProcedureDESCRIPTION
help() is a meta routine allowing access to documentation from within common_schema itself.
The documentation, including, for example, this very page, is embedded within common_schema's tables, such that it can be searched and read using standard SQL queries.
help() accepts a search term, and presents a single documentation page which best fits the term. The term may appear within the documentation's title or description. It could be the name or part of name of one of common_schema's components (routines, views, ...), or it could be any keyword appearing within the documentation.
The output is MySQL-friendly, in that it breaks the documentation into rows of text, thereby presenting the result in a nicely formatted table.
SYNOPSIS
help(expression TINYTEXT CHARSET utf8)
Input:
- expression: a search term to be looked for.
The term could be a full or partial word. The search is case insensitive.
Regular expression search is not supported.
EXAMPLES
Find help on a search term:
mysql> call help('match'); +-------------------------------------------------------------------------------+ | help | +-------------------------------------------------------------------------------+ | | | NAME | | | | match_grantee(): Match an existing account based on user+host. | | | | TYPE | | | | Function | | | | DESCRIPTION | | | | MySQL does not provide with identification of logged in accounts. It only | | provides with user + host:port combination within processlist. Alas, these do | | not directly map to accounts, as MySQL lists the host:port from which the | | connection is made, but not the (possibly wildcard) user or host. | | This function matches a user+host combination against the known accounts, | | using the same matching method as the MySQL server, to detect the account | | which MySQL identifies as the one matching. It is similar in essence to | | CURRENT_USER(), only it works for all sessions, not just for the current | | session. | | | | SYNOPSIS | | | | | | | | match_grantee(connection_user char(16) CHARSET utf8, | | connection_host char(70) CHARSET utf8) | | RETURNS VARCHAR(100) CHARSET utf8 | | | | | | Input: | | | | * connection_user: user login (e.g. as specified by PROCESSLIST) | | * connection_host: login host. May optionally specify port number (e.g. | | webhost:12345), which is discarded by the function. This is to support | | immediate input from as specified by PROCESSLIST. | | | | | | EXAMPLES | | | | Find an account matching the given use+host combination: | | | | | | mysql> SELECT match_grantee('apps', '192.128.0.1:12345') AS | | grantee; | | +------------+ | | | grantee | | | +------------+ | | | 'apps'@'%' | | | +------------+ | | | | | | | | ENVIRONMENT | | | | MySQL 5.1 or newer | | | | SEE ALSO | | | | processlist_grantees | | | | AUTHOR | | | | Shlomi Noach | | | +-------------------------------------------------------------------------------+