Skip to content

Commit c445a45

Browse files
author
wind
committed
fix bug
1 parent dc5d70a commit c445a45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/com/web/spring/datatable/TableQuery.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public void init() {
7777
}
7878

7979
if (entityManagerInitMap.get(this.entityManager) == null) {
80-
Query query = this.entityManager.createNativeQuery("SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE engine = 'InnoDB'");
80+
Query query = this.entityManager.createNativeQuery("SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE engine = 'InnoDB' and TABLE_SCHEMA != 'mysql'");
8181
List<Object> result = query.getResultList();
8282
for (Object object : result) {
8383
innodbMap.put(object.toString(), true);
@@ -424,7 +424,7 @@ public Long fetchTotalCount() {
424424
javax.persistence.Query query = this.entityManager.createQuery("SELECT COUNT(*) FROM " + entiteClass.getSimpleName() + " p");
425425
totalCount = (Long) query.getSingleResult();
426426
} else {
427-
Query query = this.entityManager.createNativeQuery("SELECT TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '" + this.entiteTableName + "'");
427+
Query query = this.entityManager.createNativeQuery("SELECT TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '" + this.entiteTableName + "' and TABLE_SCHEMA != 'mysql'");
428428
totalCount = ((BigInteger) query.getSingleResult()).longValue();
429429
}
430430
} else {

0 commit comments

Comments
 (0)