|
From: Nicolas Morey-C. <de...@mo...> - 2008-12-29 17:42:37
|
Hello everyone, I am using libdbi for one of my application. It was working perfectly fine with Postgre but I had some troubles with MySQL. After looking a bit around, i found out I had to install the last libdbi drivers to be able to use multiple statements with MySQL. I checked the sources and libdbi-drivers-0.8.3-1 takes the mysql multi statement option and pass it to MySQL when connecting. The problem is when you are doing a multi statement query, mysql is generating multiple results. Even if you do a couple of INSERT. As long as all these results have not been read, MySQL will return a 2014 (out of sync) error to any query. I've quickly patch the driver so it'll eat all the results and return the first one. It will manage the case where statements are INSERT or UPDATES but some data will be lost when several SELECT are done in a single query. I've tested it and it solves my problem. I guess a more generic solution should be developped but I really don't have time for this right now. Regards Nicolas Morey-Chaisemartin |