Fixed two bugs of which one was older.

1. in query_classifier.cc autocommit_enabled, and transaction_active variables maintained their values across different sessions. Now those values are stored in each router_client_ses object.
2. As a part of implementation of MAX-95 session variables were added to BACKEND struct which is shared with all sessions using the SERVICE which the particular BACKEND serves. Now each router_client_ses object has a backend reference struct which includes pointer to BACKEND, DCB and to session command cursor.

Added test - set_autocommit_disabled.sql, test_after_autocommit_disabled.sql - to check that session variable is discarded when session where it belongs terminates.
This commit is contained in:
VilhoRaatikka
2014-04-28 23:33:49 +03:00
parent 28bc3509cc
commit c927057b5c
10 changed files with 505 additions and 320 deletions

View File

@ -121,7 +121,8 @@ typedef enum skygw_chk_t {
CHK_NUM_MY_SESCMD,
CHK_NUM_ROUTER_PROPERTY,
CHK_NUM_SESCMD_CUR,
CHK_NUM_BACKEND
CHK_NUM_BACKEND,
CHK_NUM_BACKEND_REF
} skygw_chk_t;
# define STRBOOL(b) ((b) ? "true" : "false")
@ -459,7 +460,14 @@ typedef enum skygw_chk_t {
(b)->be_chk_tail == CHK_NUM_BACKEND, \
"BACKEND has invalid check fields"); \
}
#define CHK_BACKEND_REF(r) { \
ss_info_dassert((r)->bref_chk_top == CHK_NUM_BACKEND_REF && \
(r)->bref_chk_tail == CHK_NUM_BACKEND_REF, \
"Backend reference has invalid check fields"); \
}
#if defined(SS_DEBUG)
bool conn_open[10240];
#endif