From c3818ff064a13e2a413425adbec33aa6ef3689e7 Mon Sep 17 00:00:00 2001 From: ljhrot <296093710@qq.com> Date: Sat, 25 Jul 2020 23:07:13 +0800 Subject: [PATCH] Fix bad SQL grammar (#3445) --- .../repository/embedded/EmbeddedStoragePersistServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedStoragePersistServiceImpl.java b/config/src/main/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedStoragePersistServiceImpl.java index cf9e19124..7e5298de1 100755 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedStoragePersistServiceImpl.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedStoragePersistServiceImpl.java @@ -2194,7 +2194,7 @@ public class EmbeddedStoragePersistServiceImpl implements PersistService { @Override public boolean isExistTable(String tableName) { - String sql = String.format("select 1 from %s limit 1", tableName); + String sql = String.format("SELECT 1 FROM %s FETCH FIRST ROW ONLY", tableName); try { databaseOperate.queryOne(sql, Integer.class); return true;