List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:May 19 2011 2:26am
Subject:Re: SOLVED: SSQLS with BINARY column is only escaped when defined
as "NOT NULL"
View as plain text  
On 5/17/2011 2:38 PM, Kemet wrote:
> So I entered the bug forest as you suggested.

Welcome back! :)

> But in the quote_q() function, it uses
> base_type().c_type() instead of plain c_type() as in the escape_q().

So you're saying the fix is this:

Index: lib/type_info.cpp
===================================================================
--- lib/type_info.cpp   (revision 2689)
+++ lib/type_info.cpp   (working copy)
@@ -252,7 +252,7 @@

  bool mysql_type_info::escape_q() const
  {
-       const type_info& ti = c_type();
+       const type_info& ti = base_type().c_type();
         return ti == typeid(string) ||
                         ti == typeid(sql_enum) ||
                         ti == typeid(sql_blob) ||


It seems sane and doesn't break the test suite.  I'll check it in later 
if there are no complaints.
Thread
SSQLS with BINARY column is sometimes not escapedKemet5 May
  • Re: SSQLS with BINARY column is sometimes not escapedWarren Young6 May
    • Re: SSQLS with BINARY column is sometimes not escapedKemet6 May
    • Re: SSQLS with BINARY column is sometimes not escapedKemet8 May
      • Re: SSQLS with BINARY column is sometimes not escapedWarren Young8 May
        • SOLVED: SSQLS with BINARY column is only escaped when defined as "NOT NULL"Kemet19 May
          • Re: SOLVED: SSQLS with BINARY column is only escaped when definedas "NOT NULL"Warren Young19 May