content_image/806703.jpg
## • message 

The plugin uses this column for communicating with users. If no error occurs when the rules table is loaded into memory, the plugin sets the message  column to NULL . A non- NULL  value indicates an error and the column contents are the error message. Errors can occur under these circumstances: 

•Either the pattern or the replacement is an incorrect SQL statement that produces syntax errors. 

•The replacement contains more ?  parameter markers than the pattern. 

If a load error occurs, the plugin also sets the Rewriter_reload_error  status variable to ON . 

## • pattern_digest 

This column is used for debugging and diagnostics. If the column exists when the rules table is loaded into memory, the plugin updates it with the pattern digest. This column may be useful if you are trying to determine why some statement fails to be rewritten. 

## • normalized_pattern 

This column is used for debugging and diagnostics. If the column exists when the rules table is loaded into memory, the plugin updates it with the normalized form of the pattern. This column may be useful if you are trying to determine why some statement fails to be rewritten. 

## Rewriter Query Rewrite Plugin Procedures and Functions 

Rewriter  plugin operation uses a stored procedure that loads the rules table into its in-memory cache, and a helper loadable function. Under normal operation, users invoke only the stored procedure. The function is intended to be invoked by the stored procedure, not directly by users. 

## • flush_rewrite_rules() 

This stored procedure uses the load_rewrite_rules()  function to load the contents of the rewrite_rules  table into the Rewriter  in-memory cache. 

Calling flush_rewrite_rules()  implies COMMIT . 

Invoke this procedure after you modify the rules table to cause the plugin to update its cache from the new table contents. If any errors occur, the plugin sets the message  column for the appropriate rule rows in the table and sets the Rewriter_reload_error  status variable to ON . 

## • load_rewrite_rules() 

This function is a helper routine used by the flush_rewrite_rules()  stored procedure. 

## Rewriter Query Rewrite Plugin System Variables 

The Rewriter  query rewrite plugin supports the following system variables. These variables are available only if the plugin is installed (see Section 5.6.4.1, “Installing or Uninstalling the Rewriter Query Rewrite Plugin” ). 

## • rewriter_enabled 

<img src='content_image/806703.jpg'>

