diff --git a/product/ZMySQLDA/db.py b/product/ZMySQLDA/db.py
index f9ac6aaa717aa51377f139c5443fde6b38d10034..af9dc0f94cb7b5eda7e24f3f3bcebb050d6c4e56 100644
--- a/product/ZMySQLDA/db.py
+++ b/product/ZMySQLDA/db.py
@@ -378,6 +378,8 @@ class DB(TM):
         try:
             self.db.query(query)
         except OperationalError, m:
+            if m[0] == 1054: # Query syntax error
+              raise OperationalError(m[0], '%s: %s' % (m[1], query))
             if ((not force_reconnect) and \
                 (self._mysql_lock or self._transactions)) or \
                m[0] not in hosed_connection:
diff --git a/product/ZMySQLDDA/db.py b/product/ZMySQLDDA/db.py
index 8d666378ac70af2ef32f818193141a314d9c1709..23f9cf6106da468de7ab1f9e329fd92068269758 100644
--- a/product/ZMySQLDDA/db.py
+++ b/product/ZMySQLDDA/db.py
@@ -383,6 +383,8 @@ class DeferredDB(TM):
       try:
         self.db.query(query)
       except OperationalError, m:
+        if m[0] == 1054: # Query syntax error: display query.
+          raise OperationalError(m[0], '%s: %s' % (m[1], query))
         if ((not force_reconnect) and \
             (self._mysql_lock or self._transactions)) or \
            m[0] not in hosed_connection: