diff options
Diffstat (limited to 'sql/structs.h')
-rw-r--r-- | sql/structs.h | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/sql/structs.h b/sql/structs.h index ee6a2ffdcfd..c2bdf6db747 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -56,7 +56,8 @@ 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 */ - uint16 length; /* Length of keypart value in bytes */ + /* Length of key part in bytes, excluding NULL flag and length bytes */ + uint16 length; /* Number of bytes required to store the keypart value. This may be different from the "length" field as it also counts @@ -78,7 +79,6 @@ typedef struct st_key { uint key_length; /* Tot length of key */ ulong flags; /* dupp key and pack flags */ uint key_parts; /* How many key_parts */ - uint extra_length; uint usable_key_parts; /* Should normally be = key_parts */ uint block_size; uint name_length; @@ -130,6 +130,21 @@ class SQL_SELECT; class THD; class handler; struct st_join_table; +class Copy_field; + +/** + A context for reading through a single table using a chosen access method: + index read, scan, etc, use of cache, etc. + + Use by: + READ_RECORD read_record; + init_read_record(&read_record, ...); + while (read_record.read_record()) + { + ... + } + end_read_record(); +*/ void rr_unlock_row(st_join_table *tab); @@ -137,7 +152,7 @@ struct READ_RECORD { /* Parameter to read_record */ typedef int (*Read_func)(READ_RECORD*); typedef void (*Unlock_row_func)(st_join_table *); struct st_table *table; /* Head-form */ - handler *file; + // handler *file_; struct st_table **forms; /* head and ref forms */ Read_func read_record; @@ -153,6 +168,12 @@ struct READ_RECORD { /* Parameter to read_record */ uchar *cache,*cache_pos,*cache_end,*read_positions; IO_CACHE *io_cache; bool print_error, ignore_not_found_rows; + /* + SJ-Materialization runtime may need to read fields from the materialized + table and unpack them into original table fields: + */ + Copy_field *copy_field; + Copy_field *copy_field_end; }; @@ -204,8 +225,11 @@ typedef struct user_resources { uint updates; /* Maximum number of connections established per hour. */ uint conn_per_hour; - /* Maximum number of concurrent connections. */ - uint user_conn; + /* + Maximum number of concurrent connections. If -1 then no new + connections allowed + */ + int user_conn; /* Values of this enum and specified_limits member are used by the parser to store which user limits were specified in GRANT statement. @@ -238,7 +262,7 @@ typedef struct user_conn { /* Total length of the key. */ uint len; /* Current amount of concurrent connections for this account. */ - uint connections; + int connections; /* Current number of connections per hour, number of updating statements per hour and total number of statements per hour for this account. |