Bug #16347 | Backup fails can't set ansi quotes | ||
---|---|---|---|
Submitted: | 10 Jan 2006 18:18 | Modified: | 10 May 2006 20:34 |
Reporter: | Don Weaver | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Administrator | Severity: | S2 (Serious) |
Version: | 1.1.5 | OS: | Linux (Fedora Core 4) |
Assigned to: | Alfredo Kojima | CPU Architecture: | Any |
[10 Jan 2006 18:18]
Don Weaver
[11 Jan 2006 0:33]
MySQL Verification Team
Thank you for the bug report.
[14 Jan 2006 23:13]
TK Buisan
This issue also occurs w/ MySQL Admin v.1.1.6. OS=FC4.
[17 Jan 2006 14:08]
Wesley Hampton
This also happens with the SuSE 9.3 RPM on SuSE 10.0
[18 Jan 2006 18:37]
Remi Collet
Bug is caused by a bad usage of gsprintf fonction in myx_backup.c (same input / output buffer) I've write a patch witch solves the problem. It's applied on the new version released by Fedora Extras projet. Here is : --- mysql-administrator/library/source/myx_backup.c.orig 2005-10-25 23:08:07.000000000 +0200 +++ mysql-administrator/library/source/myx_backup.c 2005-12-17 16:13:37.000000000 +0100 @@ -771,15 +772,15 @@ int mode_entry_count = 0; if (status->options & MYX_B_ANSI_QUOTES) { + strcat(sql_mode_cmd, "ANSI_QUOTES"); mode_entry_count++; - g_sprintf(sql_mode_cmd, "%sANSI_QUOTES", sql_mode_cmd); }; if (status->options & MYX_B_COMPATIBILITY_MODE) { - g_sprintf(sql_mode_cmd, "%s%sMYSQL323", sql_mode_cmd, (mode_entry_count > 0) ? "," : ""); + strcat(sql_mode_cmd, (mode_entry_count > 0 ? ",MYSQL323" : "MYSQL323")); mode_entry_count++; }; - g_sprintf(sql_mode_cmd, "%s' */", sql_mode_cmd); + strcat(sql_mode_cmd, "' */"); if (write_sql_file_header(status, error)) return -1; @@ -2448,10 +2450,10 @@ SAFE_IO(fprintf(status->sql_file, "/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n")); if (status->options & MYX_B_ANSI_QUOTES) - g_sprintf(Buffer, "%s,ANSI_QUOTES", Buffer); + strcat(Buffer, ",ANSI_QUOTES"); if (status->options & MYX_B_COMPATIBILITY_MODE) - g_sprintf(Buffer, "%s,MYSQL323", Buffer); - g_sprintf(Buffer, "%s' */;\n\n\n", Buffer); + strcat(Buffer, ",MYSQL323"); + strcat(Buffer, "' */;\n\n\n"); SAFE_IO(fprintf(status->sql_file, Buffer)); return 0;
[19 Jan 2006 14:17]
Don Weaver
Hi Remi Any idea when the patch will be ready ? I've tried 1.1.6-1 and the problem persists. thanks,
[19 Jan 2006 15:21]
Remi Collet
Which 1.1.6-1 have you tried ? The one from Mysql.com have the bug The one from the Extras (http://fedoraproject.org/wiki/Extras) have the patch (using the standard fedora mysql 4 libs) The one from my "little" depôt (http://remi.collet.free.fr/rpms or try pbone.net) also have the patch (using mysql 5 libs)
[19 Jan 2006 17:01]
Don Weaver
Hi Remi, I just uninstalled 1.1.6-1 from my system ( synaptic ) and reinstalled a fresh download of 1.1.6-1 from mysql.com and the same error occurs.... cannot set ansi quotes. Thanks,
[19 Jan 2006 17:03]
Don Weaver
Oops... sorry my mistake..... I'll try the other. Thanks,
[19 Jan 2006 17:22]
Don Weaver
Hi Remi, No go... the rpm needs a dependency that's wants mysql 4 installed.... I'm running version 5 and need the stored procedures. libmysqlclient_r.so.14 Thanks,
[19 Jan 2006 18:18]
Remi Collet
As i wrote, the RPM from the Extras use le mysql 4libs (libmysqlclient_r.so.14). You can use it with the mysqlclient14 (from my depot) or directly use my RPM witch use le mysql 5 libs (libmysqlclient_r.so.15).
[19 Jan 2006 20:32]
Don Weaver
Ok.... Totally lost here.... Yes I jumped ahead of game instead of completely reading your comment. I'm running mysql 5 so I went to the suggested website ( The one from my "little" depôt (http://remi.collet.free.fr/rpms ) and another dependency failure happened. libmysqlclient_r.so.15 Where can I find this ?
[20 Jan 2006 6:49]
Remi Collet
If you use the RPM from MySQL.com, the .so is in the MySQL-shared RPM If you user the RPM from Fedora (Core, Extras or my repo), the .so is in the mysql RPM. RPM use by the fedora project are very different then ones from mysql.com (names, directory, compiler use...). I think that you should only use one source.
[20 Jan 2006 13:22]
Don Weaver
Thanks Remi, I went to the MySQL site and downloaded MySQL-shared-standard-5.0.17-1.rhel4.i386.rpm and installed it before attempting your patched administrator and all is well. Backup works ! Thanks for the help,
[28 Mar 2006 9:01]
Oliver Field
Hi, I'm using SUSE 10.0 and am getting this error in 1.1.6, Can someone advise where this fix is.
[2 May 2006 23:09]
Alfredo Kojima
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html
[10 May 2006 20:34]
Don Weaver
Appears to work now.... thanks,