diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2002-02-01 15:40:38 +0200 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2002-02-01 15:40:38 +0200 |
commit | 6d862d0f70d6d677129348e331193af0ecc2af4b (patch) | |
tree | 3b8c3705772e21d6ace38591a0445f056030eed2 /sql | |
parent | 5b968bb8ee49008e8adfba898472b20b0cf0524f (diff) | |
download | mariadb-git-6d862d0f70d6d677129348e331193af0ecc2af4b.tar.gz |
Changes required for maximum queries per hour
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_acl.h | 1 | ||||
-rw-r--r-- | sql/sql_class.cc | 1 | ||||
-rw-r--r-- | sql/structs.h | 8 |
3 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_acl.h b/sql/sql_acl.h index 3b8616a660a..f118ac17789 100644 --- a/sql/sql_acl.h +++ b/sql/sql_acl.h @@ -82,3 +82,4 @@ bool check_grant_db(THD *thd,const char *db); uint get_table_grant(THD *thd, TABLE_LIST *table); uint get_column_grant(THD *thd, TABLE_LIST *table, Field *field); int mysql_show_grants(THD *thd, LEX_USER *user); +uint get_mqh(const char *user, const char *host); diff --git a/sql/sql_class.cc b/sql/sql_class.cc index fbab528dc67..795e7bcef00 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -141,6 +141,7 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0), (void (*)(void*)) free_var,0); #ifdef USING_TRANSACTIONS bzero((char*) &transaction,sizeof(transaction)); + user_connect=(UC *)0; if (opt_using_transactions) { if (open_cached_file(&transaction.trans_log, diff --git a/sql/structs.h b/sql/structs.h index e0f32ebbe43..9e577128c8d 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -160,6 +160,14 @@ typedef struct st_lex_user { LEX_STRING user, host, password; } LEX_USER; + +typedef struct user_conn { + char *user; + uint len, connections, questions, max_questions; + time_t intime; +} UC; + + /* Bits in form->update */ #define REG_MAKE_DUPP 1 /* Make a copy of record when read */ #define REG_NEW_RECORD 2 /* Write a new record if not found */ |