Fix mxs2043_select_for_update
Explicitly define the host of the user being created and sync replication after it.
This commit is contained in:
@ -78,7 +78,7 @@ bool create_user(TestConnections& test, MYSQL* pMysql)
|
|||||||
|
|
||||||
drop_user(test, pMysql, true);
|
drop_user(test, pMysql, true);
|
||||||
|
|
||||||
test.try_query(pMysql, "CREATE USER '%s' IDENTIFIED by '%s'", ZUSER, ZPASSWORD);
|
test.try_query(pMysql, "CREATE USER '%s'@'%%' IDENTIFIED by '%s'", ZUSER, ZPASSWORD);
|
||||||
test.try_query(pMysql, "GRANT SELECT, UPDATE ON %s TO '%s'@'%%'", ZTABLE, ZUSER);
|
test.try_query(pMysql, "GRANT SELECT, UPDATE ON %s TO '%s'@'%%'", ZTABLE, ZUSER);
|
||||||
|
|
||||||
return test.global_result == 0;
|
return test.global_result == 0;
|
||||||
@ -150,6 +150,8 @@ int main(int argc, char* argv[])
|
|||||||
if (create_user(test, pMysql))
|
if (create_user(test, pMysql))
|
||||||
{
|
{
|
||||||
int rv = test.repl->connect();
|
int rv = test.repl->connect();
|
||||||
|
test.repl->sync_slaves();
|
||||||
|
|
||||||
test.expect(rv == 0, "Could not connect to MS.");
|
test.expect(rv == 0, "Could not connect to MS.");
|
||||||
|
|
||||||
if (rv == 0)
|
if (rv == 0)
|
||||||
|
Reference in New Issue
Block a user