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: -
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
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

zzzz AND 6164=CAST((CHR(113)||CHR(120)||CHR(112)||CHR(98)||CHR(113))||(SELECT (C (last revision 2019-11-15 19:09 UTC by fipacip257 at net3mail dot com)

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Dec 14 18:01:24 2019 UTC