You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stmt.execute("CREATE SETTINGS PROFILE IF NOT EXISTS profile_readonly_1 SETTINGS readonly=1");
28
-
stmt.execute("CREATE SETTINGS PROFILE IF NOT EXISTS profile_readonly_2 SETTINGS readonly=2");
29
-
stmt.execute("CREATE USER IF NOT EXISTS user_readonly_1 IDENTIFIED WITH plaintext_password BY '" + password + "' SETTINGS PROFILE profile_readonly_1");
30
-
stmt.execute("CREATE USER IF NOT EXISTS user_readonly_2 IDENTIFIED WITH plaintext_password BY '" + password + "' SETTINGS PROFILE profile_readonly_2");
27
+
stmt.execute("CREATE SETTINGS PROFILE IF NOT EXISTS jdbc_test_profile_readonly_1 SETTINGS readonly=1");
28
+
stmt.execute("CREATE SETTINGS PROFILE IF NOT EXISTS jdbc_test_profile_readonly_2 SETTINGS readonly=2");
29
+
stmt.execute("DROP USER IF EXISTS jdbc_test_user_readonly_1");
30
+
stmt.execute("DROP USER IF EXISTS jdbc_test_user_readonly_2");
31
+
stmt.execute("CREATE USER jdbc_test_user_readonly_1 IDENTIFIED WITH plaintext_password BY '" + password + "' SETTINGS PROFILE jdbc_test_profile_readonly_1");
32
+
stmt.execute("CREATE USER jdbc_test_user_readonly_2 IDENTIFIED WITH plaintext_password BY '" + password + "' SETTINGS PROFILE jdbc_test_profile_readonly_2");
31
33
Stringdb = getDatabase();
32
-
stmt.execute("GRANT SELECT ON " + db + ".* TO user_readonly_1");
33
-
stmt.execute("GRANT SELECT ON " + db + ".* TO user_readonly_2");
34
+
stmt.execute("GRANT SELECT ON " + db + ".* TO jdbc_test_user_readonly_1");
35
+
stmt.execute("GRANT SELECT ON " + db + ".* TO jdbc_test_user_readonly_2");
34
36
}
35
37
}
36
38
37
39
@AfterClass(groups = { "integration" })
38
40
publicvoidteardown() throwsSQLException {
39
41
try (Connectionconn = getJdbcConnection();
40
42
Statementstmt = conn.createStatement()) {
41
-
stmt.execute("DROP USER IF EXISTS user_readonly_1");
42
-
stmt.execute("DROP USER IF EXISTS user_readonly_2");
43
-
stmt.execute("DROP SETTINGS PROFILE IF EXISTS profile_readonly_1");
44
-
stmt.execute("DROP SETTINGS PROFILE IF EXISTS profile_readonly_2");
43
+
stmt.execute("DROP USER IF EXISTS jdbc_test_user_readonly_1");
44
+
stmt.execute("DROP USER IF EXISTS jdbc_test_user_readonly_2");
45
+
stmt.execute("DROP SETTINGS PROFILE IF EXISTS jdbc_test_profile_readonly_1");
46
+
stmt.execute("DROP SETTINGS PROFILE IF EXISTS jdbc_test_profile_readonly_2");
0 commit comments