Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
10.1.5, 10.1.8, 10.1(EOL)
Description
Hi everybody,
If mysqldump is run with -A (--all-databases) and a VIEW with the same name is exported as the next schema where it is a table it will not export any of the table's data.
Test script:
DROP DATABASE IF EXISTS dumped_last;
|
DROP DATABASE IF EXISTS dumped_first;
|
CREATE DATABASE dumped_last;
|
CREATE DATABASE dumped_first;
|
USE dumped_last
|
CREATE TABLE nonuniquename (id serial);
|
INSERT INTO nonuniquename VALUES(NULL);
|
use dumped_first
|
CREATE TABLE useless (id serial);
|
CREATE VIEW nonuniquename AS SELECT * FROM useless;
|
Then, dump the data:
mysqldump -A -uroot -p > dump.sql
|
And verify that the INSERT INTO uniquename is not present in the dump file. Please verify that 'dump_first' is dumped as first database and 'dumped_last' is dumped as second database. Also -A (or probably --all-databases) is required for this to occur.
The dump file gives a note about the 'Temporary table structure':
--
|
-- Temporary table structure for view `nonuniquename`
|
--
|
|
DROP TABLE IF EXISTS `nonuniquename`;
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET character_set_client = utf8 */;
|
CREATE TABLE `nonuniquename` (
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
UNIQUE KEY `id` (`id`)
|
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
--
|
-- Current Database: `mysql`
|
--
|
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
Hi everybody, If mysqldump is run with -A (--all-databases) and a VIEW with the same name is exported as the next schema where it is a table it will not export any of the table's data. Test script: {{code}} DROP DATABASE IF EXISTS dumped_last; DROP DATABASE IF EXISTS dumped_first; CREATE DATABASE dumped_last; CREATE DATABASE dumped_first; USE dumped_last CREATE TABLE uniquename (id serial); INSERT INTO uniquename VALUES(NULL); use dumped_first CREATE TABLE useless (id serial); CREATE VIEW uniquename AS SELECT * FROM useless; {{code}} Then, dump the data: mysqldump -A -uroot -p > dump.sql And verify that the INSERT INTO uniquename is not present in the dump file. The dump file gives a note about the 'Temporary table structure': {{code}} -- -- Temporary table structure for view `uniquename` -- DROP TABLE IF EXISTS `uniquename`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `uniquename` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Current Database: `mysql` -- {{code}} |
Hi everybody, If mysqldump is run with -A (--all-databases) and a VIEW with the same name is exported as the next schema where it is a table it will not export any of the table's data. Test script: {code} DROP DATABASE IF EXISTS dumped_last; DROP DATABASE IF EXISTS dumped_first; CREATE DATABASE dumped_last; CREATE DATABASE dumped_first; USE dumped_last CREATE TABLE uniquename (id serial); INSERT INTO uniquename VALUES(NULL); use dumped_first CREATE TABLE useless (id serial); CREATE VIEW uniquename AS SELECT * FROM useless; {{code}} Then, dump the data: mysqldump -A -uroot -p > dump.sql And verify that the INSERT INTO uniquename is not present in the dump file. The dump file gives a note about the 'Temporary table structure': {code} -- -- Temporary table structure for view `uniquename` -- DROP TABLE IF EXISTS `uniquename`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `uniquename` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Current Database: `mysql` -- {{code}} |
Description |
Hi everybody, If mysqldump is run with -A (--all-databases) and a VIEW with the same name is exported as the next schema where it is a table it will not export any of the table's data. Test script: {code} DROP DATABASE IF EXISTS dumped_last; DROP DATABASE IF EXISTS dumped_first; CREATE DATABASE dumped_last; CREATE DATABASE dumped_first; USE dumped_last CREATE TABLE uniquename (id serial); INSERT INTO uniquename VALUES(NULL); use dumped_first CREATE TABLE useless (id serial); CREATE VIEW uniquename AS SELECT * FROM useless; {{code}} Then, dump the data: mysqldump -A -uroot -p > dump.sql And verify that the INSERT INTO uniquename is not present in the dump file. The dump file gives a note about the 'Temporary table structure': {code} -- -- Temporary table structure for view `uniquename` -- DROP TABLE IF EXISTS `uniquename`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `uniquename` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Current Database: `mysql` -- {{code}} |
Hi everybody, If mysqldump is run with -A (--all-databases) and a VIEW with the same name is exported as the next schema where it is a table it will not export any of the table's data. Test script: {code} DROP DATABASE IF EXISTS dumped_last; DROP DATABASE IF EXISTS dumped_first; CREATE DATABASE dumped_last; CREATE DATABASE dumped_first; USE dumped_last CREATE TABLE uniquename (id serial); INSERT INTO uniquename VALUES(NULL); use dumped_first CREATE TABLE useless (id serial); CREATE VIEW uniquename AS SELECT * FROM useless; {code} Then, dump the data: mysqldump -A -uroot -p > dump.sql And verify that the INSERT INTO uniquename is not present in the dump file. The dump file gives a note about the 'Temporary table structure': {code} -- -- Temporary table structure for view `uniquename` -- DROP TABLE IF EXISTS `uniquename`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `uniquename` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Current Database: `mysql` -- {code} |
Description |
Hi everybody, If mysqldump is run with -A (--all-databases) and a VIEW with the same name is exported as the next schema where it is a table it will not export any of the table's data. Test script: {code} DROP DATABASE IF EXISTS dumped_last; DROP DATABASE IF EXISTS dumped_first; CREATE DATABASE dumped_last; CREATE DATABASE dumped_first; USE dumped_last CREATE TABLE uniquename (id serial); INSERT INTO uniquename VALUES(NULL); use dumped_first CREATE TABLE useless (id serial); CREATE VIEW uniquename AS SELECT * FROM useless; {code} Then, dump the data: mysqldump -A -uroot -p > dump.sql And verify that the INSERT INTO uniquename is not present in the dump file. The dump file gives a note about the 'Temporary table structure': {code} -- -- Temporary table structure for view `uniquename` -- DROP TABLE IF EXISTS `uniquename`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `uniquename` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Current Database: `mysql` -- {code} |
Hi everybody, If mysqldump is run with -A (--all-databases) and a VIEW with the same name is exported as the next schema where it is a table it will not export any of the table's data. Test script: {code} DROP DATABASE IF EXISTS dumped_last; DROP DATABASE IF EXISTS dumped_first; CREATE DATABASE dumped_last; CREATE DATABASE dumped_first; USE dumped_last CREATE TABLE uniquename (id serial); INSERT INTO uniquename VALUES(NULL); use dumped_first CREATE TABLE useless (id serial); CREATE VIEW uniquename AS SELECT * FROM useless; {code} Then, dump the data: {code} mysqldump -A -uroot -p > dump.sql {code} And verify that the INSERT INTO uniquename is not present in the dump file. Please verify that 'dump_first' is dumped as first database and 'dumped_last' is dumped as second database. Also -A (or probably --all-databases) is required for this to occur. The dump file gives a note about the 'Temporary table structure': {code} -- -- Temporary table structure for view `uniquename` -- DROP TABLE IF EXISTS `uniquename`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `uniquename` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Current Database: `mysql` -- {code} |
Description |
Hi everybody, If mysqldump is run with -A (--all-databases) and a VIEW with the same name is exported as the next schema where it is a table it will not export any of the table's data. Test script: {code} DROP DATABASE IF EXISTS dumped_last; DROP DATABASE IF EXISTS dumped_first; CREATE DATABASE dumped_last; CREATE DATABASE dumped_first; USE dumped_last CREATE TABLE uniquename (id serial); INSERT INTO uniquename VALUES(NULL); use dumped_first CREATE TABLE useless (id serial); CREATE VIEW uniquename AS SELECT * FROM useless; {code} Then, dump the data: {code} mysqldump -A -uroot -p > dump.sql {code} And verify that the INSERT INTO uniquename is not present in the dump file. Please verify that 'dump_first' is dumped as first database and 'dumped_last' is dumped as second database. Also -A (or probably --all-databases) is required for this to occur. The dump file gives a note about the 'Temporary table structure': {code} -- -- Temporary table structure for view `uniquename` -- DROP TABLE IF EXISTS `uniquename`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `uniquename` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Current Database: `mysql` -- {code} |
Hi everybody, If mysqldump is run with -A (--all-databases) and a VIEW with the same name is exported as the next schema where it is a table it will not export any of the table's data. Test script: {code} DROP DATABASE IF EXISTS dumped_last; DROP DATABASE IF EXISTS dumped_first; CREATE DATABASE dumped_last; CREATE DATABASE dumped_first; USE dumped_last CREATE TABLE nonuniquename (id serial); INSERT INTO nonuniquename VALUES(NULL); use dumped_first CREATE TABLE useless (id serial); CREATE VIEW nonuniquename AS SELECT * FROM useless; {code} Then, dump the data: {code} mysqldump -A -uroot -p > dump.sql {code} And verify that the INSERT INTO uniquename is not present in the dump file. Please verify that 'dump_first' is dumped as first database and 'dumped_last' is dumped as second database. Also -A (or probably --all-databases) is required for this to occur. The dump file gives a note about the 'Temporary table structure': {code} -- -- Temporary table structure for view `uniquename` -- DROP TABLE IF EXISTS `uniquename`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `uniquename` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Current Database: `mysql` -- {code} |
Description |
Hi everybody, If mysqldump is run with -A (--all-databases) and a VIEW with the same name is exported as the next schema where it is a table it will not export any of the table's data. Test script: {code} DROP DATABASE IF EXISTS dumped_last; DROP DATABASE IF EXISTS dumped_first; CREATE DATABASE dumped_last; CREATE DATABASE dumped_first; USE dumped_last CREATE TABLE nonuniquename (id serial); INSERT INTO nonuniquename VALUES(NULL); use dumped_first CREATE TABLE useless (id serial); CREATE VIEW nonuniquename AS SELECT * FROM useless; {code} Then, dump the data: {code} mysqldump -A -uroot -p > dump.sql {code} And verify that the INSERT INTO uniquename is not present in the dump file. Please verify that 'dump_first' is dumped as first database and 'dumped_last' is dumped as second database. Also -A (or probably --all-databases) is required for this to occur. The dump file gives a note about the 'Temporary table structure': {code} -- -- Temporary table structure for view `uniquename` -- DROP TABLE IF EXISTS `uniquename`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `uniquename` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Current Database: `mysql` -- {code} |
Hi everybody, If mysqldump is run with -A (--all-databases) and a VIEW with the same name is exported as the next schema where it is a table it will not export any of the table's data. Test script: {code} DROP DATABASE IF EXISTS dumped_last; DROP DATABASE IF EXISTS dumped_first; CREATE DATABASE dumped_last; CREATE DATABASE dumped_first; USE dumped_last CREATE TABLE nonuniquename (id serial); INSERT INTO nonuniquename VALUES(NULL); use dumped_first CREATE TABLE useless (id serial); CREATE VIEW nonuniquename AS SELECT * FROM useless; {code} Then, dump the data: {code} mysqldump -A -uroot -p > dump.sql {code} And verify that the INSERT INTO uniquename is not present in the dump file. Please verify that 'dump_first' is dumped as first database and 'dumped_last' is dumped as second database. Also -A (or probably --all-databases) is required for this to occur. The dump file gives a note about the 'Temporary table structure': {code} -- -- Temporary table structure for view `nonuniquename` -- DROP TABLE IF EXISTS `nonuniquename`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `nonuniquename` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Current Database: `mysql` -- {code} |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Component/s | Scripts & Clients [ 11002 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Affects Version/s | 10.1.5 [ 18813 ] | |
Affects Version/s | 10.1 [ 16100 ] | |
Assignee | Sergei Golubchik [ serg ] | |
Labels | regression | |
Priority | Critical [ 2 ] | Blocker [ 1 ] |
Assignee | Sergei Golubchik [ serg ] | Elena Stepanova [ elenst ] |
Assignee | Elena Stepanova [ elenst ] | Sergei Golubchik [ serg ] |
Status | Confirmed [ 10101 ] | In Review [ 10002 ] |
Assignee | Sergei Golubchik [ serg ] | Vladislav Vaintroub [ wlad ] |
Description |
Hi everybody, If mysqldump is run with -A (--all-databases) and a VIEW with the same name is exported as the next schema where it is a table it will not export any of the table's data. Test script: {code} DROP DATABASE IF EXISTS dumped_last; DROP DATABASE IF EXISTS dumped_first; CREATE DATABASE dumped_last; CREATE DATABASE dumped_first; USE dumped_last CREATE TABLE nonuniquename (id serial); INSERT INTO nonuniquename VALUES(NULL); use dumped_first CREATE TABLE useless (id serial); CREATE VIEW nonuniquename AS SELECT * FROM useless; {code} Then, dump the data: {code} mysqldump -A -uroot -p > dump.sql {code} And verify that the INSERT INTO uniquename is not present in the dump file. Please verify that 'dump_first' is dumped as first database and 'dumped_last' is dumped as second database. Also -A (or probably --all-databases) is required for this to occur. The dump file gives a note about the 'Temporary table structure': {code} -- -- Temporary table structure for view `nonuniquename` -- DROP TABLE IF EXISTS `nonuniquename`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `nonuniquename` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Current Database: `mysql` -- {code} |
Hi everybody, If mysqldump is run with \-A (--all-databases) and a VIEW with the same name is exported as the next schema where it is a table it will not export any of the table's data. Test script: {code} DROP DATABASE IF EXISTS dumped_last; DROP DATABASE IF EXISTS dumped_first; CREATE DATABASE dumped_last; CREATE DATABASE dumped_first; USE dumped_last CREATE TABLE nonuniquename (id serial); INSERT INTO nonuniquename VALUES(NULL); use dumped_first CREATE TABLE useless (id serial); CREATE VIEW nonuniquename AS SELECT * FROM useless; {code} Then, dump the data: {code} mysqldump -A -uroot -p > dump.sql {code} And verify that the INSERT INTO uniquename is not present in the dump file. Please verify that 'dump_first' is dumped as first database and 'dumped_last' is dumped as second database. Also -A (or probably --all-databases) is required for this to occur. The dump file gives a note about the 'Temporary table structure': {code} -- -- Temporary table structure for view `nonuniquename` -- DROP TABLE IF EXISTS `nonuniquename`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `nonuniquename` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Current Database: `mysql` -- {code} |
Fix Version/s | 10.1.9 [ 20301 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Assignee | Vladislav Vaintroub [ wlad ] | Elena Stepanova [ elenst ] |
Resolution | Fixed [ 1 ] | |
Status | In Review [ 10002 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 72531 ] | MariaDB v4 [ 149819 ] |
Thanks for the report.
The problem was introduced by the following commit:
commit ae4b24340d8f6d23ef7f4a82df3f981d65d9b060
Author: Vicențiu Ciorbaru <vicentiu@mariadb.org>
Date: Thu Mar 19 15:16:22 2015 +0200
MDEV-6714 mysqldump slow with tables in big databases
mysqldump now attempts to make use of the INFORMATION_SCHEMA tables.
If the table name is not found with a case sensitive search, it
fallbacks to a case insensitive search.
I'm setting it to blocker because it's a regression and potential data loss.