From dbcfc48b371930c95f031be7edede9ff74c0247b Mon Sep 17 00:00:00 2001 From: lightfish Date: Mon, 23 May 2022 20:10:28 +0800 Subject: [PATCH] improve AutoFunction avoid repeat compute --- .../src/main/java/io/mycat/router/function/AutoFunction.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/router/src/main/java/io/mycat/router/function/AutoFunction.java b/router/src/main/java/io/mycat/router/function/AutoFunction.java index 21367ed1b..a859f7c2a 100644 --- a/router/src/main/java/io/mycat/router/function/AutoFunction.java +++ b/router/src/main/java/io/mycat/router/function/AutoFunction.java @@ -167,6 +167,10 @@ public List calculate(Map values) { } } } + + if (getDbIndex && getTIndex) { + break; + } } if (getDbIndex && getTIndex) { return (List) scanOnlyDbTableIndex(dIndex, tIndex);