mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
correct old assert in add_role_user_mapping_action to match changed function prototypes.
fix the element deleting logic for roles_mappings_hash
This commit is contained in:
parent
f6fcb348ad
commit
cec76b3861
2 changed files with 15 additions and 10 deletions
19
debian/dist/Ubuntu/control
vendored
19
debian/dist/Ubuntu/control
vendored
|
@ -105,13 +105,15 @@ Conflicts: mysql-client (<< 5.0.51), mysql-client-5.0,
|
|||
mysql-client-core-5.1, mysql-client-core-5.5,
|
||||
mariadb-client-5.1, mariadb-client-core-5.1,
|
||||
mariadb-client-5.2, mariadb-client-core-5.2,
|
||||
mariadb-client-5.3, mariadb-client-core-5.3
|
||||
mariadb-client-5.3, mariadb-client-core-5.3,
|
||||
mariadb-client-5.5, mariadb-client-core-5.5
|
||||
Replaces: mysql-client (<< 5.0.51), mysql-client-5.0,
|
||||
mysql-client-5.1, mysql-client-5.5,
|
||||
mysql-client-core-5.1, mysql-client-core-5.5,
|
||||
mariadb-client-5.1, mariadb-client-core-5.1,
|
||||
mariadb-client-5.2, mariadb-client-core-5.2,
|
||||
mariadb-client-5.3, mariadb-client-core-5.3
|
||||
mariadb-client-5.3, mariadb-client-core-5.3,
|
||||
mariadb-client-5.5, mariadb-client-core-5.5
|
||||
Description: MariaDB database core client binaries
|
||||
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
|
||||
server. SQL (Structured Query Language) is the most popular database query
|
||||
|
@ -127,11 +129,12 @@ Provides: virtual-mysql-client, mysql-client,
|
|||
mysql-client-4.1, mysql-client-5.1, mysql-client-5.5
|
||||
Conflicts: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1,
|
||||
mariadb-client (<< ${source:Version}),
|
||||
mariadb-client-5.1, mariadb-client-5.2, mariadb-client-5.3, mysql-client-5.5
|
||||
mariadb-client-5.1, mariadb-client-5.2, mariadb-client-5.3,
|
||||
mysql-client-5.5, mariadb-client-5.5
|
||||
Replaces: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1,
|
||||
mysql-client-5.5,
|
||||
mariadb-client (<< ${source:Version}),
|
||||
mariadb-client-5.1, mariadb-client-5.2, mariadb-client-5.3
|
||||
mysql-client-5.5, mariadb-client (<< ${source:Version}),
|
||||
mariadb-client-5.1, mariadb-client-5.2, mariadb-client-5.3,
|
||||
mariadb-client-5.5
|
||||
Description: MariaDB database client binaries
|
||||
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
|
||||
server. SQL (Structured Query Language) is the most popular database query
|
||||
|
@ -185,11 +188,11 @@ Depends: mariadb-client-10.0 (>= ${source:Version}), libdbi-perl, perl (>= 5.6),
|
|||
Provides: mariadb-server, mysql-server, virtual-mysql-server
|
||||
Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
|
||||
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5,
|
||||
mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3,
|
||||
mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mariadb-server-5.5,
|
||||
mariadb-tokudb-engine-5.5, mariadb-tokudb-engine-10.0
|
||||
Replaces: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
|
||||
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5,
|
||||
mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3,
|
||||
mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mariadb-server-5.5,
|
||||
libmariadbclient16 (<< 5.3.4), libmariadbclient-dev (<< 5.5.0),
|
||||
mariadb-tokudb-engine-5.5, mariadb-tokudb-engine-10.0
|
||||
Description: MariaDB database server binaries
|
||||
|
|
|
@ -2415,7 +2415,7 @@ static void remove_role_user_mapping(ACL_USER_BASE *grantee, ACL_ROLE *role,
|
|||
static my_bool add_role_user_mapping_action(void *ptr, void *unused __attribute__((unused)))
|
||||
{
|
||||
ROLE_GRANT_PAIR *pair= (ROLE_GRANT_PAIR*)ptr;
|
||||
my_bool status __attribute__((unused));
|
||||
bool status __attribute__((unused));
|
||||
status= add_role_user_mapping(pair->u_uname, pair->u_hname, pair->r_uname);
|
||||
/*
|
||||
The invariant chosen is that acl_roles_mappings should _always_
|
||||
|
@ -2423,7 +2423,7 @@ static my_bool add_role_user_mapping_action(void *ptr, void *unused __attribute_
|
|||
If add_role_user_mapping detects an invalid entry, it will not add
|
||||
the mapping into the ACL_USER::role_grants array.
|
||||
*/
|
||||
DBUG_ASSERT(status >= 0);
|
||||
DBUG_ASSERT(status == 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -8759,6 +8759,8 @@ static int handle_grant_struct(enum enum_acl_lists struct_no, bool drop,
|
|||
|
||||
case ROLES_MAPPINGS_HASH:
|
||||
my_hash_delete(roles_mappings_hash, (uchar*) role_grant_pair);
|
||||
if (idx != elements)
|
||||
idx++;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue