From 56d318aeb0ff782a7eaa39d945a1d3c70d22ea19 Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 18 Nov 2019 11:05:39 +1300 Subject: [PATCH] Allow '3.' formatted numbers --- .../java/com/mysql/cj/result/AbstractNumericValueFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/core-impl/java/com/mysql/cj/result/AbstractNumericValueFactory.java b/src/main/core-impl/java/com/mysql/cj/result/AbstractNumericValueFactory.java index 970d36d9..c7fe2503 100644 --- a/src/main/core-impl/java/com/mysql/cj/result/AbstractNumericValueFactory.java +++ b/src/main/core-impl/java/com/mysql/cj/result/AbstractNumericValueFactory.java @@ -52,7 +52,7 @@ public T createFromBytes(byte[] bytes, int offset, int length, Field f) { String s = StringUtils.toString(bytes, offset, length, f.getEncoding()); byte[] newBytes = s.getBytes(); - if (s.contains("e") || s.contains("E") || s.matches("-?(\\d+)?\\.\\d+")) { + if (s.contains("e") || s.contains("E") || s.matches("-?(\\d+)?\\.(\\d+)?")) { // floating point return createFromDouble(MysqlTextValueDecoder.getDouble(newBytes, 0, newBytes.length)); } else if (s.matches("-?\\d+")) {