Re: [PHP-DEV] MYSQL_OPT_RECONNECT

2012-07-09 Thread Johannes Schlüter
On Mon, 2012-07-09 at 16:49 +0400, Alexey Zakhlestin wrote: > On 09.07.2012, at 14:17, Johannes Schlüter wrote: > > > an example like this: > > > >$pdo = new PDO("mysql:..."); > >$select = $pdo->prepare("SELECT * FROM t WHERE id = ?"); > >/* do something ... connection break in betwee

Re: [PHP-DEV] MYSQL_OPT_RECONNECT

2012-07-09 Thread Alexey Zakhlestin
On 09.07.2012, at 14:17, Johannes Schlüter wrote: > an example like this: > >$pdo = new PDO("mysql:..."); >$select = $pdo->prepare("SELECT * FROM t WHERE id = ?"); >/* do something ... connection break in between */ >$delete = $pdo->prepare("DELETE FROM t WHERE id = ?"); >$se

Re: [PHP-DEV] MYSQL_OPT_RECONNECT

2012-07-09 Thread Johannes Schlüter
On Sat, 2012-07-07 at 08:20 -0700, Rasmus Lerdorf wrote: > So, because of these bugs when MySQL turned off auto-reconnects in 5.0.3 > everyone has been running with them off despite pdo_mysql's intent to > turn them back on. Fixing these bugs now to make the code do what it was > intended to do wou

[PHP-DEV] MYSQL_OPT_RECONNECT

2012-07-07 Thread Rasmus Lerdorf
I spent a bit of time looking at a mismatch between pdo_mysql and MYSQL_OPT_RECONNECT. There is some rather odd code in pdo_mysql/mysql_driver.c: http://lxr.php.net/xref/PHP_5_4/ext/pdo_mysql/mysql_driver.c#640 There are two main problems here 1. This code is inside an if(driver_options) conditi