Bug #993 Mysqlhot copy version 1.17 SQL Syntax errors
Submitted: 4 Aug 2003 14:16 Modified: 5 Aug 2003 3:14
Reporter: Dan Jeffries Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:3.23.57 OS:Linux (Redhat Linux 7.3)
Assigned to: Jani Tolonen CPU Architecture:Any

[4 Aug 2003 14:16] Dan Jeffries
Description:
The version of mysqlhotcopy distributed with Mysql version 3.23.57 contains a SQL syntax error when you try to do a simple backup with it.

I am using the latest DBI (1.3.7 = http://search.cpan.org/author/TIMB/DBI-1.37/) and the latest DBD::mysql (DBD-mysql-2.9002 = http://search.cpan.org/author/RUDY/DBD-mysql-2.9002/).

However, when I run the script to a do a backup with the following command: 
/usr/local/mysql/bin/mysqlhotcopy -u=root -p=FUBAR test /backup/mysql/daily >> /var/log/mysql-hotcopy.log 2>&1

I get the following error in my log:  DBD::mysql::db do failed: You have an error in your SQL syntax near '` READ, `mysql`.``db`` READ, `mysql`.``func`` READ, `mysql`.``host`` READ, `mysq' at line 1 at /usr/local/mysql/bin/mysqlhotcopy line 438

 

How to repeat:
Simply download the latest DBD::mysql from CPAN and DBI, install them on Redhat Linux 7.3 and try to run a backup of any database that you like.

Suggested fix:
As a workaround, people can download the latest production release of Mysql version 4 (http://www.mysql.com/downloads/mysql-4.0.html),untar it and copy over the latest version of mysqlhotcopy included with it, version 1.19, to their 3.23.57 binary directory. Cheers.
[5 Aug 2003 3:14] Sergei Golubchik
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/

this is incompatibility issue between different DBI versions.
A workaround was introduced in mysqlhotcopy 1.19 (shipped with MySQL 4.0.14)

It is probably not critical enough to go into 3.23 branch, and you can simply get updated mysqldump from MySQL 4.0.14.