On 15 August 2013 11:00, Pawel Aleksander Fedorynski <[email protected]> wrote: > > Hi Ben, > > I'm on vacation now so I cannot test it, but from your description it seems > that MySQL starting with 5.5 stopped accepting > > truncate 'test_table' > > instead of > > truncate test_table > > since the variant with soci::use() escapes and quotes the string. I don't > see any way of fixing it since I can hardly stop quoting the all strings > passed to use(), and it would be very hard to parse the queries to decide > whether the string is a table name or something else. > > Thanks, > > Aleksander > > > On Wed, Aug 14, 2013 at 12:13 PM, Benedikt Greipl > <[email protected]> wrote: >> >> Hello Pawel, >> >> I have a question on soci. Sorry for contacting you directly, but I >> didn't find help elsewhere ... >> >> After an update to Ubuntu 13.04 and MySQL 5.5, when I do >> >> soci::session sql; >> string table = "test_table" >> sql << "truncate :table", soci::use(table); >> >> soci throws an error that the SQL-Syntax isn't correct. >> However, >> >> sql << "truncate " + table; >> >> works fine.
By the way, it would be good to add this case to the tests. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net "Participation in this whole process is a form of torture" ~~ Szalony, wspinanie.pl ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ soci-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/soci-users
