diff --git a/Documentation/Getting-Started/Configuration-Guide.md b/Documentation/Getting-Started/Configuration-Guide.md index bec5bc220..6246b93d3 100644 --- a/Documentation/Getting-Started/Configuration-Guide.md +++ b/Documentation/Getting-Started/Configuration-Guide.md @@ -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; ``` diff --git a/server/core/config.c b/server/core/config.c index 06e39f521..09a70207c 100644 --- a/server/core/config.c +++ b/server/core/config.c @@ -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; } /**