Merge branch '2.2' into 2.3
This commit is contained in:
commit
f94355770f
@ -476,6 +476,20 @@ TestConnections::TestConnections(int argc, char* argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (mdbci_call_needed)
|
||||
{
|
||||
int ec;
|
||||
char * ver = maxscales->ssh_node_output(0, "maxscale --version-full", false, &ec);
|
||||
if (ec)
|
||||
{
|
||||
tprintf("Error retrival of Maxscale version info");
|
||||
}
|
||||
else
|
||||
{
|
||||
tprintf("Maxscale_full_version_start:\n%s\nMaxscale_full_version_end\n", ver);
|
||||
}
|
||||
}
|
||||
|
||||
char str[1024];
|
||||
sprintf(str, "mkdir -p LOGS/%s", test_name);
|
||||
system(str);
|
||||
|
@ -63,12 +63,14 @@ const char* mariadb_102_users_query =
|
||||
" u.is_role, u.default_role"
|
||||
" FROM mysql.user AS u LEFT JOIN mysql.db AS d "
|
||||
" ON (u.user = d.user AND u.host = d.host) "
|
||||
" WHERE u.plugin IN ('', 'mysql_native_password') "
|
||||
" UNION "
|
||||
" SELECT u.user, u.host, t.db, u.select_priv, "
|
||||
" IF(u.password <> '', u.password, u.authentication_string), "
|
||||
" u.is_role, u.default_role "
|
||||
" FROM mysql.user AS u LEFT JOIN mysql.tables_priv AS t "
|
||||
" ON (u.user = t.user AND u.host = t.host)"
|
||||
" WHERE u.plugin IN ('', 'mysql_native_password') "
|
||||
"), users AS ("
|
||||
// Select the root row, the actual user
|
||||
" SELECT t.user, t.host, t.db, t.select_priv, t.password, t.default_role AS role FROM t"
|
||||
@ -91,10 +93,12 @@ const char* mariadb_users_query
|
||||
" SELECT u.user, u.host, d.db, u.select_priv, u.password AS password, u.is_role "
|
||||
" FROM mysql.user AS u LEFT JOIN mysql.db AS d "
|
||||
" ON (u.user = d.user AND u.host = d.host) "
|
||||
" WHERE u.plugin IN ('', 'mysql_native_password') "
|
||||
" UNION "
|
||||
" SELECT u.user, u.host, t.db, u.select_priv, u.password AS password, u.is_role "
|
||||
" FROM mysql.user AS u LEFT JOIN mysql.tables_priv AS t "
|
||||
" ON (u.user = t.user AND u.host = t.host) "
|
||||
" WHERE u.plugin IN ('', 'mysql_native_password') "
|
||||
") AS t "
|
||||
// Discard any users that are roles
|
||||
"WHERE t.is_role <> 'Y' %s "
|
||||
@ -105,10 +109,12 @@ const char* mariadb_users_query
|
||||
" SELECT u.user, u.host, d.db, u.select_priv, u.password AS password, u.default_role "
|
||||
" FROM mysql.user AS u LEFT JOIN mysql.db AS d "
|
||||
" ON (u.user = d.user AND u.host = d.host) "
|
||||
" WHERE u.plugin IN ('', 'mysql_native_password') "
|
||||
" UNION "
|
||||
" SELECT u.user, u.host, t.db, u.select_priv, u.password AS password, u.default_role "
|
||||
" FROM mysql.user AS u LEFT JOIN mysql.tables_priv AS t "
|
||||
" ON (u.user = t.user AND u.host = t.host) "
|
||||
" WHERE u.plugin IN ('', 'mysql_native_password') "
|
||||
") AS t "
|
||||
// Join it to the roles_mapping table to only have users with roles
|
||||
"JOIN mysql.roles_mapping AS r "
|
||||
@ -119,10 +125,12 @@ const char* mariadb_users_query
|
||||
" SELECT u.user, u.host, d.db, u.select_priv, u.password AS password, u.is_role "
|
||||
" FROM mysql.user AS u LEFT JOIN mysql.db AS d "
|
||||
" ON (u.user = d.user AND u.host = d.host) "
|
||||
" WHERE u.plugin IN ('', 'mysql_native_password') "
|
||||
" UNION "
|
||||
" SELECT u.user, u.host, t.db, u.select_priv, u.password AS password, u.is_role "
|
||||
" FROM mysql.user AS u LEFT JOIN mysql.tables_priv AS t "
|
||||
" ON (u.user = t.user AND u.host = t.host) "
|
||||
" WHERE u.plugin IN ('', 'mysql_native_password') "
|
||||
") AS u "
|
||||
"ON (u.user = r.role AND u.is_role = 'Y') "
|
||||
// We only care about users that have a default role assigned
|
||||
|
Loading…
x
Reference in New Issue
Block a user