mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -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 ||
|
||||
|
Reference in New Issue
Block a user