summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc43
1 files changed, 21 insertions, 22 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 508ff88a0cf..e5a31ea0cab 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -1206,7 +1206,6 @@ bool change_password(THD *thd, const char *host, const char *user,
acl_user->user ? acl_user->user : "",
acl_user->host.hostname ? acl_user->host.hostname : "",
new_password));
- mysql_update_log.write(thd, buff, query_length);
Query_log_event qinfo(thd, buff, query_length, 0);
mysql_bin_log.write(&qinfo);
DBUG_RETURN(0);
@@ -1471,7 +1470,7 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
if (table->fields >= 31) /* From 4.0.0 we have more fields */
{
/* We write down SSL related ACL stuff */
- switch (thd->lex.ssl_type) {
+ switch (thd->lex->ssl_type) {
case SSL_TYPE_ANY:
table->field[24]->store("ANY",3, &my_charset_latin1);
table->field[25]->store("", 0, &my_charset_latin1);
@@ -1489,15 +1488,15 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
table->field[25]->store("", 0, &my_charset_latin1);
table->field[26]->store("", 0, &my_charset_latin1);
table->field[27]->store("", 0, &my_charset_latin1);
- if (thd->lex.ssl_cipher)
- table->field[25]->store(thd->lex.ssl_cipher,
- strlen(thd->lex.ssl_cipher), &my_charset_latin1);
- if (thd->lex.x509_issuer)
- table->field[26]->store(thd->lex.x509_issuer,
- strlen(thd->lex.x509_issuer), &my_charset_latin1);
- if (thd->lex.x509_subject)
- table->field[27]->store(thd->lex.x509_subject,
- strlen(thd->lex.x509_subject), &my_charset_latin1);
+ if (thd->lex->ssl_cipher)
+ table->field[25]->store(thd->lex->ssl_cipher,
+ strlen(thd->lex->ssl_cipher), &my_charset_latin1);
+ if (thd->lex->x509_issuer)
+ table->field[26]->store(thd->lex->x509_issuer,
+ strlen(thd->lex->x509_issuer), &my_charset_latin1);
+ if (thd->lex->x509_subject)
+ table->field[27]->store(thd->lex->x509_subject,
+ strlen(thd->lex->x509_subject), &my_charset_latin1);
break;
case SSL_TYPE_NOT_SPECIFIED:
break;
@@ -1509,7 +1508,7 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
break;
}
- USER_RESOURCES mqh = thd->lex.mqh;
+ USER_RESOURCES mqh = thd->lex->mqh;
if (mqh.bits & 1)
table->field[28]->store((longlong) mqh.questions);
if (mqh.bits & 2)
@@ -1550,19 +1549,19 @@ end:
acl_cache->clear(1); // Clear privilege cache
if (old_row_exists)
acl_update_user(combo.user.str, combo.host.str, password, password_len,
- thd->lex.ssl_type,
- thd->lex.ssl_cipher,
- thd->lex.x509_issuer,
- thd->lex.x509_subject,
- &thd->lex.mqh,
+ thd->lex->ssl_type,
+ thd->lex->ssl_cipher,
+ thd->lex->x509_issuer,
+ thd->lex->x509_subject,
+ &thd->lex->mqh,
rights);
else
acl_insert_user(combo.user.str, combo.host.str, password, password_len,
- thd->lex.ssl_type,
- thd->lex.ssl_cipher,
- thd->lex.x509_issuer,
- thd->lex.x509_subject,
- &thd->lex.mqh,
+ thd->lex->ssl_type,
+ thd->lex->ssl_cipher,
+ thd->lex->x509_issuer,
+ thd->lex->x509_subject,
+ &thd->lex->mqh,
rights);
}
table->file->index_end();