List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:May 6 2011 12:34pm
Subject:Re: SSQLS with BINARY column is sometimes not escaped
View as plain text  
On 5/5/2011 2:33 PM, Kemet wrote:
> am I doing something wrong ?

For one, a lot of people will have tl;dr'd on this post.

You'll get more and better answers if you can distill your problems 
better.  Ideally, you want to provide people a patch to one of the 
MySQL++ examples that demonstrates the problem, so they can just try it 
on their system and see what you're seeing.

> q.storein(vChain);

[snip]

> This call to GetBlockHeightFromHash with vChain[iChain].prevhash works
> incorrectly: it only gets quoted, NO ESCAPING is done :(

Why do you expect results from the database to be escaped in your 
program's view of the returned data?  I don't know what the MySQL IPC 
protocol looks like; there may be some escaping in it, but that's an 
implementation detail below even MySQL++.  By the time the returned data 
get transformed into SSQLSes, any such escaping is removed.

The only escaping you should be worrying about is that used to send data 
*to* the DBMS, and MySQL++ does some escaping for you already.
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