You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-07 02:42:49 +03:00
Merge branch '3.1' into 3.3
This commit is contained in:
@@ -1562,7 +1562,6 @@ MYSQL *mthd_my_real_connect(MYSQL *mysql, const char *host, const char *user,
|
||||
MA_PVIO_CINFO cinfo= {NULL, NULL, 0, -1, NULL};
|
||||
MARIADB_PVIO *pvio= NULL;
|
||||
char *scramble_data;
|
||||
my_bool is_maria= 0;
|
||||
const char *scramble_plugin;
|
||||
uint pkt_length, scramble_len, pkt_scramble_len= 0;
|
||||
NET *net= &mysql->net;
|
||||
@@ -1843,7 +1842,6 @@ restart:
|
||||
if (strncmp(end, MA_RPL_VERSION_HACK, sizeof(MA_RPL_VERSION_HACK) - 1) == 0)
|
||||
{
|
||||
mysql->server_version= strdup(end + sizeof(MA_RPL_VERSION_HACK) - 1);
|
||||
is_maria= 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1852,7 +1850,6 @@ restart:
|
||||
SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
|
||||
goto error;
|
||||
}
|
||||
is_maria= mariadb_connection(mysql);
|
||||
}
|
||||
end+= strlen(end) + 1;
|
||||
|
||||
@@ -1883,7 +1880,7 @@ restart:
|
||||
pkt_scramble_len= uint1korr(end + 7);
|
||||
|
||||
/* check if MariaD2B specific capabilities are available */
|
||||
if (is_maria && !(mysql->server_capabilities & CLIENT_MYSQL))
|
||||
if (mariadb_connection(mysql) && !(mysql->server_capabilities & CLIENT_MYSQL))
|
||||
{
|
||||
mysql->extension->mariadb_server_capabilities= (ulonglong) uint4korr(end + 14);
|
||||
}
|
||||
@@ -2110,7 +2107,7 @@ my_bool STDCALL mariadb_reconnect(MYSQL *mysql)
|
||||
if (stmt->state != MYSQL_STMT_INITTED)
|
||||
{
|
||||
stmt->state= MYSQL_STMT_INITTED;
|
||||
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
|
||||
stmt_set_error(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2147,7 +2144,7 @@ void ma_invalidate_stmts(MYSQL *mysql, const char *function_name)
|
||||
{
|
||||
MYSQL_STMT *stmt= (MYSQL_STMT *)li_stmt->data;
|
||||
stmt->mysql= NULL;
|
||||
SET_CLIENT_STMT_ERROR(stmt, CR_STMT_CLOSED, SQLSTATE_UNKNOWN, 0, function_name);
|
||||
stmt_set_error(stmt, CR_STMT_CLOSED, SQLSTATE_UNKNOWN, 0, function_name);
|
||||
}
|
||||
mysql->stmts= NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user