diff options
author | unknown <monty@mysql.com> | 2004-09-09 07:26:28 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-09-09 07:26:28 +0300 |
commit | e18b7ea95942cb8ab0b31d453929dde50dcf3756 (patch) | |
tree | e2b882265e31ada44f3adec357920530f0c0ac31 /sql/mysql_priv.h | |
parent | c92b5349701ba68fa7ab97abf14933de8d6352fe (diff) | |
parent | 33efc9677d6f6a68d3dba69f4c036856ac4af5fe (diff) | |
download | mariadb-git-e18b7ea95942cb8ab0b31d453929dde50dcf3756.tar.gz |
Merge on pull
BitKeeper/etc/logging_ok:
auto-union
include/my_sys.h:
Auto merged
mysql-test/r/func_in.result:
Auto merged
Diffstat (limited to 'sql/mysql_priv.h')
-rw-r--r-- | sql/mysql_priv.h | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index a100aa0cd3a..73ac000d953 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -333,9 +333,17 @@ void debug_sync_point(const char* lock_name, uint lock_timeout); */ #define MAX_DATE_REP_LENGTH 30 +enum enum_parsing_place +{ + NO_MATTER, + IN_HAVING, + SELECT_LIST, + IN_WHERE +}; + struct st_table; class THD; -class Statement; +class Item_arena; /* Struct to handle simple linked lists */ @@ -414,6 +422,7 @@ int delete_precheck(THD *thd, TABLE_LIST *tables); int insert_precheck(THD *thd, TABLE_LIST *tables, bool update); int create_table_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *create_table); +Item *negate_expression(THD *thd, Item *expr); #include "sql_class.h" #include "opt_range.h" @@ -563,7 +572,8 @@ int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info, int mysql_create_table(THD *thd,const char *db, const char *table_name, HA_CREATE_INFO *create_info, List<create_field> &fields, List<Key> &keys, - bool tmp_table, bool no_log, uint select_field_count); + bool tmp_table, uint select_field_count); + TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, TABLE_LIST *create_table, List<create_field> *extra_fields, @@ -611,7 +621,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table,List<Item> &fields, int mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds); int mysql_delete(THD *thd, TABLE_LIST *table, COND *conds, SQL_LIST *order, ha_rows rows, ulong options); -int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok=0); +int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok); TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type update); TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT* mem, bool *refresh); @@ -841,8 +851,14 @@ 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))); + +void vprint_msg_to_log(enum loglevel level, const char *format, va_list args); +void sql_print_error(const char *format, ...); +void sql_print_warning(const char *format, ...); +void sql_print_information(const char *format, ...); + + + bool fn_format_relative_to_data_home(my_string to, const char *name, const char *dir, const char *extension); bool open_log(MYSQL_LOG *log, const char *hostname, @@ -894,7 +910,6 @@ extern Gt_creator gt_creator; extern Lt_creator lt_creator; extern Ge_creator ge_creator; extern Le_creator le_creator; -extern uchar *days_in_month; extern char language[LIBLEN],reg_ext[FN_EXTLEN]; extern char glob_hostname[FN_REFLEN], mysql_home[FN_REFLEN]; extern char pidfile_name[FN_REFLEN], system_time_zone[30], *opt_init_file; @@ -998,7 +1013,7 @@ extern struct my_option my_long_options[]; /* optional things, have_* variables */ extern SHOW_COMP_OPTION have_isam, have_innodb, have_berkeley_db; -extern SHOW_COMP_OPTION have_example_db, have_archive_db; +extern SHOW_COMP_OPTION have_example_db, have_archive_db, have_csv_db; extern SHOW_COMP_OPTION have_raid, have_openssl, have_symlink; extern SHOW_COMP_OPTION have_query_cache, have_berkeley_db, have_innodb; extern SHOW_COMP_OPTION have_geometry, have_rtree_keys; @@ -1023,8 +1038,10 @@ void mysql_lock_abort_for_thread(THD *thd, TABLE *table); MYSQL_LOCK *mysql_lock_merge(MYSQL_LOCK *a,MYSQL_LOCK *b); bool lock_global_read_lock(THD *thd); void unlock_global_read_lock(THD *thd); -bool wait_if_global_read_lock(THD *thd, bool abort_on_refresh); +bool wait_if_global_read_lock(THD *thd, bool abort_on_refresh, + bool is_not_commit); void start_waiting_global_read_lock(THD *thd); +void make_global_read_lock_block_commit(THD *thd); /* Lock based on name */ int lock_and_wait_for_table_name(THD *thd, TABLE_LIST *table_list); @@ -1062,12 +1079,9 @@ void free_blobs(TABLE *table); int set_zone(int nr,int min_zone,int max_zone); ulong convert_period_to_month(ulong period); ulong convert_month_to_period(ulong month); -long calc_daynr(uint year,uint month,uint day); uint calc_days_in_year(uint year); void get_date_from_daynr(long daynr,uint *year, uint *month, uint *day); -void init_time(void); -my_time_t my_system_gmt_sec(const TIME *, long *current_timezone, bool *not_exist); my_time_t TIME_to_timestamp(THD *thd, const TIME *t, bool *not_exist); bool str_to_time_with_warn(const char *str,uint length,TIME *l_time); timestamp_type str_to_datetime_with_warn(const char *str, uint length, |