MXS-1475 Address review issues

- Clean up session header.
- Add test case
This commit is contained in:
Johan Wikman
2018-03-02 03:58:16 +02:00
parent 23b8939e20
commit 805e3578a2
2 changed files with 8 additions and 4 deletions

View File

@ -154,6 +154,8 @@ typedef struct session_variable
} SESSION_VARIABLE;
typedef std::tr1::unordered_map<std::string, SESSION_VARIABLE> SessionVarsByName;
#else
typedef void SessionVarsByName;
#endif
/**
@ -190,11 +192,7 @@ typedef struct session
const struct server *target; /**< Where the statement was sent */
} stmt; /**< Current statement being executed */
bool qualifies_for_pooling; /**< Whether this session qualifies for the connection pool */
#ifdef __cplusplus
SessionVarsByName* variables; /*< @maxscale variables associated with this session */
#else
void* variables;
#endif
skygw_chk_t ses_chk_tail;
} MXS_SESSION;

View File

@ -218,6 +218,12 @@ struct TEST_CASE
"@MAXSCALE.CACHE.ENABLED",
"TRUE"
},
{
"SET @MAXSCALE.CACHE.ENABLED = TRUE, @maxscale.cache.enabled = FALSE",
P::IS_SET_MAXSCALE,
"@maxscale.cache.enabled",
"FALSE"
},
};
const int N_TEST_CASES = sizeof(test_cases) / sizeof(test_cases[0]);