YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
struct TABLE; class Type_handler; class Field; class Index_statistics; struct Lex_ident_cli_st;
class THD;
/* Array index type for table.field[] */ typedef uint16 field_index_t;
typedefstruct st_date_time_format {
uchar positions[8]; char time_separator; /* Separator between hour and minute */
uint flag; /* For future */
LEX_CSTRING format;
} DATE_TIME_FORMAT;
typedefstruct st_keyfile_info { /* used with ha_info() */
uchar ref[MAX_REFLENGTH]; /* Pointer to current row */
uchar dupp_ref[MAX_REFLENGTH]; /* Pointer to dupp row */
uint ref_length; /* Length of ref (1-8) */
uint block_size; /* index block size */
File filenr; /* (uniq) filenr for table */
ha_rows records; /* Records i datafilen */
ha_rows deleted; /* Deleted records */
ulonglong data_file_length; /* Length off data file */
ulonglong max_data_file_length; /* Length off data file */
ulonglong index_file_length;
ulonglong max_index_file_length;
ulonglong delete_length; /* Free bytes */
ulonglong auto_increment_value; int errkey,sortkey; /* Last errorkey and sorted by */
time_t create_time; /* When table was created */
time_t check_time;
time_t update_time;
ulong mean_rec_length; /* physical reclength */
} KEYFILE_INFO;
typedefstruct st_key_part_info { /* Info about a key part */
Field *field; /* the Field object for the indexed prefixoftheoriginaltableField.
NOT necessarily the original Field */
uint offset; /* Offset in record (from 0) */
uint null_offset; /* Offset to null_bit in record */ /* Length of key part in bytes, excluding NULL flag and length bytes */
uint length; /* Numberofbytesrequiredtostorethekeypartvalue.Thismaybe differentfromthe"length"fieldasitalsocounts -possibleNULL-flagbyte(seeHA_KEY_NULL_LENGTH) -possibleHA_KEY_BLOB_LENGTHbytesneededtostoreactualvaluelength.
*/
uint store_length;
uint16 key_type; /* Bitmap of FIELDFLAG_* flags */
field_index_t fieldnr; /* Fieldnr begins counting from 1 */
uint16 key_part_flag; /* 0 or HA_REVERSE_SORT */
uint8 type; /* One of HA_KEYTYPE_* values */
uint8 null_bit; /* Position to null_bit */
} KEY_PART_INFO ;
class engine_option_value; struct ha_index_option_struct;
typedefstruct st_key {
ulong flags; /* dupp key and pack flags */
ulong ext_key_flags; /* Flags for extended key */
ulong index_flags; /* Copy of handler->index_flags(index_number, 0, 1) */
uint key_length; /* total length of user defined key parts */
uint user_defined_key_parts; /* How many key_parts */
uint usable_key_parts; /* Should normally be = user_defined_key_parts */
uint ext_key_parts; /* Number of key parts in extended key */
uint block_size; /* Theflagisonifstatisticaldatafortheindexprefixes hastobetakenfromthesystemstatisticaltables.
*/ bool is_statistics_from_stat_tables; bool without_overlaps; bool is_ignored; // TRUE if index needs to be ignored
TABLE *table;
LEX_CSTRING comment; /** reference to the list of options or NULL */
engine_option_value *option_list;
ha_index_option_struct *option_struct; /* structure with parsed options */
typedefstruct st_reginfo { /* Extra info about reg */ struct st_join_table *join_tab; /* Used by SELECT() */ enum thr_lock_type lock_type; /* How database is used */ bool skip_locked; bool not_exists_optimize; /* TRUE<=>rangeoptimizerfoundthatthereisnorowssatisfying tableconditions.
*/ bool impossible_range;
} REGINFO;
/* Thisstructurespecifiesthemaximumamountofresourceswhich canbeconsumedbyeachaccount.Zerovalueofamembermeans thereisnolimit.
*/ typedefstruct user_resources { /* Maximum number of queries/statements per hour. */
uint questions; /* Maximumnumberofupdatingstatementsperhour(whichstatementsare updatingisdefinedbysql_command_flagsarray).
*/
uint updates; /* Maximum number of connections established per hour. */
uint conn_per_hour; /* Maximumnumberofconcurrentconnections.If-1thennonew connectionsallowed
*/ int user_conn; /* Max query timeout */ double max_statement_time;
/* Thisstructureisusedforcountingresourcesconsumedandforchecking themagainstspecifieduserlimits.
*/ typedefstruct user_conn { /* Pointertouser+hostkey(pairseparatedby'\0')definingtheentity forwhichresourcesarecounted(Bydefaultitisuseraccountthus priv_user/priv_hostpairisused.If--old-style-user-limitsoption isenabled,resourcesarecountedforeachuser+hostseparately).
*/ char *user; /* Pointer to host part of the key. */ char *host; /** Themomentoftimewhenperhourcounterswereresetlasttime (i.e.startof"hour"forconn_per_hour,updates,questionscounters).
*/
ulonglong reset_utime; /* Total length of the key. */
uint len; /* Current amount of concurrent connections for this account. */ int connections; /* Currentnumberofconnectionsperhour,numberofupdatingstatements perhourandtotalnumberofstatementsperhourforthisaccount.
*/
uint conn_per_hour, updates, questions; /* Maximum amount of resources which account is allowed to consume. */
USER_RESOURCES user_resources;
/* Bits in form->update */ #define REG_MAKE_DUPP 1U /* Make a copy of record when read */ #define REG_NEW_RECORD 2U /* Write a new record if not found */ #define REG_UPDATE 4U /* Uppdate record */ #define REG_DELETE 8U /* Delete found record */ #define REG_PROG 16U /* User is updating database */ #define REG_CLEAR_AFTER_WRITE 32U #define REG_MAY_BE_UPDATED 64U #define REG_AUTO_UPDATE 64U /* Used in D-forms for scroll-tables */ #define REG_OVERWRITE 128U #define REG_SKIP_DUP 256U
/* Bits in form->status */ #define STATUS_NO_RECORD (1U+2U) /* Record isn't usable */ #define STATUS_GARBAGE 1U #define STATUS_NOT_FOUND 2U /* No record in database when needed */ #define STATUS_NO_PARENT 4U /* Parent record wasn't found */ #define STATUS_NOT_READ 8U /* Record isn't read */ #define STATUS_UPDATED 16U /* Record is updated by formula */ #define STATUS_NULL_ROW 32U /* table->null_row is set */ #define STATUS_DELETED 64U
/* DDLoptions: -CREATEIFNOTEXISTS -DROPIFEXISTS -CREATELIKE -REPLACE
*/ struct DDL_options_st
{ public: enum Options
{
OPT_NONE= 0,
OPT_IF_NOT_EXISTS= 2, // CREATE TABLE IF NOT EXISTS
OPT_LIKE= 4, // CREATE TABLE LIKE
OPT_OR_REPLACE= 16, // CREATE OR REPLACE TABLE
OPT_OR_REPLACE_SLAVE_GENERATED= 32,// REPLACE was added on slave, it was // not in the original query on master.
OPT_IF_EXISTS= 64,
OPT_CREATE_SELECT= 128, // CREATE ... SELECT
OPT_IMPORT_TABLESPACE= 256// ALTER ... IMPORT TABLESPACE
};
struct Lex_for_loop_bounds_st
{ public: class sp_assignment_lex *m_index; // The first iteration value (or cursor) class sp_assignment_lex *m_target_bound; // The last iteration value
int8 m_direction; bool m_implicit_cursor; bool is_for_loop_cursor() const { return m_target_bound == NULL; }
};
class Lex_for_loop_bounds_intrange: public Lex_for_loop_bounds_st
{ public:
Lex_for_loop_bounds_intrange(int8 direction, class sp_assignment_lex *left_expr, class sp_assignment_lex *right_expr)
{
m_direction= direction;
m_index= direction > 0 ? left_expr : right_expr;
m_target_bound= direction > 0 ? right_expr : left_expr;
m_implicit_cursor= false;
}
};
struct Lex_for_loop_st
{ public: class sp_variable *m_index; // The first iteration value (or cursor) class sp_variable *m_target_bound; // The last iteration value int m_cursor_offset;
int8 m_direction; bool m_implicit_cursor; void init()
{
m_index= 0;
m_target_bound= 0;
m_cursor_offset= 0;
m_direction= 0;
m_implicit_cursor= false;
} bool is_for_loop_cursor() const { return m_target_bound == NULL; } bool is_for_loop_explicit_cursor() const
{ return is_for_loop_cursor() && !m_implicit_cursor;
}
};
class Lex_select_limit
{ public: /* explicit LIMIT clause was used */ bool explicit_limit; bool with_ties;
Item *select_limit, *offset_limit;
void clear()
{
explicit_limit= FALSE; // No explicit limit given by user
with_ties= FALSE; // No use of WITH TIES operator
select_limit= NULL; // denotes the default limit = HA_POS_ERROR
offset_limit= NULL; // denotes the default offset = 0
}
};
struct st_order;
class Load_data_param
{ protected:
CHARSET_INFO *m_charset; // Character set of the file
ulonglong m_fixed_length; // Sum of target field lengths for fixed format bool m_is_fixed_length; bool m_use_blobs; public:
Load_data_param(CHARSET_INFO *cs, bool is_fixed_length):
m_charset(cs),
m_fixed_length(0),
m_is_fixed_length(is_fixed_length),
m_use_blobs(false)
{ } bool add_outvar_field(THD *thd, const Field *field); bool add_outvar_user_var(THD *thd);
CHARSET_INFO *charset() const { return m_charset; } bool is_fixed_length() const { return m_is_fixed_length; } bool use_blobs() const { return m_use_blobs; }
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.