* Alexander Nozdrin <alik@stripped> [07/07/27 03:33]:
OK to push.
> ChangeSet@stripped, 2007-07-27 03:19:03+04:00, anozdrin@ibm. +3 -0
> Fix for BUG#30027: mysqldump does not dump views properly.
>
> The problem was that mysqldump generated incorrect dump for
> a view with non-ASCII column name if the mysqldump's character
> set was ASCII.
Please clarify what part of the dump was incorrect.
>
> The fix is to:
> 1. Switch character_set_client for the mysqldump's connection
> to binary before issuing SHOW FIELDS statement in order
> to avoid conversion.
>
> 2. Dump switch character_set_client statements to UTF8 and back
> for CREATE TABLE statement.
Yes, the CREATE TABLE statement that is issued to create temporary
table that works as a temporary placeholder for a view that still
doesn't exist. This temporary table is created by the dump to resolve
cross-view dependencies when creating views and dropped when the
view is created (please add this clarification to the comment).
>
> + /*
> + We have already dropped any table of the same name
> + above, so here we just drop the view.
> + */
Since you're changing these lines, please re-format the comment
/*
We ...
*/
> + /*
> + Get first row, following loop will prepend comma - keeps
> + from having to know if the row being printed is last to
> + determine if there should be a _trailing_ comma.
> + */
Same here,
/*
Get ...
*/
--
-- Konstantin Osipov Software Developer, Moscow, Russia
-- MySQL AB, www.mysql.com The best DATABASE COMPANY in the GALAXY