php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74967 mysqli.reconnect = 1: MYSQLI_OPT_INT_AND_FLOAT_NATIVE lost
Submitted: 2017-07-22 02:57 UTC Modified: -
From: spam2 at rhsoft dot net Assigned:
Status: Open Package: MySQLi related
PHP Version: 7.0.21 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-07-22 02:57 UTC] spam2 at rhsoft dot net
Description:
------------
if you are using persistent connections (p:hostname) and after some idle time mysqld has closed the connection you lose the MYSQLI_OPT_INT_AND_FLOAT_NATIVE setting due the automatic reconnect

when the application is written with declare(strict_types=1); and used mysqli_options($conn, MYSQLI_OPT_INT_AND_FLOAT_NATIVE, true) any typesafe comparison based on database rows then fails

this is really serious and make persistent connections dangerous to useless

noticed this recently after a benchmark worked fine with 9000 requests/second and later random requests depending if the application chosed the readonly-slave or the master things started to break


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC