1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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.

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.
This commit is contained in:
Tatiana A. Nurnberg
2008-09-11 07:46:43 +02:00
parent 776793a97c
commit 6e162ea9eb
2 changed files with 18 additions and 12 deletions

View File

@ -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);
}
}