summaryrefslogtreecommitdiff
path: root/client/mysqldump.c
diff options
context:
space:
mode:
authorTatiana A. Nurnberg <azundris@mysql.com>2008-09-11 07:46:43 +0200
committerTatiana A. Nurnberg <azundris@mysql.com>2008-09-11 07:46:43 +0200
commit6e162ea9eb01a5e0509ab2b6a6dba31d8f4ba903 (patch)
tree5073969490ab0513436ae69516b883b6d18a0fa7 /client/mysqldump.c
parent776793a97c97c4e2b2c7a6a2870696c147eb235c (diff)
downloadmariadb-git-6e162ea9eb01a5e0509ab2b6a6dba31d8f4ba903.tar.gz
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. 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.
Diffstat (limited to 'client/mysqldump.c')
-rw-r--r--client/mysqldump.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 364e80ee56b..ced34f16212 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -1836,7 +1836,13 @@ static uint get_table_structure(char *table, char *db, char *table_type,
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);
}
}