1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug#31434 mysqldump dumps view as table

mysqldump creates stand-in tables before dumping the actual view.
Those tables were of the default type; if the view had more columns
than that (a pathological case, arguably), loading the dump would
fail. We now make the temporary stand-ins MyISAM tables to prevent
this.
This commit is contained in:
Tatiana A. Nurnberg
2008-09-11 08:14:19 +02:00
4 changed files with 1091 additions and 13 deletions

View File

@@ -1999,7 +1999,7 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v2` (
`a` varchar(30)
) */;
) ENGINE=MyISAM */;
SET character_set_client = @saved_cs_client;
/*!50001 DROP TABLE `v2`*/;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
@@ -2096,7 +2096,7 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v1` (
`a` int(11)
) */;
) ENGINE=MyISAM */;
SET character_set_client = @saved_cs_client;
/*!50001 DROP TABLE `v1`*/;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
@@ -2170,7 +2170,7 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v2` (
`a` varchar(30)
) */;
) ENGINE=MyISAM */;
SET character_set_client = @saved_cs_client;
/*!50001 DROP TABLE `v2`*/;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
@@ -2286,7 +2286,7 @@ SET character_set_client = utf8;
`a` int(11),
`b` int(11),
`c` varchar(30)
) */;
) ENGINE=MyISAM */;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `v2`;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
@@ -2294,7 +2294,7 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v2` (
`a` int(11)
) */;
) ENGINE=MyISAM */;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `v3`;
/*!50001 DROP VIEW IF EXISTS `v3`*/;
@@ -2304,7 +2304,7 @@ SET character_set_client = utf8;
`a` int(11),
`b` int(11),
`c` varchar(30)
) */;
) ENGINE=MyISAM */;
SET character_set_client = @saved_cs_client;
/*!50001 DROP TABLE `v1`*/;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
@@ -3041,7 +3041,7 @@ SET character_set_client = utf8;
`a` int(11),
`b` varchar(32),
`c` varchar(32)
) */;
) ENGINE=MyISAM */;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `v1`;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
@@ -3051,7 +3051,7 @@ SET character_set_client = utf8;
`a` int(11),
`b` varchar(32),
`c` varchar(32)
) */;
) ENGINE=MyISAM */;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `v2`;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
@@ -3061,7 +3061,7 @@ SET character_set_client = utf8;
`a` int(11),
`b` varchar(32),
`c` varchar(32)
) */;
) ENGINE=MyISAM */;
SET character_set_client = @saved_cs_client;
USE `test`;
@@ -3441,7 +3441,7 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v1` (
`id` int(11)
) */;
) ENGINE=MyISAM */;
SET character_set_client = @saved_cs_client;
USE `mysqldump_test_db`;
@@ -3501,7 +3501,7 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `nasishnasifu` (
`id` bigint(20) unsigned
) */;
) ENGINE=MyISAM */;
SET character_set_client = @saved_cs_client;
USE `mysqldump_tables`;
@@ -3959,7 +3959,7 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v1` (
`id` int(11)
) */;
) ENGINE=MyISAM */;
SET character_set_client = @saved_cs_client;
USE `mysqldump_test_db`;