diff --git a/infra/common/src/main/java/org/apache/shardingsphere/infra/hint/SQLHintUtils.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/hint/SQLHintUtils.java index c3ca0598253e6..8b73a6e9cd350 100644 --- a/infra/common/src/main/java/org/apache/shardingsphere/infra/hint/SQLHintUtils.java +++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/hint/SQLHintUtils.java @@ -62,7 +62,7 @@ public static Properties getSQLHintProps(final String comment) { int endIndex = comment.endsWith(SQL_COMMENT_SUFFIX) ? comment.indexOf(SQL_COMMENT_SUFFIX) : comment.length(); Collection sqlHints = Splitter.on(SQL_HINT_SPLIT).trimResults().splitToList(comment.substring(startIndex, endIndex).trim()); for (String each : sqlHints) { - List hintValues = Splitter.on(SQL_HINT_VALUE_SPLIT).trimResults().splitToList(each); + List hintValues = Splitter.on(SQL_HINT_VALUE_SPLIT).limit(SQL_HINT_VALUE_SIZE).trimResults().splitToList(each); if (SQL_HINT_VALUE_SIZE == hintValues.size()) { result.put(hintValues.get(0), convert(hintValues.get(1))); }