Merge branch 'develop' into MAX-324

Conflicts:
	server/core/modutil.c
This commit is contained in:
Markus Makela
2015-01-20 04:25:40 +02:00
133 changed files with 1119 additions and 4527 deletions

View File

@ -391,29 +391,6 @@ return_here:
return failp;
}
/**
* Set new query type if new is more restrictive than old.
*
* Parameters:
* @param qtype Existing type
*
* @param new_type New query type
*
* @return Query type as an unsigned int value which must be casted to qtype.
*
*
* @details The implementation relies on that enumerated values correspond
* to the restrictiviness of the value. That is, smaller value means less
* restrictive, for example, QUERY_TYPE_READ is smaller than QUERY_TYPE_WRITE.
*
*/
static u_int32_t set_query_type(
u_int32_t* qtype,
u_int32_t new_type)
{
*qtype = MAX(*qtype, new_type);
return *qtype;
}
/**
* Detect query type by examining parsed representation of it.
@ -817,7 +794,7 @@ static skygw_query_type_t resolve_query_type(
break;
} /**< switch */
/**< Set new query type */
type |= set_query_type(&type, func_qtype);
type |= func_qtype;
}
#if defined(UPDATE_VAR_SUPPORT)
/**
@ -1118,7 +1095,8 @@ char** skygw_get_table_names(GWBUF* querybuf, int* tblsize, bool fullnames)
lex->current_select = lex->current_select->next_select_in_list();
} /*< while(lex->current_select) */
retblock:
*tblsize = i;
if(tblsize)
*tblsize = i;
return tables;
}
@ -1229,6 +1207,7 @@ inline void add_str(char** buf, int* buflen, int* bufsize, char* str)
}
if(*buflen > 0){
if(*buf)
strcat(*buf," ");
}
strcat(*buf,str);