All counters are now updated in routeQuery
Fix to bug #545, http://bugs.skysql.com/show_bug.cgi?id=545
All sql variable and session modification statements, such as autocommit-, and set <db> commands are routed to all nodes.
This commit is contained in:
VilhoRaatikka
2014-09-15 19:01:04 +03:00
parent 5343e77372
commit a41a8d6060
2 changed files with 26 additions and 17 deletions

View File

@ -454,7 +454,7 @@ static skygw_query_type_t resolve_query_type(
/** SELECT ..INTO variable|OUTFILE|DUMPFILE */
if (lex->result != NULL) {
type = QUERY_TYPE_SESSION_WRITE;
type = QUERY_TYPE_GSYSVAR_WRITE;
goto return_qtype;
}
@ -543,7 +543,7 @@ static skygw_query_type_t resolve_query_type(
else if (lex->sql_command == SQLCOM_SET_OPTION)
{
/** Either user- or system variable write */
type |= QUERY_TYPE_SESSION_WRITE;
type |= QUERY_TYPE_GSYSVAR_WRITE;
}
goto return_qtype;
}
@ -759,7 +759,12 @@ static skygw_query_type_t resolve_query_type(
break;
/** User-defined variable modification */
case Item_func::SUSERVAR_FUNC:
func_qtype |= QUERY_TYPE_SESSION_WRITE;
/**
* Really it is user variable but we
* don't separate sql variables atm.
* 15.9.14
*/
func_qtype |= QUERY_TYPE_GSYSVAR_WRITE;
LOGIF(LD, (skygw_log_write(
LOGFILE_DEBUG,
"%lu [resolve_query_type] "