mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +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:
@@ -1,6 +1,7 @@
|
|||||||
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,^
|
main,^
|
||||||
innodb,^
|
innodb,^
|
||||||
plugins,^
|
plugins,^
|
||||||
mariabackup,^
|
mariabackup,^
|
||||||
|
roles,^
|
||||||
rocksdb
|
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
|
(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.
|
is not necessarily the first and may be not present at all.
|
||||||
*/
|
*/
|
||||||
ACL_DB **first= NULL, *UNINIT_VAR(merged);
|
ACL_DB **first= NULL, *merged= NULL;
|
||||||
ulong UNINIT_VAR(access), update_flags= 0;
|
ulong access= 0, update_flags= 0;
|
||||||
for (ACL_DB **cur= dbs.front(); cur <= dbs.back(); cur++)
|
for (ACL_DB **cur= dbs.front(); cur <= dbs.back(); cur++)
|
||||||
{
|
{
|
||||||
if (!first || (!dbname && strcmp(cur[0]->db, cur[-1]->db)))
|
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);
|
grants.sort(table_name_sort);
|
||||||
|
|
||||||
GRANT_TABLE **first= NULL, *UNINIT_VAR(merged), **cur;
|
GRANT_TABLE **first= NULL, *merged= NULL, **cur;
|
||||||
ulong UNINIT_VAR(privs), UNINIT_VAR(cols), update_flags= 0;
|
ulong privs= 0, cols= 0, update_flags= 0;
|
||||||
for (cur= grants.front(); cur <= grants.back(); cur++)
|
for (cur= grants.front(); cur <= grants.back(); cur++)
|
||||||
{
|
{
|
||||||
if (!first ||
|
if (!first ||
|
||||||
@@ -6261,8 +6261,8 @@ static bool merge_role_routine_grant_privileges(ACL_ROLE *grantee,
|
|||||||
}
|
}
|
||||||
grants.sort(routine_name_sort);
|
grants.sort(routine_name_sort);
|
||||||
|
|
||||||
GRANT_NAME **first= NULL, *UNINIT_VAR(merged);
|
GRANT_NAME **first= NULL, *merged= NULL;
|
||||||
ulong UNINIT_VAR(privs);
|
ulong privs= 0 ;
|
||||||
for (GRANT_NAME **cur= grants.front(); cur <= grants.back(); cur++)
|
for (GRANT_NAME **cur= grants.front(); cur <= grants.back(); cur++)
|
||||||
{
|
{
|
||||||
if (!first ||
|
if (!first ||
|
||||||
|
Reference in New Issue
Block a user