Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/lib/PatPeter/SQLibrary/MySQL.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public boolean isTable(String table) {
return false;
}
try {
statement.executeQuery("SELECT * FROM " + table);
statement.executeQuery("SELECT 1 FROM " + table);
return true; // Result can never be null, bad logic from earlier versions.
} catch (SQLException e) {
return false; // Query failed, table does not exist.
Expand All @@ -223,4 +223,4 @@ public boolean truncate(String table) {
return false;
}
}
}
}