Loading sql/sql_acl.cc +6 −6 Original line number Diff line number Diff line Loading @@ -652,11 +652,11 @@ static void acl_update_user(const char *user, const char *host, acl_user->host.hostname && !strcmp(host,acl_user->host.hostname)) { acl_user->access=privileges; if (mqh->questions) if (mqh->bits & 1) acl_user->user_resource.questions=mqh->questions; if (mqh->updates) if (mqh->bits & 2) acl_user->user_resource.updates=mqh->updates; if (mqh->connections) if (mqh->bits & 4) acl_user->user_resource.connections=mqh->connections; #ifdef HAVE_OPENSSL acl_user->ssl_type=ssl_type; Loading Loading @@ -1300,11 +1300,11 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo, #endif /* HAVE_OPENSSL */ USER_RESOURCES mqh = thd->lex.mqh; if (mqh.questions) if (mqh.bits & 1) table->field[28]->store((longlong) mqh.questions); if (mqh.updates) if (mqh.bits & 2) table->field[29]->store((longlong) mqh.updates); if (mqh.connections) if (mqh.bits & 4) table->field[30]->store((longlong) mqh.connections); mqh_used = mqh_used || mqh.questions || mqh.updates || mqh.connections; } Loading sql/sql_parse.cc +1 −1 Original line number Diff line number Diff line Loading @@ -392,7 +392,7 @@ static void reset_mqh(THD *thd, LEX_USER *lu, bool get_them=false) if (lu) // for GRANT { USER_CONN *uc; volatile uint temp_len=lu->user.length+lu->host.length+2; uint temp_len=lu->user.length+lu->host.length+2; char temp_user[USERNAME_LENGTH+HOSTNAME_LENGTH+2]; memcpy(temp_user,lu->user.str,lu->user.length); Loading sql/sql_yacc.yy +3 −0 Original line number Diff line number Diff line Loading @@ -3669,14 +3669,17 @@ grant_option: | MAX_QUERIES_PER_HOUR ULONG_NUM { Lex->mqh.questions=$2; Lex->mqh.bits |= 1; } | MAX_UPDATES_PER_HOUR ULONG_NUM { Lex->mqh.updates=$2; Lex->mqh.bits |= 2; } | MAX_CONNECTIONS_PER_HOUR ULONG_NUM { Lex->mqh.connections=$2; Lex->mqh.bits |= 4; }; begin: Loading sql/structs.h +1 −1 Original line number Diff line number Diff line Loading @@ -163,7 +163,7 @@ typedef struct st_lex_user { typedef struct user_resources { uint questions, updates, connections; uint questions, updates, connections, bits; } USER_RESOURCES; typedef struct user_conn { Loading Loading
sql/sql_acl.cc +6 −6 Original line number Diff line number Diff line Loading @@ -652,11 +652,11 @@ static void acl_update_user(const char *user, const char *host, acl_user->host.hostname && !strcmp(host,acl_user->host.hostname)) { acl_user->access=privileges; if (mqh->questions) if (mqh->bits & 1) acl_user->user_resource.questions=mqh->questions; if (mqh->updates) if (mqh->bits & 2) acl_user->user_resource.updates=mqh->updates; if (mqh->connections) if (mqh->bits & 4) acl_user->user_resource.connections=mqh->connections; #ifdef HAVE_OPENSSL acl_user->ssl_type=ssl_type; Loading Loading @@ -1300,11 +1300,11 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo, #endif /* HAVE_OPENSSL */ USER_RESOURCES mqh = thd->lex.mqh; if (mqh.questions) if (mqh.bits & 1) table->field[28]->store((longlong) mqh.questions); if (mqh.updates) if (mqh.bits & 2) table->field[29]->store((longlong) mqh.updates); if (mqh.connections) if (mqh.bits & 4) table->field[30]->store((longlong) mqh.connections); mqh_used = mqh_used || mqh.questions || mqh.updates || mqh.connections; } Loading
sql/sql_parse.cc +1 −1 Original line number Diff line number Diff line Loading @@ -392,7 +392,7 @@ static void reset_mqh(THD *thd, LEX_USER *lu, bool get_them=false) if (lu) // for GRANT { USER_CONN *uc; volatile uint temp_len=lu->user.length+lu->host.length+2; uint temp_len=lu->user.length+lu->host.length+2; char temp_user[USERNAME_LENGTH+HOSTNAME_LENGTH+2]; memcpy(temp_user,lu->user.str,lu->user.length); Loading
sql/sql_yacc.yy +3 −0 Original line number Diff line number Diff line Loading @@ -3669,14 +3669,17 @@ grant_option: | MAX_QUERIES_PER_HOUR ULONG_NUM { Lex->mqh.questions=$2; Lex->mqh.bits |= 1; } | MAX_UPDATES_PER_HOUR ULONG_NUM { Lex->mqh.updates=$2; Lex->mqh.bits |= 2; } | MAX_CONNECTIONS_PER_HOUR ULONG_NUM { Lex->mqh.connections=$2; Lex->mqh.bits |= 4; }; begin: Loading
sql/structs.h +1 −1 Original line number Diff line number Diff line Loading @@ -163,7 +163,7 @@ typedef struct st_lex_user { typedef struct user_resources { uint questions, updates, connections; uint questions, updates, connections, bits; } USER_RESOURCES; typedef struct user_conn { Loading