Skip to content

Commit 28c05b9

Browse files
authored
test(mysql-schema): fix sql query in userExists (#898)
1 parent 7b2189f commit 28c05b9

File tree

1 file changed

+1
-1
lines changed
  • sample-operators/mysql-schema/src/main/java/io/javaoperatorsdk/operator/sample/schema

1 file changed

+1
-1
lines changed

sample-operators/mysql-schema/src/main/java/io/javaoperatorsdk/operator/sample/schema/SchemaService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public static void deleteSchemaAndRelatedUser(Connection connection, String sche
7676
private static boolean userExists(Connection connection, String username) {
7777
try (PreparedStatement ps =
7878
connection.prepareStatement(
79-
"SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = ?)")) {
79+
"SELECT 1 FROM mysql.user WHERE user = ?")) {
8080
ps.setString(1, username);
8181
try (ResultSet resultSet = ps.executeQuery()) {
8282
return resultSet.next();

0 commit comments

Comments
 (0)