]>
Commit | Line | Data |
---|---|---|
f8653cce | 1 | From: Chad MILLERDate: February 1 2008 5:53pm |
2 | Subject: bk commit into 5.0 tree (cmiller:1.2572) BUG#34192 | |
3 | ||
4 | Below is the list of changes that have just been committed into a local | |
5 | 5.0 repository of cmiller. When cmiller does a push these changes | |
6 | will be propagated to the main repository and, within 24 hours after the | |
7 | push, to the public repository. | |
8 | For information on how to access the public repository | |
9 | see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html | |
10 | ||
11 | ChangeSet@stripped, 2008-02-01 11:53:48-05:00, cmiller@stripped +1 -0 | |
12 | Bug#34192: mysqldump from mysql 5.0.51 silently fails on dumping \ | |
13 | databases from 4.0 server | |
14 | ||
15 | Contribution from Arkadiusz Miskiewicz. No CLA required for this size. | |
16 | ||
17 | mysqldump treated a failure to set the results charset as a severe | |
18 | error. | |
19 | ||
20 | Now, don't try to set the charset for the SHOW CREATE TABLE statement, | |
21 | if the dumper doesn't want SET NAMES or the remote server doesn't | |
22 | support changing charsets. | |
23 | ||
24 | (The original patch tried to set the charset to binary and back in | |
25 | any case, and only exited-with-failure if the dumper wanted it and | |
26 | the remote server supported it.) | |
27 | ||
28 | client/mysqldump.c@stripped, 2008-02-01 11:53:46-05:00, cmiller@stripped +13 -3 | |
29 | Don't set the charset for receiving results if it's not wanted or if | |
30 | the server doesn't support it. | |
31 | ||
32 | diff -Nrup a/client/mysqldump.c b/client/mysqldump.c | |
33 | --- a/client/mysqldump.c 2007-12-04 22:07:00 -05:00 | |
34 | +++ b/client/mysqldump.c 2008-02-01 11:53:46 -05:00 | |
35 | @@ -1705,10 +1705,20 @@ static uint get_table_structure(char *ta | |
36 | ||
37 | my_snprintf(buff, sizeof(buff), "show create table %s", result_table); | |
38 | ||
39 | - if (switch_character_set_results(mysql, "binary") || | |
40 | - mysql_query_with_error_report(mysql, &result, buff) || | |
41 | - switch_character_set_results(mysql, default_charset)) | |
42 | + if (opt_set_charset) /* Was forced to false if server is too old. */ | |
43 | + { | |
44 | + if (switch_character_set_results(mysql, "binary") != 0) | |
45 | + DBUG_RETURN(0); | |
46 | + } | |
47 | + | |
48 | + if (mysql_query_with_error_report(mysql, &result, buff) != 0) | |
49 | DBUG_RETURN(0); | |
50 | + | |
51 | + if (opt_set_charset) /* Was forced to false if server is too old. */ | |
52 | + { | |
53 | + if (switch_character_set_results(mysql, default_charset) != 0) | |
54 | + DBUG_RETURN(0); | |
55 | + } | |
56 | ||
57 | if (path) | |
58 | { |