Skip to content

Commit d39b14e

Browse files
philipmarzullo64Philip Marzullo
andauthored
SYM-7169: MariaDB SQL Explorer does not successfully run select statements (#477)
Co-authored-by: Philip Marzullo <[email protected]>
1 parent 3bf3fdb commit d39b14e

File tree

1 file changed

+3
-1
lines changed
  • symmetric-sqlexplorer/src/main/java/org/jumpmind/vaadin/ui/sqlexplorer

1 file changed

+3
-1
lines changed

symmetric-sqlexplorer/src/main/java/org/jumpmind/vaadin/ui/sqlexplorer/SqlRunner.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import org.apache.commons.lang3.StringUtils;
4343
import org.apache.commons.lang3.exception.ExceptionUtils;
4444
import org.jumpmind.db.platform.DatabaseNamesConstants;
45+
import org.jumpmind.db.platform.mariadb.MariaDBDatabasePlatform;
4546
import org.jumpmind.db.sql.JdbcSqlTemplate;
4647
import org.jumpmind.db.sql.SqlScriptReader;
4748
import org.jumpmind.properties.TypedProperties;
@@ -218,7 +219,8 @@ public void run() {
218219
}
219220
String lowercaseSql = sql.trim().toLowerCase();
220221
if (!lowercaseSql.startsWith("delete") && !lowercaseSql.startsWith("update") && !lowercaseSql.startsWith("insert")) {
221-
if (db.getPlatform().getName().equals(DatabaseNamesConstants.MYSQL)) {
222+
if (db.getPlatform().getName().equals(DatabaseNamesConstants.MYSQL) &&
223+
!(db.getPlatform() instanceof MariaDBDatabasePlatform)) {
222224
stmt.setFetchSize(Integer.MIN_VALUE);
223225
} else {
224226
stmt.setFetchSize(maxResultsSize < 100 ? maxResultsSize : 100);

0 commit comments

Comments
 (0)