diff options
Diffstat (limited to 'sql/structs.h')
-rw-r--r-- | sql/structs.h | 59 |
1 files changed, 46 insertions, 13 deletions
diff --git a/sql/structs.h b/sql/structs.h index 90924b842d6..77fed422d21 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -50,14 +50,14 @@ typedef struct st_keyfile_info { /* used with ha_info() */ typedef struct st_key_part_info { /* Info about a key part */ Field *field; uint offset; /* offset in record (from 0) */ - uint null_offset; // Offset to null_bit in record + uint null_offset; /* Offset to null_bit in record */ uint16 length; /* Length of key_part */ uint16 store_length; uint16 key_type; uint16 fieldnr; /* Fieldnum in UNIREG */ uint8 key_part_flag; /* 0 or HA_REVERSE_SORT */ uint8 type; - uint8 null_bit; // Position to null_bit + uint8 null_bit; /* Position to null_bit */ } KEY_PART_INFO ; @@ -67,6 +67,7 @@ typedef struct st_key { uint key_parts; /* How many key_parts */ uint extra_length; uint usable_key_parts; /* Should normally be = key_parts */ + enum ha_key_alg algorithm; KEY_PART_INFO *key_part; char *name; /* Name of key */ ulong *rec_per_key; /* Key part distribution */ @@ -105,7 +106,7 @@ typedef struct st_read_record { /* Parameter to read_record */ byte *record; byte *cache,*cache_pos,*cache_end,*read_positions; IO_CACHE *io_cache; - bool print_error; + bool print_error, ignore_not_found_rows; } READ_RECORD; enum timestamp_type { TIMESTAMP_NONE, TIMESTAMP_DATE, TIMESTAMP_FULL, @@ -123,17 +124,37 @@ typedef struct { } INTERVAL; -enum SHOW_TYPE { SHOW_LONG,SHOW_CHAR,SHOW_INT,SHOW_CHAR_PTR,SHOW_BOOL, - SHOW_MY_BOOL,SHOW_OPENTABLES,SHOW_STARTTIME,SHOW_QUESTION, - SHOW_LONG_CONST, SHOW_INT_CONST, SHOW_HAVE, SHOW_LONG_AS_LONGLONG}; +enum SHOW_TYPE +{ + SHOW_UNDEF, + SHOW_LONG, SHOW_LONGLONG, SHOW_INT, SHOW_CHAR, SHOW_CHAR_PTR, SHOW_BOOL, + SHOW_MY_BOOL, SHOW_OPENTABLES, SHOW_STARTTIME, SHOW_QUESTION, + SHOW_LONG_CONST, SHOW_INT_CONST, SHOW_HAVE, SHOW_SYS, SHOW_HA_ROWS, +#ifdef HAVE_OPENSSL + SHOW_SSL_CTX_SESS_ACCEPT, SHOW_SSL_CTX_SESS_ACCEPT_GOOD, + SHOW_SSL_GET_VERSION, SHOW_SSL_CTX_GET_SESSION_CACHE_MODE, + SHOW_SSL_CTX_SESS_CB_HITS, SHOW_SSL_CTX_SESS_ACCEPT_RENEGOTIATE, + SHOW_SSL_CTX_SESS_NUMBER, SHOW_SSL_SESSION_REUSED, + SHOW_SSL_CTX_SESS_GET_CACHE_SIZE, SHOW_SSL_GET_CIPHER, + SHOW_SSL_GET_DEFAULT_TIMEOUT, SHOW_SSL_GET_VERIFY_MODE, + SHOW_SSL_CTX_GET_VERIFY_MODE, SHOW_SSL_GET_VERIFY_DEPTH, + SHOW_SSL_CTX_GET_VERIFY_DEPTH, SHOW_SSL_CTX_SESS_CONNECT, + SHOW_SSL_CTX_SESS_CONNECT_RENEGOTIATE, SHOW_SSL_CTX_SESS_CONNECT_GOOD, + SHOW_SSL_CTX_SESS_HITS, SHOW_SSL_CTX_SESS_MISSES, + SHOW_SSL_CTX_SESS_TIMEOUTS, SHOW_SSL_CTX_SESS_CACHE_FULL, + SHOW_SSL_GET_CIPHER_LIST, +#endif /* HAVE_OPENSSL */ + SHOW_RPL_STATUS, SHOW_SLAVE_RUNNING +}; enum SHOW_COMP_OPTION { SHOW_OPTION_YES, SHOW_OPTION_NO, SHOW_OPTION_DISABLED}; +typedef int *(*update_var)(THD *, struct show_var_st *); -struct show_var_st { +typedef struct show_var_st { const char *name; char *value; SHOW_TYPE type; -}; +} SHOW_VAR; typedef struct lex_string { char *str; @@ -144,6 +165,17 @@ typedef struct st_lex_user { LEX_STRING user, host, password; } LEX_USER; + +typedef struct user_resources { + uint questions, updates, connections, bits; +} USER_RESOURCES; + +typedef struct user_conn { + char *user, *host; + uint len, connections, conn_per_hour, updates, questions, user_len; + USER_RESOURCES user_resources; + time_t intime; +} USER_CONN; /* 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 */ @@ -154,13 +186,14 @@ typedef struct st_lex_user { #define REG_MAY_BE_UPDATED 64 #define REG_AUTO_UPDATE 64 /* Used in D-forms for scroll-tables */ #define REG_OVERWRITE 128 -#define REG_SKIPP_DUPP 256 +#define REG_SKIP_DUP 256 /* Bits in form->status */ #define STATUS_NO_RECORD (1+2) /* Record isn't usably */ #define STATUS_GARBAGE 1 -#define STATUS_NOT_FOUND 2 /* No record in database when neaded */ +#define STATUS_NOT_FOUND 2 /* No record in database when needed */ #define STATUS_NO_PARENT 4 /* Parent record wasn't found */ #define STATUS_NOT_READ 8 /* Record isn't read */ #define STATUS_UPDATED 16 /* Record is updated by formula */ #define STATUS_NULL_ROW 32 /* table->null_row is set */ +#define STATUS_DELETED 64 |