| Bug #81365 | mysqlpump always includes the schema name and statements,even in single-db dumps | ||
|---|---|---|---|
| Submitted: | 10 May 2016 13:07 | Modified: | 11 May 2016 10:10 |
| Reporter: | Saverio Miroddi | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: mysqlpump Command-line Client | Severity: | S3 (Non-critical) |
| Version: | 5.7.*, 5.7.12 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[11 May 2016 10:10]
MySQL Verification Team
Hello Saverio, Thank you for the report. Verified as described with 5.6.12 build. Thanks, Umesh

Description: Mysqlpump is inconsistent with mysqldump when it comes to object definitions. In mysqldump, when a single database is specified, the schema name is not included in the object definitions, nor schema-related statements are generated, eg.: $ mysqldump mydb Yields (sample): CREATE TABLE `mytable` ( In mysqlpump, in the same conditions, it's the opposite: $ mysqlpump mydb Yields (sample): CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mydb` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `mydb`; CREATE TABLE `mydb`.`mytable` ( This is inconsistent, and most importantly, it prevents a use case which was previously possible, that is, to restore data on a schema with a different name than the source one. How to repeat: Dump a single schema using mysqlpump. Suggested fix: Mysqlpump should stick to the mysqldump behavior when it comes to dumping a single schema.