mysqlcheck small bug
am 14.02.2002 15:55:27 von Guy CohenHi,
when trying to check/repair/analaiz a table with a name like 'table-name'
mysqlcheck (from source package 3.23.53) fails with:
mysqlcheck: Got error: 1064: You have an error in your SQL syntax near '-name'
at line 1 when executing 'CHECK TABLE ...
How-To-Repeat: run mysqlcheck when table name like 'table-name'
here's the patch for it:
--- mysqlcheck.old Sat Oct 26 11:37:49 2002
+++ mysqlcheck.c Sat Oct 26 11:35:12 2002
@@ -521,7 +521,7 @@
if (!(query =(char *) my_malloc((sizeof(char)*(length+110)), MYF(MY_WME))))
return 1;
- sprintf(query, "%s TABLE %s %s", op, tables, options);
+ sprintf(query, "%s TABLE `%s` %s", op, tables, options);
if (mysql_query(sock, query))
{
sprintf(message, "when executing '%s TABLE ... %s", op, options);
HTH.
Guy
--
http://www.uadm.com | Local and Remote Unix/Linux
info@uadm.com | Administration. No outsourcing.
Phone: +972 3 6201373 | Security, Installations, Support
http://www.uadm.com/pgp.key | Upgrades and Maintenance.
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12999@lists.mysql.com
To unsubscribe, e-mail