diff options
author | Tatiana A. Nurnberg <azundris@mysql.com> | 2008-09-11 08:14:19 +0200 |
---|---|---|
committer | Tatiana A. Nurnberg <azundris@mysql.com> | 2008-09-11 08:14:19 +0200 |
commit | d49ee1933f46019197fa256a3f68cdea43472421 (patch) | |
tree | e5dfa680b5af0b0131e112aa26abf21dccf16841 /mysql-test/r/mysqldump-max.result | |
parent | 70e2f814a775c11b6cd453d5f26dd3114c7e6b6f (diff) | |
parent | 6e162ea9eb01a5e0509ab2b6a6dba31d8f4ba903 (diff) | |
download | mariadb-git-d49ee1933f46019197fa256a3f68cdea43472421.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-max.result:
add test results for 31434
mysql-test/r/mysqldump.result:
mysqldump sets engine-type (MyISAM) for stand-in tables
for views now. Update test results.
mysql-test/t/mysqldump-max.test:
Show that mysqldump's stand-in tables for views explicitly
set engine-type to MyISAM to avoid falling back on an engine
that might support fewer columns than the final view requires
(here's lookin' at you, inno). Also show that this actually
has the desired effect by dumping and reloading a view that
has more columns than inno supports.
Diffstat (limited to 'mysql-test/r/mysqldump-max.result')
-rw-r--r-- | mysql-test/r/mysqldump-max.result | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/mysqldump-max.result b/mysql-test/r/mysqldump-max.result index 2d118092a2c..c1c61cd7fe8 100644 --- a/mysql-test/r/mysqldump-max.result +++ b/mysql-test/r/mysqldump-max.result @@ -277,3 +277,16 @@ drop table t3; drop table t4; drop table t5; drop table t6; +SELECT @@global.storage_engine INTO @old_engine; +SET GLOBAL storage_engine=InnoDB; +CREATE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES(); +SELECT COUNT(*) FROM v1; +COUNT(*) +1 +SELECT COUNT(*) FROM v1; +COUNT(*) +1 +DROP VIEW v1; +DROP TABLE t1; +SET GLOBAL storage_engine=@old_engine; |