List:MySQL++« Previous MessageNext Message »
From:Jim Graf Date:June 29 2010 2:35am
Subject:Re: Strange query problem
View as plain text  
On Mon, Jun 28, 2010 at 5:15 PM, Adrian Cornish <mysql@stripped>wrote:

> Opps forgot to forward to list too
>
> ---------- Forwarded message ----------
> From: Adrian Cornish <mysql@stripped>
> Date: 28 June 2010 18:12
> Subject: Re: Strange query problem
> To: Алексей Болгов <bolgov.ak@stripped>
>
>
> On 28 June 2010 15:41, Алексей Болгов <bolgov.ak@stripped>
> wrote:
>
> > Hello. Have a strange problem with query. Hope you'll help.
> > If i try to use  this query
> >
> > UPDATE `Graphs`.`Test` SET `Index` =  '1', `Period` = '1' WHERE
> > `Test`.`Name` = 'Graph 3, order 9'
> >
> > it works fine.
> >
> > And when I'm using this query
> >
> > UPDATE `Graphs`.`Test` SET `Index` =  '1', `Period` = '1' WHERE
> > `Test`.`Name` = 'Graph 3, order 9';
> > UPDATE `Graphs`.`Test` SET `Index` =  '2', `Period` = '1' WHERE
> > `Test`.`Name` = 'Graph 4, order 9';
> > UPDATE `Graphs`.`Test` SET `Index` =  '1', `Period` = '1' WHERE
> > `Test`.`Name` = 'Graph 5, order 9';
> >
> > I'm getting the error:
> >
> > You have an error in your SQL syntax; ... etc
> >
> > But in PHPMyAdmin this query works! Maybe it is due to the delimiters?
> >
>
> What you need is to set multi statement option before login
>
>  mysqlpp::Connection conn;
> conn.set_option(new mysqlpp::MultiStatementsOption(true));
> conn.connect(... blah blah blah...)
>

I run enough stored procedures that I just always set this option. Is there
some performance issue with doing that, in the rare instances I don't access
a stored procedure?

Just curious, I've never noticed any issues.

-jim

Thread
Fwd: Strange query problemAdrian Cornish29 Jun
  • Re: Strange query problemJim Graf29 Jun
    • Re: Strange query problemWarren Young29 Jun