Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions ext/mysqli/mysqli_nonapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, bool is_real_connect, b
zend_long port = 0, flags = 0;
bool port_is_null = 1;
zend_string *hash_key = NULL;
bool new_connection = false;
zend_resource *le;
mysqli_plist_entry *plist = NULL;
bool self_alloced = 0;
Expand Down Expand Up @@ -173,7 +172,6 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, bool is_real_connect, b
if (!mysql_ping(mysql->mysql)) {
#endif
mysqlnd_restart_psession(mysql->mysql);
MyG(num_active_persistent)++;

/* clear error */
php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql));
Expand Down Expand Up @@ -221,7 +219,6 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, bool is_real_connect, b
if (!(mysql->mysql = mysqlnd_init(MYSQLND_CLIENT_NO_FLAG, persistent))) {
goto err;
}
new_connection = true;
}

if (ssl) {
Expand Down Expand Up @@ -281,7 +278,7 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, bool is_real_connect, b
mysqli_resource->status = MYSQLI_STATUS_VALID;

/* store persistent connection */
if (persistent && (new_connection || is_real_connect)) {
if (persistent) {
MyG(num_active_persistent)++;
}

Expand Down
Loading