MXS-1451: Calculate password even with skip_authentication=true
The result of the authentication should be ignored but the scramble that is calculated as a side-effect still needs to be stored. This can be done by altering the SQL used to get the matching row to only match on the username, not the network address. Also expanded the test case to cover the use of bad credentials.
This commit is contained in:
@ -24,6 +24,11 @@ int main(int argc, char *argv[])
|
||||
test.try_query(conn, "SHOW DATABASES");
|
||||
mysql_close(conn);
|
||||
|
||||
test.tprintf("Trying query with bad credentials");
|
||||
conn = open_conn_db(test.rwsplit_port, test.maxscale_ip(), "test", "wrong_user", "wrong_password", false);
|
||||
test.add_result(execute_query_silent(conn, "SHOW DATABASES") == 0, "Connection with bad credentials should fail");
|
||||
mysql_close(conn);
|
||||
|
||||
test.set_timeout(60);
|
||||
test.tprintf("Dropping user");
|
||||
test.repl->connect();
|
||||
|
Reference in New Issue
Block a user