diff options
author | pem@mysql.com <> | 2004-05-26 17:04:45 +0200 |
---|---|---|
committer | pem@mysql.com <> | 2004-05-26 17:04:45 +0200 |
commit | 71eddc362e7d22b9922bad9d093819592208726b (patch) | |
tree | e4e5bb1f8b9718ec195b357c050b3dc3254b447d /sql/mysql_priv.h | |
parent | 350d8a215bb83518519a2c7c1bc218170bb6b8a9 (diff) | |
parent | 94c0611e6b1f7a1ee93facc31a2f2876cf664e7a (diff) | |
download | mariadb-git-71eddc362e7d22b9922bad9d093819592208726b.tar.gz |
Merging 4.1 to 5.0.
Diffstat (limited to 'sql/mysql_priv.h')
-rw-r--r-- | sql/mysql_priv.h | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 9cd4c65118d..f3a55e0cad7 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -323,6 +323,14 @@ void debug_sync_point(const char* lock_name, uint lock_timeout); #define WEEK_MONDAY_FIRST 1 #define WEEK_YEAR 2 #define WEEK_FIRST_WEEKDAY 4 +/* + Required buffer length for make_date, make_time, make_datetime + and TIME_to_string functions. Note, that the caller is still + responsible to check that given TIME structure has values + in valid ranges, otherwise size of the buffer could be not + enough. +*/ +#define MAX_DATE_REP_LENGTH 30 struct st_table; class THD; @@ -559,13 +567,10 @@ int mysql_alter_table(THD *thd, char *new_db, char *new_name, HA_CREATE_INFO *create_info, TABLE_LIST *table_list, List<create_field> &fields, - List<Key> &keys,List<Alter_drop> &drop_list, - List<Alter_column> &alter_list, - uint order_num, ORDER *order, uint alter_flags, + List<Key> &keys, + uint order_num, ORDER *order, enum enum_duplicates handle_duplicates, - enum enum_enable_or_disable keys_onoff=LEAVE_AS_IS, - enum tablespace_op_type tablespace_op=NO_TABLESPACE_OP, - bool simple_alter=0); + ALTER_INFO *alter_info); int mysql_create_like_table(THD *thd, TABLE_LIST *table, HA_CREATE_INFO *create_info, Table_ident *src_table); @@ -576,7 +581,7 @@ bool mysql_rename_table(enum db_type base, const char * new_name); int mysql_create_index(THD *thd, TABLE_LIST *table_list, List<Key> &keys); int mysql_drop_index(THD *thd, TABLE_LIST *table_list, - List<Alter_drop> &drop_list); + ALTER_INFO *alter_info); int mysql_prepare_update(THD *thd, TABLE_LIST *table_list, TABLE_LIST *update_table_list, Item **conds, uint order_num, ORDER *order); @@ -797,11 +802,12 @@ void mysql_print_status(THD *thd); int find_ref_key(TABLE *form,Field *field, uint *offset); void key_copy(byte *key,TABLE *form,uint index,uint key_length); void key_restore(TABLE *form,byte *key,uint index,uint key_length); -int key_cmp(TABLE *form,const byte *key,uint index,uint key_length); +bool key_cmp_if_same(TABLE *form,const byte *key,uint index,uint key_length); void key_unpack(String *to,TABLE *form,uint index); bool check_if_key_used(TABLE *table, uint idx, List<Item> &fields); -bool init_errmessage(void); +int key_cmp(KEY_PART_INFO *key_part, const byte *key, uint key_length); +bool init_errmessage(void); void sql_perror(const char *message); void sql_print_error(const char *format,...) __attribute__ ((format (printf, 1, 2))); @@ -900,7 +906,7 @@ extern uint protocol_version, mysqld_port, dropping_tables; extern uint delay_key_write_options, lower_case_table_names; extern bool opt_endinfo, using_udf_functions, locked_in_memory; extern bool opt_using_transactions, mysql_embedded; -extern bool using_update_log, opt_large_files; +extern bool using_update_log, opt_large_files, server_id_supplied; extern bool opt_log, opt_update_log, opt_bin_log, opt_slow_log, opt_error_log; extern bool opt_disable_networking, opt_skip_show_db; extern bool volatile abort_loop, shutdown_in_progress, grant_option; @@ -1041,9 +1047,17 @@ const char *get_date_time_format_str(KNOWN_DATE_TIME_FORMAT *format, timestamp_type type); extern bool make_date_time(DATE_TIME_FORMAT *format, TIME *l_time, timestamp_type type, String *str); -extern void make_time(DATE_TIME_FORMAT *format, TIME *l_time, String *str); -void make_date(DATE_TIME_FORMAT *format, TIME *l_time, String *str); -void make_datetime(DATE_TIME_FORMAT *format, TIME *l_time, String *str); +void make_datetime(const DATE_TIME_FORMAT *format, const TIME *l_time, + String *str); +void make_date(const DATE_TIME_FORMAT *format, const TIME *l_time, + String *str); +void make_time(const DATE_TIME_FORMAT *format, const TIME *l_time, + String *str); +void TIME_to_string(const TIME *time, String *str); +ulonglong TIME_to_ulonglong_datetime(const TIME *time); +ulonglong TIME_to_ulonglong_date(const TIME *time); +ulonglong TIME_to_ulonglong_time(const TIME *time); +ulonglong TIME_to_ulonglong(const TIME *time); int test_if_number(char *str,int *res,bool allow_wildcards); void change_byte(byte *,uint,char,char); |