You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-01 06:27:04 +03:00
mariadb_reconnect: reconnection may fail to allocate extensions
If this the case, tmp_mysql.extensions will be a null pointer and the rest of the reconnection cannot continue.
This commit is contained in:
@ -2111,7 +2111,14 @@ my_bool STDCALL mariadb_reconnect(MYSQL *mysql)
|
|||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_init(&tmp_mysql);
|
if (!mysql_init(&tmp_mysql))
|
||||||
|
{
|
||||||
|
/* extensions may have failed to allocate */
|
||||||
|
SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
|
||||||
|
tmp_mysql.free_me= 0;
|
||||||
|
mysql_close(&tmp_mysql);
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
tmp_mysql.free_me= 0;
|
tmp_mysql.free_me= 0;
|
||||||
tmp_mysql.options=mysql->options;
|
tmp_mysql.options=mysql->options;
|
||||||
if (mysql->extension->conn_hdlr)
|
if (mysql->extension->conn_hdlr)
|
||||||
|
Reference in New Issue
Block a user