mirror of
https://gitee.com/wangbin579/cetus.git
synced 2024-12-02 11:57:44 +08:00
Close MYSQL conn when meeting service unavailable
This commit is contained in:
parent
c6c131ed88
commit
164d4e1ceb
@ -2331,20 +2331,18 @@ process_service_unavailable(network_mysqld_con *con)
|
||||
con->state = ST_SEND_QUERY_RESULT;
|
||||
g_message("%s: service unavailable for con:%p", G_STRLOC, con);
|
||||
|
||||
if (con->is_auto_commit) {
|
||||
if (con->dist_tran) {
|
||||
if (con->orig_sql) {
|
||||
g_message("%s: global update/insert is not fullfiled for con:%p, sql:%s",
|
||||
G_STRLOC, con, con->orig_sql->str);
|
||||
} else {
|
||||
g_message("%s: global update/insert is not fullfiled for con:%p",
|
||||
G_STRLOC, con);
|
||||
}
|
||||
con->dist_tran = 0;
|
||||
con->server_to_be_closed = 1;
|
||||
if (con->dist_tran) {
|
||||
if (con->orig_sql) {
|
||||
g_message("%s: global update/insert is not fullfiled for con:%p, sql:%s",
|
||||
G_STRLOC, con, con->orig_sql->str);
|
||||
} else {
|
||||
g_message("%s: global update/insert is not fullfiled for con:%p",
|
||||
G_STRLOC, con);
|
||||
}
|
||||
}
|
||||
|
||||
con->server_to_be_closed = 1;
|
||||
con->dist_tran = 0;
|
||||
}
|
||||
#ifndef SIMPLE_PARSER
|
||||
if (con->servers != NULL) {
|
||||
g_debug("%s: server num :%d for con:%p", G_STRLOC, (int)con->servers->len, con);
|
||||
|
Loading…
Reference in New Issue
Block a user