~maria-captains/maria/mysql-6.0-backup

« back to all changes in this revision

Viewing changes to sql/mysql_priv.h

  • Committer: Thava Alagu
  • Date: 2010-03-11 19:18:17 UTC
  • mfrom: (3719.14.62 mysql-6.0-codebase)
  • Revision ID: thavamuni.alagu@sun.com-20100311191817-5nigmq884xo9fuut
Merge from mysql-6.0-codebase

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
                        ER(ER_WARN_DEPRECATED_SYNTAX),                      \
201
201
                        (Old), (New));                                      \
202
202
    else                                                                    \
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.",    \
205
205
                        (Old), (New));                                      \
206
206
  } while(0)
207
207
 
217
217
 
218
218
enum Derivation
219
219
{
220
 
  DERIVATION_IGNORABLE= 5,
 
220
  DERIVATION_IGNORABLE= 6,
 
221
  DERIVATION_NUMERIC= 5,
221
222
  DERIVATION_COERCIBLE= 4,
222
223
  DERIVATION_SYSCONST= 3,
223
224
  DERIVATION_IMPLICIT= 2,
225
226
  DERIVATION_EXPLICIT= 0
226
227
};
227
228
 
 
229
#define my_charset_numeric      my_charset_latin1
 
230
#define MY_REPERTOIRE_NUMERIC   MY_REPERTOIRE_ASCII
228
231
 
229
232
typedef struct my_locale_errmsgs
230
233
{
878
881
#include "item.h"
879
882
extern my_decimal decimal_zero;
880
883
 
 
884
/* my_decimal.cc */
 
885
bool str_set_decimal(uint mask, const my_decimal *val, uint fixed_prec,
 
886
                     uint fixed_dec, char filler, String *str,
 
887
                     CHARSET_INFO *cs);
 
888
inline bool str_set_decimal(const my_decimal *val, String *str,
 
889
                            CHARSET_INFO *cs)
 
890
{
 
891
  return str_set_decimal(E_DEC_FATAL_ERROR, val, 0, 0, 0, str, cs);
 
892
}
 
893
 
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);
1215
1228
 
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);
1590
1603
}
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)
1597
1610
{
1598
1611
  DML_prelocking_strategy prelocking_strategy;
1599
1612
 
1600
 
  return open_and_lock_tables_derived(thd, tables, derived, flags,
1601
 
                                      &prelocking_strategy);
1602
 
}
1603
 
/* simple open_and_lock_tables without derived handling */
1604
 
inline bool simple_open_n_lock_tables(THD *thd, TABLE_LIST *tables)
1605
 
{
1606
 
  return open_and_lock_tables_derived(thd, tables, FALSE, 0);
1607
 
}
1608
 
/* open_and_lock_tables with derived handling */
1609
 
inline bool open_and_lock_tables(THD *thd, TABLE_LIST *tables)
1610
 
{
1611
 
  return open_and_lock_tables_derived(thd, tables, TRUE, 0);
 
1613
  return open_and_lock_tables(thd, tables, derived, flags,
 
1614
                              &prelocking_strategy);
1612
1615
}
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;
2220
2224
  in parser.
2221
2225
*/
2222
2226
#define MYSQL_OPEN_FORCE_SHARED_HIGH_PRIO_MDL   0x0800
 
2227
/**
 
2228
  When opening or locking the table, use the maximum timeout
 
2229
  (LONG_TIMEOUT = 1 year) rather than the user-supplied timeout value.
 
2230
*/
 
2231
#define MYSQL_LOCK_IGNORE_TIMEOUT               0x1000
2223
2232
 
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,
2297
2307
                         uint *day);
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);
2741
2760
  OPT_SSL_CIPHER,
2742
2761
  OPT_SSL_KEY,
2743
2762
  OPT_WANT_CORE,
2744
 
  OPT_ENGINE_CONDITION_PUSHDOWN
 
2763
  OPT_ENGINE_CONDITION_PUSHDOWN,
 
2764
  OPT_LOG_ERROR
2745
2765
};
2746
2766
 
2747
2767
#endif /* MYSQL_SERVER */