76
76
structures that have not been simplified away and embed more the one
79
typedef ulonglong nested_join_map;
79
typedef uint64_t nested_join_map;
82
typedef ulonglong query_id_t;
82
typedef uint64_t query_id_t;
83
83
extern query_id_t global_query_id;
85
85
/* increment query_id and return it. */
1000
1000
bool mysql_select(THD *thd, Item ***rref_pointer_array,
1001
1001
TABLE_LIST *tables, uint wild_num, List<Item> &list,
1002
1002
COND *conds, uint og_num, ORDER *order, ORDER *group,
1003
Item *having, ORDER *proc_param, ulonglong select_type,
1003
Item *having, ORDER *proc_param, uint64_t select_type,
1004
1004
select_result *result, SELECT_LEX_UNIT *unit,
1005
1005
SELECT_LEX *select_lex);
1006
1006
void free_underlaid_joins(THD *thd, SELECT_LEX *select);
1026
1026
int prepare_create_field(Create_field *sql_field,
1027
1027
uint *blob_columns,
1028
1028
int *timestamps, int *timestamps_with_niladic,
1029
longlong table_flags);
1029
int64_t table_flags);
1030
1030
bool mysql_create_table(THD *thd,const char *db, const char *table_name,
1031
1031
HA_CREATE_INFO *create_info,
1032
1032
Alter_info *alter_info,
1057
1057
enum enum_duplicates handle_duplicates, bool ignore);
1058
1058
bool mysql_multi_update(THD *thd, TABLE_LIST *table_list,
1059
1059
List<Item> *fields, List<Item> *values,
1060
COND *conds, ulonglong options,
1060
COND *conds, uint64_t options,
1061
1061
enum enum_duplicates handle_duplicates, bool ignore,
1062
1062
SELECT_LEX_UNIT *unit, SELECT_LEX *select_lex);
1063
1063
bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, TABLE *table,
1075
1075
void prepare_triggers_for_insert_stmt(TABLE *table);
1076
1076
int mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds);
1077
1077
bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
1078
SQL_LIST *order, ha_rows rows, ulonglong options,
1078
SQL_LIST *order, ha_rows rows, uint64_t options,
1079
1079
bool reset_auto_increment);
1080
1080
bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok);
1081
1081
bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create);
1582
1582
extern enum_field_types agg_field_type(Item **items, uint nitems);
1584
1584
/* strfunc.cc */
1585
ulonglong find_set(TYPELIB *lib, const char *x, uint length, CHARSET_INFO *cs,
1585
uint64_t find_set(TYPELIB *lib, const char *x, uint length, CHARSET_INFO *cs,
1586
1586
char **err_pos, uint *err_len, bool *set_warning);
1587
1587
uint find_type(const TYPELIB *lib, const char *find, uint length,
1588
1588
bool part_match);
1651
1651
extern char pidfile_name[FN_REFLEN], system_time_zone[30], *opt_init_file;
1652
1652
extern char log_error_file[FN_REFLEN], *opt_tc_log_file;
1653
1653
extern const double log_10[309];
1654
extern ulonglong log_10_int[20];
1655
extern ulonglong keybuff_size;
1656
extern ulonglong thd_startup_options;
1654
extern uint64_t log_10_int[20];
1655
extern uint64_t keybuff_size;
1656
extern uint64_t thd_startup_options;
1657
1657
extern ulong thread_id;
1658
1658
extern ulong binlog_cache_use, binlog_cache_disk_use;
1659
1659
extern ulong aborted_threads,aborted_connects;
1661
1661
extern ulong slow_launch_threads, slow_launch_time;
1662
1662
extern ulong table_cache_size, table_def_size;
1663
1663
extern ulong max_connections,max_connect_errors, connect_timeout;
1664
extern my_bool slave_allow_batching;
1664
extern bool slave_allow_batching;
1665
1665
extern ulong slave_net_timeout, slave_trans_retries;
1666
1666
extern uint max_user_connections;
1667
1667
extern ulong what_to_log,flush_time;
1681
1681
extern ulong expire_logs_days, sync_binlog_period, sync_binlog_counter;
1682
1682
extern ulong opt_tc_log_size, tc_log_max_pages_used, tc_log_page_size;
1683
1683
extern ulong tc_log_page_waits;
1684
extern my_bool relay_log_purge, opt_innodb_safe_binlog, opt_innodb;
1684
extern bool relay_log_purge;
1685
extern my_bool opt_innodb_safe_binlog, opt_innodb;
1685
1686
extern uint test_flags,select_errors,ha_open_options;
1686
1687
extern uint protocol_version, mysqld_port, dropping_tables;
1687
1688
extern uint delay_key_write_options;
1691
1692
#endif /* MYSQL_SERVER || INNODB_COMPATIBILITY_HOOKS */
1692
1693
#ifdef MYSQL_SERVER
1693
1694
extern bool opt_endinfo, using_udf_functions;
1694
extern my_bool locked_in_memory;
1695
extern bool locked_in_memory;
1695
1696
extern bool opt_using_transactions;
1696
1697
#endif /* MYSQL_SERVER */
1697
1698
#if defined MYSQL_SERVER || defined INNODB_COMPATIBILITY_HOOKS
1699
1700
#ifdef MYSQL_SERVER
1700
1701
extern bool using_update_log, server_id_supplied;
1701
1702
extern bool opt_update_log, opt_bin_log, opt_error_log;
1702
extern my_bool opt_log, opt_slow_log;
1703
extern bool opt_log;
1704
extern bool opt_slow_log;
1703
1705
extern ulong log_output_options;
1704
extern my_bool opt_log_queries_not_using_indexes;
1706
extern bool opt_log_queries_not_using_indexes;
1705
1707
extern bool opt_disable_networking, opt_skip_show_db;
1706
extern my_bool opt_character_set_client_handshake;
1708
extern bool opt_character_set_client_handshake;
1707
1709
extern bool volatile abort_loop, shutdown_in_progress;
1708
1710
extern uint volatile thread_count, thread_running, global_read_lock;
1709
1711
extern uint connection_count;
1710
extern my_bool opt_sql_bin_update, opt_safe_user_create, opt_no_mix_types;
1711
extern my_bool opt_safe_show_db, opt_local_infile, opt_myisam_use_mmap;
1712
extern my_bool opt_slave_compressed_protocol, use_temp_pool;
1712
extern bool opt_sql_bin_update;
1713
extern bool opt_safe_user_create;
1714
extern my_bool opt_no_mix_types;
1715
extern my_bool opt_safe_show_db, opt_myisam_use_mmap;
1716
extern bool opt_local_infile;
1717
extern bool opt_slave_compressed_protocol;
1718
extern bool use_temp_pool;
1713
1719
extern ulong slave_exec_mode_options;
1714
extern my_bool opt_readonly, lower_case_file_system;
1715
extern my_bool opt_enable_named_pipe, opt_sync_frm;
1716
extern my_bool opt_secure_auth;
1720
extern bool opt_readonly;
1721
extern bool lower_case_file_system;
1722
extern bool opt_enable_named_pipe;
1723
extern bool opt_sync_frm;
1724
extern bool opt_secure_auth;
1717
1725
extern char* opt_secure_file_priv;
1718
extern my_bool opt_log_slow_admin_statements, opt_log_slow_slave_statements;
1719
extern my_bool opt_noacl;
1720
extern my_bool opt_old_style_user_limits;
1726
extern bool opt_log_slow_admin_statements;
1727
extern bool opt_log_slow_slave_statements;
1728
extern bool opt_noacl;
1729
extern bool opt_old_style_user_limits;
1721
1730
extern uint opt_crash_binlog_innodb;
1722
1731
extern char *shared_memory_base_name;
1723
1732
extern my_bool opt_enable_shared_memory;
1896
1905
bool date_add_interval(MYSQL_TIME *ltime, interval_type int_type, INTERVAL interval);
1897
1906
bool calc_time_diff(MYSQL_TIME *l_time1, MYSQL_TIME *l_time2, int l_sign,
1898
longlong *seconds_out, long *microseconds_out);
1907
int64_t *seconds_out, long *microseconds_out);
1900
1909
extern LEX_STRING interval_type_to_name[];
1915
1924
void make_time(const DATE_TIME_FORMAT *format, const MYSQL_TIME *l_time,
1917
1926
int my_time_compare(MYSQL_TIME *a, MYSQL_TIME *b);
1918
ulonglong get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg,
1927
uint64_t get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg,
1919
1928
Item *warn_item, bool *is_null);
1921
1930
int test_if_number(char *str,int *res,bool allow_wildcards);
1932
1941
ha_rows *examined_rows);
1933
1942
void filesort_free_buffers(TABLE *table, bool full);
1934
1943
void change_double_for_sort(double nr,uchar *to);
1935
double my_double_round(double value, longlong dec, bool dec_unsigned,
1944
double my_double_round(double value, int64_t dec, bool dec_unsigned,
1936
1945
bool truncate);
1937
1946
int get_quick_record(SQL_SELECT *select);