提交 70bb094b authored 作者: Thomas Mueller's avatar Thomas Mueller

Non-admin users could not open a database using a mode (MODE=xxx) if the…

Non-admin users could not open a database using a mode (MODE=xxx) if the database was already open, even if the mode matched.
上级 5ce810e3
...@@ -46,13 +46,19 @@ public class TestRights extends TestBase { ...@@ -46,13 +46,19 @@ public class TestRights extends TestBase {
} }
private void testOpenNonAdminWithMode() throws SQLException { private void testOpenNonAdminWithMode() throws SQLException {
if (config.memory) {
return;
}
deleteDb("rights"); deleteDb("rights");
Connection conn = getConnection("rights"); Connection conn = getConnection("rights;MODE=MYSQL");
stat = conn.createStatement(); stat = conn.createStatement();
stat.execute("create user test password 'test'"); stat.execute("create user test password 'test'");
Connection conn2 = getConnection("rights", "test", getPassword("test")); Connection conn2 = getConnection("rights;MODE=MYSQL", "test", getPassword("test"));
conn2.close(); conn2.close();
conn.close(); conn.close();
if (config.memory) {
return;
}
// if opening alone // if opening alone
conn2 = getConnection("rights;MODE=MYSQL", "test", getPassword("test")); conn2 = getConnection("rights;MODE=MYSQL", "test", getPassword("test"));
conn2.close(); conn2.close();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论