Fix mxs2043_select_for_update

Explicitly define the host of the user being created and sync
replication after it.
This commit is contained in:
Markus Mäkelä
2018-09-29 20:10:27 +03:00
parent f8cf5053bd
commit 6d00dbfc92

View File

@ -78,7 +78,7 @@ bool create_user(TestConnections& test, MYSQL* pMysql)
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);
return test.global_result == 0;
@ -150,6 +150,8 @@ int main(int argc, char* argv[])
if (create_user(test, pMysql))
{
int rv = test.repl->connect();
test.repl->sync_slaves();
test.expect(rv == 0, "Could not connect to MS.");
if (rv == 0)