List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:July 15 2011 11:18am
Subject:Re: update fails... any suggestions?
View as plain text  
On 7/14/2011 12:10 PM, Jay Sprenkle wrote:
> If you don't grant permission for update to the user used in the connection
> the library crashes instead of throwing an exception.

That's not what I see here, using examples/tquery4.  I created a user 
that only has SELECT permissions, and on running it, I get this:

> Query: update stock set num = 70 where num < 70
> Query error: UPDATE command denied to user 'jay'@'mongo' for table 'stock'

The second line is a caught exception.

If I get rid of the BadQuery catch clause, forcing it to use the more 
generic mysqlpp::Exception clause to be more like your case, it still 
works as expected.
Thread
update fails... any suggestions?Jay Sprenkle13 Jul
  • Re: update fails... any suggestions?Warren Young13 Jul
    • Re: update fails... any suggestions?Jay Sprenkle13 Jul
      • Re: update fails... any suggestions?Warren Young13 Jul
        • Re: update fails... any suggestions?Warren Young13 Jul
        • Re: update fails... any suggestions?Jay Sprenkle13 Jul
          • Re: update fails... any suggestions?Kemet14 Jul
            • Re: update fails... any suggestions?Warren Young14 Jul
              • Re: update fails... any suggestions?Jay Sprenkle14 Jul
                • Re: update fails... any suggestions?Jay Sprenkle14 Jul
                  • Re: update fails... any suggestions?Jay Sprenkle14 Jul
                    • Re: update fails... any suggestions?Jay Sprenkle14 Jul
                      • Re: update fails... any suggestions?Warren Young15 Jul
                        • Re: update fails... any suggestions?Jay Sprenkle15 Jul