dbTalk Databases Forums  

"quote" manipulator misbehaves

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss "quote" manipulator misbehaves in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Maverick
 
Posts: n/a

Default "quote" manipulator misbehaves - 11-13-2006 , 02:40 PM






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.

Sincerely,
Mav

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
  #2  
Old   
Warren Young
 
Posts: n/a

Default Re: "quote" manipulator misbehaves - 11-27-2006 , 08:15 PM






Maverick wrote:
Quote:
I think there's a bug with manipulators for Query.
Yes, and it's a known bug. I described it here, back in April:

http://lists.mysql.com/plusplus/5617

A fix request is already on the Wishlist, but it can't be done before
v3.0, because almost every MySQL++ program will probably have to be
rebuilt to work with the change.

I'm sorry for the delay in getting back to you on this, but I forgot
about the bug and so I've been chasing it again in my spare time these
past few weeks. I happened to come across my old message in a Google
search while trying to fix the problem. Sigh.

In the meantime, I suggest that you just wrap your C strings with C++
strings.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.