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:
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: spam2 at rhsoft dot net
New email:
PHP Version: OS:

 

 [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: Tue Aug 29 15:01:52 2017 UTC