List:MySQL++« Previous MessageNext Message »
From:Maverick Date:November 13 2006 8:39pm
Subject:"quote" manipulator misbehaves
View as plain text  
I think there's a bug with manipulators for Query.
I tried to run the following example (compiled with mingw 
g++ 3.4.5):

mysqlpp::Query query (&con);
query << "INSERT INTO foo (title) VALUES(" << 
mysqlpp::quote << "Abra'Cadabra";
query.execute ();

As the result, the manipulator is ignored and the 
parameter is passed as is and an exception is thrown. But 
if I pass the c-string (Abra'Cadabra) as a c++ string 
object string("Abra'Cadabra") the manipulator works as 
it's supposed to.

I assume this is a bug, isn't it?
I would appreciate any help.

"quote" manipulator misbehavesMaverick13 Nov
  • Re: "quote" manipulator misbehavesWarren Young28 Nov