Skip to content
Closed
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public MariaDBSchemaValidator(JdbcTemplate jdbcTemplate) {
private boolean isTableExists(String schemaName, String tableName) {
// schema and table are expected to be escaped
String sql = String.format(
"SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s",
"SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '%s' AND TABLE_NAME = '%s'",
(schemaName == null) ? "SCHEMA()" : schemaName, tableName);
try {
// Query for a single integer value, if it exists, table exists
Expand Down