Skip to content

MySQL persistent connection never working if mysqli.max_persistent=-1 (default value) #6734

@nilwave

Description

@nilwave

From hphp/runtime/ext/mysql/mysql_common.cpp:

if (MySQL::IsAllowPersistent() &&
628 MySQL::GetCurrentNumPersistent() < MySQL::GetMaxNumPersistent() &&
629 persistent) {
630 auto p_mySQL = MySQL::GetPersistent(host, port, socket, username,
631 password, client_flags);

MySQL::GetMaxNumPersistent() = -1 (default value) -> if never passing, I suggest

if (persistent && (MySQL::IsAllowPersistent() && (MySQL::GetMaxNumPersistent() == -1 || (MySQL::GetCurrentNumPersistent() < MySQL::GetMaxNumPersistent() ))))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions