From 067bca6e5852bd170becaad55dd05af28cdb7d25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 20 Jun 2018 20:58:59 +0300 Subject: [PATCH 1/2] Document comment syntax Documented comment syntax and explicitly stated that trailing comments are not supported. --- Documentation/Getting-Started/Configuration-Guide.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/Getting-Started/Configuration-Guide.md b/Documentation/Getting-Started/Configuration-Guide.md index 2793c862e..ee4e3bf12 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 From 9e4b86ff0a17e7702aa49dda042b24fdee188ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 21 Jun 2018 10:04:34 +0300 Subject: [PATCH 2/2] MXS-1935: Accent NULL from qc_get_preparable_stmt in readwritesplit If the prepared statement cannot be extracted from the query, treat it as a query with an unknown type. --- server/modules/routing/readwritesplit/rwsplit_ps.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/modules/routing/readwritesplit/rwsplit_ps.cc b/server/modules/routing/readwritesplit/rwsplit_ps.cc index c21a536ba..9c56454fd 100644 --- a/server/modules/routing/readwritesplit/rwsplit_ps.cc +++ b/server/modules/routing/readwritesplit/rwsplit_ps.cc @@ -21,7 +21,7 @@ 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) { @@ -48,9 +48,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);