@@ -1482,10 +1482,10 @@ static const char *fix_plugin_ptr(const char *name)
1482
1482
*/
1483
1483
static bool fix_user_plugin_ptr (ACL_USER *user)
1484
1484
{
1485
- if (lex_string_eq (&user->plugin , &native_password_plugin_name) == 0 )
1485
+ if (lex_string_eq (&user->plugin , &native_password_plugin_name))
1486
1486
user->plugin = native_password_plugin_name;
1487
1487
else
1488
- if (lex_string_eq (&user->plugin , &old_password_plugin_name) == 0 )
1488
+ if (lex_string_eq (&user->plugin , &old_password_plugin_name))
1489
1489
user->plugin = old_password_plugin_name;
1490
1490
else
1491
1491
return true ;
@@ -1525,10 +1525,10 @@ static bool fix_lex_user(THD *thd, LEX_USER *user)
1525
1525
DBUG_ASSERT (user->plugin .length || !user->auth .length );
1526
1526
DBUG_ASSERT (!(user->plugin .length && (user->pwtext .length || user->pwhash .length )));
1527
1527
1528
- if (lex_string_eq (&user->plugin , &native_password_plugin_name) == 0 )
1528
+ if (lex_string_eq (&user->plugin , &native_password_plugin_name))
1529
1529
check_length= SCRAMBLED_PASSWORD_CHAR_LENGTH;
1530
1530
else
1531
- if (lex_string_eq (&user->plugin , &old_password_plugin_name) == 0 )
1531
+ if (lex_string_eq (&user->plugin , &old_password_plugin_name))
1532
1532
check_length= SCRAMBLED_PASSWORD_CHAR_LENGTH_323;
1533
1533
else
1534
1534
if (user->plugin .length )
@@ -11213,7 +11213,7 @@ applicable_roles_insert(ACL_USER_BASE *grantee, ACL_ROLE *role, void *ptr)
11213
11213
if (!is_role)
11214
11214
{
11215
11215
if (data->user ->default_rolename .length &&
11216
- ! lex_string_eq (&data->user ->default_rolename , &role->user ))
11216
+ lex_string_eq (&data->user ->default_rolename , &role->user ))
11217
11217
table->field [3 ]->store (STRING_WITH_LEN (" YES" ), cs);
11218
11218
else
11219
11219
table->field [3 ]->store (STRING_WITH_LEN (" NO" ), cs);
@@ -12825,8 +12825,7 @@ static ulong parse_client_handshake_packet(MPVIO_EXT *mpvio,
12825
12825
restarted and a server auth plugin will read the data that the client
12826
12826
has just send. Cache them to return in the next server_mpvio_read_packet().
12827
12827
*/
12828
- if (lex_string_eq (&mpvio->acl_user ->plugin ,
12829
- plugin_name (mpvio->plugin )) != 0 )
12828
+ if (!lex_string_eq (&mpvio->acl_user ->plugin , plugin_name (mpvio->plugin )))
12830
12829
{
12831
12830
mpvio->cached_client_reply .pkt = passwd;
12832
12831
mpvio->cached_client_reply .pkt_len = (uint)passwd_len;
@@ -13256,7 +13255,7 @@ bool acl_authenticate(THD *thd, uint com_change_user_pkt_len)
13256
13255
{
13257
13256
DBUG_ASSERT (mpvio.acl_user );
13258
13257
DBUG_ASSERT (command == COM_CHANGE_USER ||
13259
- lex_string_eq (auth_plugin_name, &mpvio.acl_user ->plugin ));
13258
+ ! lex_string_eq (auth_plugin_name, &mpvio.acl_user ->plugin ));
13260
13259
auth_plugin_name= &mpvio.acl_user ->plugin ;
13261
13260
res= do_auth_once (thd, auth_plugin_name, &mpvio);
13262
13261
}
0 commit comments