PDF (A4) - 43.4Mb
Man Pages (TGZ) - 297.3Kb
Man Pages (Zip) - 402.5Kb
Info (Gzip) - 4.3Mb
Info (Zip) - 4.3Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
Security in MySQL
Starting and Stopping MySQL
MySQL and Linux/Unix
MySQL and Windows
MySQL and macOS
MySQL and Solaris
Building MySQL from Source
MySQL Restrictions and Limitations
MySQL Partitioning
MySQL Tutorial
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL NDB Cluster 8.0
MySQL supports query rewrite plugins that can examine and possibly modify SQL statements received by the server before the server executes them. SeeQuery Rewrite Plugins.
MySQL distributions include a postparse query rewrite plugin namedRewriter and scripts for installing the plugin and its associated elements. These elements work together to provide statement-rewriting capability:
A server-side plugin named
Rewriterexamines statements and may rewrite them, based on its in-memory cache of rewrite rules.These statements are subject to rewriting:
Standalone statements and prepared statements are subject to rewriting. Statements occurring within view definitions or stored programs are not subject to rewriting.
The
Rewriterplugin uses a database namedquery_rewritecontaining a table namedrewrite_rules. The table provides persistent storage for the rules that the plugin uses to decide whether to rewrite statements. Users communicate with the plugin by modifying the set of rules stored in this table. The plugin communicates with users by setting themessagecolumn of table rows.The
query_rewritedatabase contains a stored procedure namedflush_rewrite_rules()that loads the contents of the rules table into the plugin.A loadable function named
load_rewrite_rules()is used by theflush_rewrite_rules()stored procedure.The
Rewriterplugin exposes system variables that enable plugin configuration and status variables that provide runtime operational information. In MySQL 8.0.31 and later, this plugin also supports a privilege (SKIP_QUERY_REWRITE) that protects a given user's queries from being rewritten.
The following sections describe how to install and use theRewriter plugin, and provide reference information for its associated elements.
PDF (A4) - 43.4Mb
Man Pages (TGZ) - 297.3Kb
Man Pages (Zip) - 402.5Kb
Info (Gzip) - 4.3Mb
Info (Zip) - 4.3Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
Security in MySQL
Starting and Stopping MySQL
MySQL and Linux/Unix
MySQL and Windows
MySQL and macOS
MySQL and Solaris
Building MySQL from Source
MySQL Restrictions and Limitations
MySQL Partitioning
MySQL Tutorial
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL NDB Cluster 8.0