From 3e7b8fcdc6a1c40f8d3f8fea0d1c7ca1b5f1c8e2 Mon Sep 17 00:00:00 2001 From: Niclas Antti Date: Mon, 15 Feb 2021 14:31:09 +0200 Subject: [PATCH] Fix get_canonical bug in treating decimal numbers "select 1.", became "select 1.", should be "select ?" --- server/core/modutil.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/core/modutil.cc b/server/core/modutil.cc index cc17a94a3..1cffed5e0 100644 --- a/server/core/modutil.cc +++ b/server/core/modutil.cc @@ -1368,9 +1368,8 @@ static inline std::pair probe_number(uint8_t* it, uint8_t* end) if (next_it != end && !is_digit(*next_it)) { - /** No number after the period, not a decimal number. - * The fractional part of the number is optional in MariaDB. */ - rval.first = false; + /** The fractional part of a decimal is optional in MariaDB. */ + rval.second = it; break; } mxb_assert(is_digit(*next_it));