List:Commits« Previous MessageNext Message »
From:Tatiana A. Nurnberg Date:September 11 2008 5:46am
Subject:bzr commit into mysql-5.0 branch (azundris:2685) Bug#31434
View as plain text  
#At file:///misc/mysql/forest/mysql-5.0-5.1.29-downmix/

 2685 Tatiana A. Nurnberg	2008-09-11
      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.
modified:
  client/mysqldump.c
  mysql-test/r/mysqldump.result

per-file messages:
  client/mysqldump.c
    When creating a stand-in table, specify its type to
    avoid defaulting to a type with a column-number limit
    (like Inno). The type is always MyISAM as we know that
    to be available.
  mysql-test/r/mysqldump.result
    mysqldump sets engine-type (MyISAM) for stand-in tables
    for views now. Update test results.
=== modified file 'client/mysqldump.c'
--- a/client/mysqldump.c	2008-03-14 13:32:01 +0000
+++ b/client/mysqldump.c	2008-09-11 05:46:43 +0000
@@ -1836,7 +1836,13 @@ static uint get_table_structure(char *ta
               fprintf(sql_file, ",\n  %s %s",
                       quote_name(row[0], name_buff, 0), row[1]);
             }
-            fprintf(sql_file, "\n) */;\n");
+            /*
+              Stand-in tables are always MyISAM tables as the default
+              engine might have a column-limit that's lower than the
+              number of columns in the view, and MyISAM support is
+              guaranteed to be in the server anyway.
+            */
+            fprintf(sql_file, "\n) ENGINE=MyISAM */;\n");
             check_io(sql_file);
           }
         }

=== modified file 'mysql-test/r/mysqldump.result'
--- a/mysql-test/r/mysqldump.result	2008-03-02 18:20:36 +0000
+++ b/mysql-test/r/mysqldump.result	2008-09-11 05:46:43 +0000
@@ -1996,7 +1996,7 @@ DROP TABLE IF EXISTS `v2`;
 /*!50001 DROP VIEW IF EXISTS `v2`*/;
 /*!50001 CREATE TABLE `v2` (
   `a` varchar(30)
-) */;
+) ENGINE=MyISAM */;
 /*!50001 DROP TABLE `v2`*/;
 /*!50001 DROP VIEW IF EXISTS `v2`*/;
 /*!50001 CREATE ALGORITHM=UNDEFINED */
@@ -2078,7 +2078,7 @@ DROP TABLE IF EXISTS `v1`;
 /*!50001 DROP VIEW IF EXISTS `v1`*/;
 /*!50001 CREATE TABLE `v1` (
   `a` int(11)
-) */;
+) ENGINE=MyISAM */;
 /*!50001 DROP TABLE `v1`*/;
 /*!50001 DROP VIEW IF EXISTS `v1`*/;
 /*!50001 CREATE ALGORITHM=UNDEFINED */
@@ -2140,7 +2140,7 @@ DROP TABLE IF EXISTS `v2`;
 /*!50001 DROP VIEW IF EXISTS `v2`*/;
 /*!50001 CREATE TABLE `v2` (
   `a` varchar(30)
-) */;
+) ENGINE=MyISAM */;
 /*!50001 DROP TABLE `v2`*/;
 /*!50001 DROP VIEW IF EXISTS `v2`*/;
 /*!50001 CREATE ALGORITHM=UNDEFINED */
@@ -2244,19 +2244,19 @@ DROP TABLE IF EXISTS `v1`;
   `a` int(11),
   `b` int(11),
   `c` varchar(30)
-) */;
+) ENGINE=MyISAM */;
 DROP TABLE IF EXISTS `v2`;
 /*!50001 DROP VIEW IF EXISTS `v2`*/;
 /*!50001 CREATE TABLE `v2` (
   `a` int(11)
-) */;
+) ENGINE=MyISAM */;
 DROP TABLE IF EXISTS `v3`;
 /*!50001 DROP VIEW IF EXISTS `v3`*/;
 /*!50001 CREATE TABLE `v3` (
   `a` int(11),
   `b` int(11),
   `c` varchar(30)
-) */;
+) ENGINE=MyISAM */;
 /*!50001 DROP TABLE `v1`*/;
 /*!50001 DROP VIEW IF EXISTS `v1`*/;
 /*!50001 CREATE ALGORITHM=UNDEFINED */
@@ -2860,21 +2860,21 @@ DROP TABLE IF EXISTS `v0`;
   `a` int(11),
   `b` varchar(32),
   `c` varchar(32)
-) */;
+) ENGINE=MyISAM */;
 DROP TABLE IF EXISTS `v1`;
 /*!50001 DROP VIEW IF EXISTS `v1`*/;
 /*!50001 CREATE TABLE `v1` (
   `a` int(11),
   `b` varchar(32),
   `c` varchar(32)
-) */;
+) ENGINE=MyISAM */;
 DROP TABLE IF EXISTS `v2`;
 /*!50001 DROP VIEW IF EXISTS `v2`*/;
 /*!50001 CREATE TABLE `v2` (
   `a` int(11),
   `b` varchar(32),
   `c` varchar(32)
-) */;
+) ENGINE=MyISAM */;
 
 USE `test`;
 /*!50001 DROP TABLE `v0`*/;
@@ -3198,7 +3198,7 @@ DROP TABLE IF EXISTS `v1`;
 /*!50001 DROP VIEW IF EXISTS `v1`*/;
 /*!50001 CREATE TABLE `v1` (
   `id` int(11)
-) */;
+) ENGINE=MyISAM */;
 
 USE `mysqldump_test_db`;
 /*!50001 DROP TABLE `v1`*/;
@@ -3246,7 +3246,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/
 USE `mysqldump_views`;
 /*!50001 CREATE TABLE `nasishnasifu` (
   `id` bigint(20) unsigned
-) */;
+) ENGINE=MyISAM */;
 
 USE `mysqldump_tables`;
 

Thread
bzr commit into mysql-5.0 branch (azundris:2685) Bug#31434Tatiana A. Nurnberg11 Sep