Commit c744dde7 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Roles : Initialize variables that are passed to update_role_db()

Fixes "uninitialized variable used"  crashes (Windows compiled for
debug  e.g /RTC1 option)

Also enable roles suite on buildbot.
parent 0ba6aaf0
perl mysql-test-run.pl --verbose-restart --force --testcase-timeout=45 --suite-timeout=600 --max-test-fail=500 --retry=3 --parallel=4 --suite=^
perl mysql-test-run.pl --verbose-restart --force --suite-timeout=120 --max-test-fail=10 --retry=3 --parallel=4 --suite=^
main,^
innodb,^
plugins,^
mariabackup,^
roles,^
rocksdb
......@@ -5931,8 +5931,8 @@ static bool merge_role_db_privileges(ACL_ROLE *grantee, const char *dbname,
(that should be merged) are sorted together. The grantee's ACL_DB element
is not necessarily the first and may be not present at all.
*/
ACL_DB **first= NULL, *UNINIT_VAR(merged);
ulong UNINIT_VAR(access), update_flags= 0;
ACL_DB **first= NULL, *merged= NULL;
ulong access= 0, update_flags= 0;
for (ACL_DB **cur= dbs.front(); cur <= dbs.back(); cur++)
{
if (!first || (!dbname && strcmp(cur[0]->db, cur[-1]->db)))
......@@ -6137,8 +6137,8 @@ static bool merge_role_table_and_column_privileges(ACL_ROLE *grantee,
}
grants.sort(table_name_sort);
GRANT_TABLE **first= NULL, *UNINIT_VAR(merged), **cur;
ulong UNINIT_VAR(privs), UNINIT_VAR(cols), update_flags= 0;
GRANT_TABLE **first= NULL, *merged= NULL, **cur;
ulong privs= 0, cols= 0, update_flags= 0;
for (cur= grants.front(); cur <= grants.back(); cur++)
{
if (!first ||
......@@ -6261,8 +6261,8 @@ static bool merge_role_routine_grant_privileges(ACL_ROLE *grantee,
}
grants.sort(routine_name_sort);
GRANT_NAME **first= NULL, *UNINIT_VAR(merged);
ulong UNINIT_VAR(privs);
GRANT_NAME **first= NULL, *merged= NULL;
ulong privs= 0 ;
for (GRANT_NAME **cur= grants.front(); cur <= grants.back(); cur++)
{
if (!first ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment