mariadb/client
Daniel Black d6ea03fa94 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)

Reviewed-by: anel@mariadb.org
2020-11-01 08:04:36 +11:00
..
async_example.c
client_priv.h Merge 10.1 into 10.2 2020-04-01 09:19:37 +03:00
CMakeLists.txt Only link mysys_ssl when required. 2019-06-03 09:55:59 +02:00
completion_hash.cc Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
completion_hash.h Update FSF Address 2019-05-11 21:29:06 +03:00
echo.c Update FSF Address 2019-05-11 21:29:06 +03:00
my_readline.h Update FSF Address 2019-05-11 21:29:06 +03:00
mysql.cc Merge branch '10.1' into 10.2 2020-06-11 22:35:30 +03:00
mysql_plugin.c Merge branch '10.1' into 10.2 2020-06-11 22:35:30 +03:00
mysql_upgrade.c Merge branch '10.1' into 10.2 2020-10-28 10:56:38 +01:00
mysqladmin.cc MDEV-19750 mysql command wrong encoding 2019-06-17 18:04:47 +01:00
mysqlbinlog.cc MDEV-16372 ER_BASE64_DECODE_ERROR upon replaying binary log via mysqlbinlog --verbose 2020-08-31 18:45:14 +03:00
mysqlcheck.c MDEV-19750 mysql command wrong encoding 2019-06-17 18:04:47 +01:00
mysqldump.c MDEV-23630: mysqldump logically dump system table information 2020-11-01 08:04:36 +11:00
mysqlimport.c Merge branch '10.1' into 10.2 2020-06-11 22:35:30 +03:00
mysqlshow.c MDEV-19750 mysql command wrong encoding 2019-06-17 18:04:47 +01:00
mysqlslap.c Merge branch '10.1' into 10.2 2020-06-11 22:35:30 +03:00
mysqltest.cc MDEV-23511 shutdown_server 10 times out, causing server kill at shutdown 2020-08-21 14:48:53 +03:00
readline.cc Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
sql_string.cc.dontuse Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
sql_string.h.dontuse Update FSF Address 2019-05-11 21:29:06 +03:00