@@ -2411,12 +2411,12 @@ template<typename T> uint find_first_user(T* arr, uint len, const char *user)
2411
2411
return (!found || low == len || strcmp (arr[low].get_username (), user)!=0 )?UINT_MAX:low;
2412
2412
}
2413
2413
2414
- static uint acl_find_user_by_name (const char *user)
2414
+ static size_t acl_find_user_by_name (const char *user)
2415
2415
{
2416
2416
return find_first_user<ACL_USER>((ACL_USER *)acl_users.buffer ,acl_users.elements ,user);
2417
2417
}
2418
2418
2419
- static uint acl_find_db_by_username (const char *user)
2419
+ static size_t acl_find_db_by_username (const char *user)
2420
2420
{
2421
2421
return find_first_user<ACL_DB>(acl_dbs.front (), acl_dbs.elements (), user);
2422
2422
}
@@ -2754,7 +2754,7 @@ static bool acl_update_db(const char *user, const char *host, const char *db,
2754
2754
2755
2755
bool updated= false ;
2756
2756
2757
- for (uint i= acl_find_db_by_username (user); i < acl_dbs.elements (); i++)
2757
+ for (size_t i= acl_find_db_by_username (user); i < acl_dbs.elements (); i++)
2758
2758
{
2759
2759
ACL_DB *acl_db= &acl_dbs.at (i);
2760
2760
if (!strcmp (user,acl_db->user ))
@@ -3532,9 +3532,9 @@ static ACL_USER *find_user_or_anon(const char *host, const char *user, const cha
3532
3532
static ACL_USER *find_user_exact (const char *host, const char *user)
3533
3533
{
3534
3534
mysql_mutex_assert_owner (&acl_cache->lock );
3535
- uint start= acl_find_user_by_name (user);
3535
+ size_t start= acl_find_user_by_name (user);
3536
3536
3537
- for (uint i= start; i < acl_users.elements ; i++)
3537
+ for (size_t i= start; i < acl_users.elements ; i++)
3538
3538
{
3539
3539
ACL_USER *acl_user= dynamic_element (&acl_users, i, ACL_USER*);
3540
3540
if (i > start && strcmp (acl_user->user .str , user))
@@ -3553,9 +3553,9 @@ static ACL_USER * find_user_wild(const char *host, const char *user, const char
3553
3553
{
3554
3554
mysql_mutex_assert_owner (&acl_cache->lock );
3555
3555
3556
- uint start = acl_find_user_by_name (user);
3556
+ size_t start = acl_find_user_by_name (user);
3557
3557
3558
- for (uint i= start; i < acl_users.elements ; i++)
3558
+ for (size_t i= start; i < acl_users.elements ; i++)
3559
3559
{
3560
3560
ACL_USER *acl_user=dynamic_element (&acl_users,i,ACL_USER*);
3561
3561
if (i > start && strcmp (acl_user->user .str , user))
@@ -9531,7 +9531,7 @@ static int handle_grant_struct(enum enum_acl_lists struct_no, bool drop,
9531
9531
elements= acl_users.elements ;
9532
9532
break ;
9533
9533
case DB_ACL:
9534
- elements= acl_dbs.elements ();
9534
+ elements= int ( acl_dbs.elements () );
9535
9535
break ;
9536
9536
case COLUMN_PRIVILEGES_HASH:
9537
9537
grant_name_hash= &column_priv_hash;
@@ -11174,7 +11174,7 @@ static int show_database_grants(THD *thd, SHOW_VAR *var, char *buff,
11174
11174
{
11175
11175
var->type = SHOW_UINT;
11176
11176
var->value = buff;
11177
- *(uint *)buff= acl_dbs.elements ();
11177
+ *(uint *)buff= uint ( acl_dbs.elements () );
11178
11178
return 0 ;
11179
11179
}
11180
11180
0 commit comments