Fix for bug #418

Increased skygw_query_type_t to 16 bits, and corrected the way how those bit fields are checked.
Added tests for cases where autocommit is disabled and corrected old tests.
This commit is contained in:
VilhoRaatikka
2014-04-10 17:09:42 +03:00
parent 2c17dc3edf
commit bbf1bc2afa
14 changed files with 84 additions and 66 deletions

View File

@ -355,9 +355,9 @@ return_here:
* restrictive, for example, QUERY_TYPE_READ is smaller than QUERY_TYPE_WRITE.
*
*/
static u_int8_t set_query_type(
u_int8_t* qtype,
u_int8_t new_type)
static u_int16_t set_query_type(
u_int16_t* qtype,
u_int16_t new_type)
{
*qtype = MAX(*qtype, new_type);
return *qtype;
@ -383,7 +383,7 @@ static skygw_query_type_t resolve_query_type(
THD* thd)
{
skygw_query_type_t qtype = QUERY_TYPE_UNKNOWN;
u_int8_t type = QUERY_TYPE_UNKNOWN;
u_int16_t type = QUERY_TYPE_UNKNOWN;
bool is_set_autocommit = false;;
LEX* lex;
Item* item;