← Back to team overview

linux-traipu team mailing list archive

[Bug 1012288] [NEW] drizzledump dies with dashes in table names

 

Public bug reported:

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("`");

** Affects: drizzle
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of UBUNTU -
AL - BR, which is subscribed to Drizzle.
https://bugs.launchpad.net/bugs/1012288

Title:
  drizzledump dies with dashes in table names

Status in A Lightweight SQL Database for Cloud Infrastructure and Web Applications:
  New

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("`");

To manage notifications about this bug go to:
https://bugs.launchpad.net/drizzle/+bug/1012288/+subscriptions


Follow ups

References