No cache version.

Caching disabled. Default setting for this page:enabled (code DEF204)
If the display is too slow, you can disable the user mode to view the cached version.

Rechercher dans le manuel MySQL

5.6.5 The ddl_rewriter Plugin

MySQL 8.0.16 and higher includes a ddl_rewriter plugin that modifies CREATE TABLE statements received by the server before it parses and executes them. The plugin removes ENCRYPTION, DATA DIRECTORY, and INDEX DIRECTORY clauses, which may be helpful when restoring tables from SQL dump files created from databases that are encrypted or that have their tables stored outside the data directory. For example, the plugin may enable restoring such dump files into an unencrypted instance or in an environment where the paths outside the data directory are not accessible.

Before using the ddl_rewriter plugin, install it according to the instructions provided in Section 5.6.5.1, “Installing or Uninstalling ddl_rewriter”.

ddl_rewriter examines SQL statements received by the server prior to parsing, rewriting them according to these conditions:

  • ddl_rewriter considers only CREATE TABLE statements, and only if they are standalone statements that occur at the beginning of an input line or at the beginning of prepared statement text. ddl_rewriter does not consider CREATE TABLE statements within stored program definitions. Statements can extend over multiple lines.

  • Within statements considered for rewrite, instances of the following clauses are rewritten and each instance replaced by a single space:

    • ENCRYPTION

    • DATA DIRECTORY (at the table and partition levels)

    • INDEX DIRECTORY (at the table and partition levels)

  • Rewriting does not depend on lettercase.

If ddl_rewriter rewrites a statement, it generates a warning:

  1. mysql> CREATE TABLE t (i INT) DATA DIRECTORY '/var/mysql/data';
  2. Query OK, 0 rows affected, 1 warning (0.03 sec)
  3.  
  4. mysql> SHOW WARNINGS\G
  5. *************************** 1. row ***************************
  6.   Level: Note
  7.    Code: 1105
  8. Message: Query 'CREATE TABLE t (i INT) DATA DIRECTORY '/var/mysql/data''
  9.          rewritten to 'CREATE TABLE t (i INT) ' by a query rewrite plugin
  10. 1 row in set (0.00 sec)

If the general query log or binary log is enabled, the server writes to it statements as they appear after any rewriting by ddl_rewriter.

When installed, ddl_rewriter exposes the Performance Schema memory/rewriter/ddl_rewriter instrument for tracking plugin memory use. See Section 26.12.17.10, “Memory Summary Tables”


Find a PHP function

Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-ddl-rewriter.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:en Manuel MySQL : https://dev.mysql.com/

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.

Contents Haut