drizzledump dies with dashes in table names

Bug #1012288 reported by Matt Harrison
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Medium
Stewart Smith

Bug Description

When running drizzledump on a database with dashes in some of the tablenames it dies with.

-- Retrieving indexes for my-db-table...
Error executing query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-db-table' at line 1

This simple patch should do the trick

--- client/drizzledump_mysql.cc
+++ client/drizzledump_mysql.cc
@@ -269,8 +269,9 @@
   if (verbose)
     std::cerr << _("-- Retrieving indexes for ") << tableName << "..." << std::endl;

- query="SHOW INDEXES FROM ";
+ query="SHOW INDEXES FROM `";
   query.append(tableName);
+ query.append("`");

Related branches

Revision history for this message
Stewart Smith (stewart) wrote :

looks like a good fix

Changed in drizzle:
assignee: nobody → Stewart Smith (stewart)
status: New → Fix Committed
milestone: none → 7.2.5
importance: Undecided → Medium
Stewart Smith (stewart)
Changed in drizzle:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.