200
200
ER(ER_WARN_DEPRECATED_SYNTAX), \
203
sql_print_warning("The syntax '%s' is deprecated and will be removed " \
204
"in a future release. Please use %s instead.", \
203
sql_print_warning("'%s' is deprecated and will be removed " \
204
"in a future release. Please use '%s' instead.", \
878
881
#include "item.h"
879
882
extern my_decimal decimal_zero;
885
bool str_set_decimal(uint mask, const my_decimal *val, uint fixed_prec,
886
uint fixed_dec, char filler, String *str,
888
inline bool str_set_decimal(const my_decimal *val, String *str,
891
return str_set_decimal(E_DEC_FATAL_ERROR, val, 0, 0, 0, str, cs);
881
894
/* sql_parse.cc */
882
895
void free_items(Item *item);
883
896
void cleanup_items(Item *item);
1211
1224
List<Item> &fields, List<Item> &all_fields, ORDER *order,
1212
1225
bool *hidden_group_fields);
1213
1226
bool fix_inner_refs(THD *thd, List<Item> &all_fields, SELECT_LEX *select,
1214
Item **ref_pointer_array);
1227
Item **ref_pointer_array, ORDER *group_list= NULL);
1216
1229
bool handle_select(THD *thd, LEX *lex, select_result *result,
1217
1230
ulong setup_tables_done_option);
1589
1602
return open_tables(thd, tables, counter, flags, &prelocking_strategy);
1591
1604
/* open_and_lock_tables with optional derived handling */
1592
bool open_and_lock_tables_derived(THD *thd, TABLE_LIST *tables,
1593
bool derived, uint flags,
1594
Prelocking_strategy *prelocking_strategy);
1595
inline bool open_and_lock_tables_derived(THD *thd, TABLE_LIST *tables,
1596
bool derived, uint flags)
1605
bool open_and_lock_tables(THD *thd, TABLE_LIST *tables,
1606
bool derived, uint flags,
1607
Prelocking_strategy *prelocking_strategy);
1608
inline bool open_and_lock_tables(THD *thd, TABLE_LIST *tables,
1609
bool derived, uint flags)
1598
1611
DML_prelocking_strategy prelocking_strategy;
1600
return open_and_lock_tables_derived(thd, tables, derived, flags,
1601
&prelocking_strategy);
1603
/* simple open_and_lock_tables without derived handling */
1604
inline bool simple_open_n_lock_tables(THD *thd, TABLE_LIST *tables)
1606
return open_and_lock_tables_derived(thd, tables, FALSE, 0);
1608
/* open_and_lock_tables with derived handling */
1609
inline bool open_and_lock_tables(THD *thd, TABLE_LIST *tables)
1611
return open_and_lock_tables_derived(thd, tables, TRUE, 0);
1613
return open_and_lock_tables(thd, tables, derived, flags,
1614
&prelocking_strategy);
1613
1616
/* simple open_and_lock_tables without derived handling for single table */
1614
1617
TABLE *open_n_lock_single_table(THD *thd, TABLE_LIST *table_l,
2014
2017
extern my_bool slave_allow_batching;
2015
2018
extern my_bool allow_slave_start;
2016
2019
extern LEX_CSTRING reason_slave_blocked;
2017
extern ulong slave_net_timeout, slave_trans_retries;
2020
extern ulong slave_trans_retries;
2021
extern uint slave_net_timeout;
2018
2022
extern ulong what_to_log,flush_time;
2019
2023
extern ulong query_buff_size;
2020
2024
extern ulong max_prepared_stmt_count, prepared_stmt_count;
2054
2058
#endif /* MYSQL_SERVER || INNODB_COMPATIBILITY_HOOKS */
2055
2059
#ifdef MYSQL_SERVER
2056
2060
extern bool opt_large_files, server_id_supplied;
2057
extern bool opt_update_log, opt_bin_log, opt_error_log;
2061
extern bool opt_bin_log, opt_error_log;
2058
2062
extern my_bool opt_log, opt_slow_log;
2059
2063
extern my_bool opt_backup_history_log;
2060
2064
extern my_bool opt_backup_progress_log;
2222
2226
#define MYSQL_OPEN_FORCE_SHARED_HIGH_PRIO_MDL 0x0800
2228
When opening or locking the table, use the maximum timeout
2229
(LONG_TIMEOUT = 1 year) rather than the user-supplied timeout value.
2231
#define MYSQL_LOCK_IGNORE_TIMEOUT 0x1000
2224
2233
/** Please refer to the internals manual. */
2225
2234
#define MYSQL_OPEN_REOPEN (MYSQL_LOCK_IGNORE_FLUSH |\
2226
2235
MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK |\
2227
2236
MYSQL_LOCK_IGNORE_GLOBAL_READ_ONLY |\
2237
MYSQL_LOCK_IGNORE_TIMEOUT |\
2228
2238
MYSQL_OPEN_GET_NEW_TABLE |\
2229
2239
MYSQL_OPEN_SKIP_TEMPORARY |\
2230
2240
MYSQL_OPEN_HAS_MDL_LOCK)
2296
2306
void get_date_from_daynr(long daynr,uint *year, uint *month,
2298
2308
my_time_t TIME_to_timestamp(THD *thd, const MYSQL_TIME *t, my_bool *not_exist);
2299
bool str_to_time_with_warn(const char *str,uint length,MYSQL_TIME *l_time);
2300
timestamp_type str_to_datetime_with_warn(const char *str, uint length,
2309
/* Character set-aware version of str_to_time() */
2310
bool str_to_time(CHARSET_INFO *cs, const char *str,uint length,
2311
MYSQL_TIME *l_time, int *warning);
2312
/* Character set-aware version of str_to_datetime() */
2313
timestamp_type str_to_datetime(CHARSET_INFO *cs,
2314
const char *str, uint length,
2315
MYSQL_TIME *l_time, uint flags, int *was_cut);
2316
bool str_to_time_with_warn(CHARSET_INFO *cs, const char *str,uint length,
2317
MYSQL_TIME *l_time);
2318
timestamp_type str_to_datetime_with_warn(CHARSET_INFO *cs,
2319
const char *str, uint length,
2301
2320
MYSQL_TIME *l_time, uint flags);
2302
2321
void localtime_to_TIME(MYSQL_TIME *to, struct tm *from);
2303
2322
void calc_time_from_sec(MYSQL_TIME *to, long seconds, long microseconds);