Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-23630: mysqldump logically dump system table information #2

Open
wants to merge 2 commits into
base: 10.2
Choose a base branch
from

Commits on Oct 24, 2020

  1. Configuration menu
    Copy the full SHA
    ebc9bbb View commit details
    Browse the repository at this point in the history
  2. MDEV-23630: mysqldump logically dump system table information

    Add --system={all, users, plugins, udfs, servers, stats, timezones}
    
    This will dump system information from the server in
    a logical form like:
    * CREATE USER
    * GRANT
    * SET DEFAULT ROLE
    * CREATE ROLE
    * CREATE SERVER
    * INSTALL PLUGIN
    * CREATE FUNCTION
    
    "stats" is the innodb statistics tables or EITS and
    these are dumped as INSERT/REPLACE INTO statements
    without recreating the table.
    
    "timezones" is the collection of timezone tables
    which are important to transfer to generate identical
    results on restoration.
    
    Two other options have an effect on the SQL generated by
    --system=all. These are mutually exclusive of each other.
    * --replace
    * --insert-ignore
    
    --replace will include "OR REPLACE" into the logical form
    like:
    * CREATE OR REPLACE USER ...
    * DROP ROLE IF EXISTS (MySQL-8.0+)
    * CREATE OR REPLACE ROLE ...
    * UNINSTALL PLUGIN IF EXISTS (10.4+) ... (before INSTALL PLUGIN)
    * DROP FUNCTION IF EXISTS (MySQL-5.7+)
    * CREATE OR REPLACE [AGGREGATE] FUNCTION
    * CREATE OR REPLACE SERVER
    
    --insert-ignore uses the construct " IF NOT EXISTS" where
    supported in the logical syntax.
    
    'CREATE OR REPLACE USER' includes protection against
    being run as the same user that is importing the mysqldump.
    
    Includes experimental support for dumping mysql-5.7/8.0
    system tables and exporting logical SQL compatible with MySQL.
    
    Updates mysqldump man page, including this information and
    (removing obsolute bug reference)
    grooverdan committed Oct 24, 2020
    Configuration menu
    Copy the full SHA
    a7fe616 View commit details
    Browse the repository at this point in the history