diff --git a/Documentation/Getting-Started/Configuration-Guide.md b/Documentation/Getting-Started/Configuration-Guide.md index 3a770fa4e..ebd6943fc 100644 --- a/Documentation/Getting-Started/Configuration-Guide.md +++ b/Documentation/Getting-Started/Configuration-Guide.md @@ -82,6 +82,14 @@ The values of the parameter that are not on the first line need to have at least one whitespace character before them in order for them to be recognized as a part of the multi-line parameter. +Comments are defined by prefixing a row with a hash (`#`). Trailing comments are +not supported. + +``` +# This is a comment before a parameter +some_parameter=123 +``` + ### Special Parameter Types #### Sizes diff --git a/server/core/queryclassifier.cc b/server/core/queryclassifier.cc index 3bb0bd84b..ec7b5a49a 100644 --- a/server/core/queryclassifier.cc +++ b/server/core/queryclassifier.cc @@ -100,7 +100,7 @@ bool are_multi_statements_allowed(MXS_SESSION* pSession) uint32_t get_prepare_type(GWBUF* buffer) { - uint32_t type; + uint32_t type = QUERY_TYPE_UNKNOWN; if (mxs_mysql_get_command(buffer) == MXS_COM_STMT_PREPARE) { @@ -127,9 +127,11 @@ uint32_t get_prepare_type(GWBUF* buffer) else { GWBUF* stmt = qc_get_preparable_stmt(buffer); - ss_dassert(stmt); - type = qc_get_type_mask(stmt); + if (stmt) + { + type = qc_get_type_mask(stmt); + } } ss_dassert((type & (QUERY_TYPE_PREPARE_STMT | QUERY_TYPE_PREPARE_NAMED_STMT)) == 0);