]> git.pld-linux.org Git - packages/mysql.git/blame - mysql-bug-34192.patch
- not all chunks needed to patch
[packages/mysql.git] / mysql-bug-34192.patch
CommitLineData
8ff0eb5f
AM
1From: Chad MILLERDate: February 1 2008 5:53pm
2Subject: bk commit into 5.0 tree (cmiller:1.2572) BUG#34192
3
4Below is the list of changes that have just been committed into a local
55.0 repository of cmiller. When cmiller does a push these changes
6will be propagated to the main repository and, within 24 hours after the
7push, to the public repository.
8For information on how to access the public repository
9see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
10
11ChangeSet@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
32diff -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
e4c8dd0f
AM
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))
8ff0eb5f
AM
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+ }
e4c8dd0f 47+
8ff0eb5f
AM
48+ if (mysql_query_with_error_report(mysql, &result, buff) != 0)
49 DBUG_RETURN(0);
e4c8dd0f 50+
8ff0eb5f
AM
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+ }
e4c8dd0f
AM
56
57 if (path)
58 {
This page took 0.534164 seconds and 4 git commands to generate.