MXS-1278: Add 'sql_mode' configuration parameter

Using the 'sql_mode' configuration parameter, the initial sql mode
can be specified.
This commit is contained in:
Johan Wikman
2017-06-05 13:51:15 +03:00
parent 83f8010c4b
commit a14755a403
2 changed files with 6 additions and 4 deletions

View File

@ -532,9 +532,9 @@ The allowed values are:
sql_mode=oracle
```
The default value is `default`, which is also used if no value is specified
or if `sql_mode=` is not present at all. At runtime, MariaDB MaxScale will
recognize statements like
The default value is `default`.
At runtime, MariaDB MaxScale will recognize statements like
```
set sql_mode=oracle;
```

View File

@ -1277,7 +1277,7 @@ handle_global_item(const char *name, const char *value)
}
else if (strcmp(name, "sql_mode") == 0)
{
if ((*value == 0) || (strcasecmp(value, "default") == 0))
if (strcasecmp(value, "default") == 0)
{
gateway.qc_sql_mode = QC_SQL_MODE_DEFAULT;
}
@ -1616,6 +1616,8 @@ global_defaults()
/* query_classifier */
memset(gateway.qc_name, 0, sizeof(gateway.qc_name));
gateway.qc_args = NULL;
gateway.qc_sql_mode = QC_SQL_MODE_DEFAULT;
}
/**