Skip to content

Commit a80f5fd

Browse files
committed
Merge 10.3 into 10.4
2 parents ce8716a + 2fd0acd commit a80f5fd

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

mysql-test/suite/rpl/t/rpl_gtid_crash.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ EOF
186186
wait
187187
EOF
188188
START SLAVE;
189+
--error 0,2006,2013
189190
SET GLOBAL debug_dbug="+d,crash_commit_after";
190191

191192
--connection server_1

sql/sql_acl.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2411,12 +2411,12 @@ template<typename T> uint find_first_user(T* arr, uint len, const char *user)
24112411
return (!found || low == len || strcmp(arr[low].get_username(), user)!=0 )?UINT_MAX:low;
24122412
}
24132413

2414-
static uint acl_find_user_by_name(const char *user)
2414+
static size_t acl_find_user_by_name(const char *user)
24152415
{
24162416
return find_first_user<ACL_USER>((ACL_USER *)acl_users.buffer,acl_users.elements,user);
24172417
}
24182418

2419-
static uint acl_find_db_by_username(const char *user)
2419+
static size_t acl_find_db_by_username(const char *user)
24202420
{
24212421
return find_first_user<ACL_DB>(acl_dbs.front(), acl_dbs.elements(), user);
24222422
}
@@ -2754,7 +2754,7 @@ static bool acl_update_db(const char *user, const char *host, const char *db,
27542754

27552755
bool updated= false;
27562756

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++)
27582758
{
27592759
ACL_DB *acl_db= &acl_dbs.at(i);
27602760
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
35323532
static ACL_USER *find_user_exact(const char *host, const char *user)
35333533
{
35343534
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);
35363536

3537-
for (uint i= start; i < acl_users.elements; i++)
3537+
for (size_t i= start; i < acl_users.elements; i++)
35383538
{
35393539
ACL_USER *acl_user= dynamic_element(&acl_users, i, ACL_USER*);
35403540
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
35533553
{
35543554
mysql_mutex_assert_owner(&acl_cache->lock);
35553555

3556-
uint start = acl_find_user_by_name(user);
3556+
size_t start = acl_find_user_by_name(user);
35573557

3558-
for (uint i= start; i < acl_users.elements; i++)
3558+
for (size_t i= start; i < acl_users.elements; i++)
35593559
{
35603560
ACL_USER *acl_user=dynamic_element(&acl_users,i,ACL_USER*);
35613561
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,
95319531
elements= acl_users.elements;
95329532
break;
95339533
case DB_ACL:
9534-
elements= acl_dbs.elements();
9534+
elements= int(acl_dbs.elements());
95359535
break;
95369536
case COLUMN_PRIVILEGES_HASH:
95379537
grant_name_hash= &column_priv_hash;
@@ -11174,7 +11174,7 @@ static int show_database_grants(THD *thd, SHOW_VAR *var, char *buff,
1117411174
{
1117511175
var->type= SHOW_UINT;
1117611176
var->value= buff;
11177-
*(uint *)buff= acl_dbs.elements();
11177+
*(uint *)buff= uint(acl_dbs.elements());
1117811178
return 0;
1117911179
}
1118011180

0 commit comments

Comments
 (0)