|  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: -
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
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.
Block user comment
Status: Assign to:
Bug Type:
From: spam2 at rhsoft dot net
New email:
PHP Version: OS:


 [2017-07-22 02:57 UTC] spam2 at rhsoft dot net
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


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-2020 The PHP Group
All rights reserved.
Last updated: Mon Oct 19 21:01:24 2020 UTC