MXS-1196: Oracle mode needs to be turned on repeatedly
Seems it not sufficient to turn it on when the qc module is loaded.
This commit is contained in:
@ -127,6 +127,8 @@ inline void get_string_and_length(const char* cs, const char** s, size_t* length
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static uint32_t sql_mode = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ensures that the query is parsed. If it is not already parsed, it
|
* Ensures that the query is parsed. If it is not already parsed, it
|
||||||
* will be parsed.
|
* will be parsed.
|
||||||
@ -139,6 +141,7 @@ bool ensure_query_is_parsed(GWBUF* query)
|
|||||||
|
|
||||||
if (!parsed)
|
if (!parsed)
|
||||||
{
|
{
|
||||||
|
global_system_variables.sql_mode |= sql_mode;
|
||||||
parsed = parse_query(query);
|
parsed = parse_query(query);
|
||||||
|
|
||||||
if (!parsed)
|
if (!parsed)
|
||||||
@ -2823,7 +2826,7 @@ int32_t qc_mysql_setup(const char* zArgs)
|
|||||||
|
|
||||||
if (strcmp(value, "MODE_ORACLE") == 0)
|
if (strcmp(value, "MODE_ORACLE") == 0)
|
||||||
{
|
{
|
||||||
global_system_variables.sql_mode |= MODE_ORACLE;
|
sql_mode = MODE_ORACLE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user