compilation warnings on Windows
This commit is contained in:
parent
7714adaef8
commit
90b43902b0
@ -91,7 +91,7 @@ my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date,
|
||||
ulonglong flags, int *was_cut);
|
||||
enum enum_mysql_timestamp_type
|
||||
str_to_time(const char *str, uint length, MYSQL_TIME *l_time,
|
||||
ulong flag, int *warning);
|
||||
ulonglong flag, int *warning);
|
||||
enum enum_mysql_timestamp_type
|
||||
str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
|
||||
ulonglong flags, int *was_cut);
|
||||
|
@ -682,7 +682,7 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name,
|
||||
abstime.tv_sec++;
|
||||
diff_nsecs -= TIME_BILLION;
|
||||
}
|
||||
abstime.tv_nsec = diff_nsecs;
|
||||
abstime.tv_nsec = (long)diff_nsecs;
|
||||
|
||||
/* In semi-synchronous replication, we wait until the binlog-dump
|
||||
* thread has received the reply on the relevant binlog segment from the
|
||||
|
@ -489,7 +489,7 @@ err:
|
||||
|
||||
enum enum_mysql_timestamp_type
|
||||
str_to_time(const char *str, uint length, MYSQL_TIME *l_time,
|
||||
ulong fuzzydate, int *warning)
|
||||
ulonglong fuzzydate, int *warning)
|
||||
{
|
||||
ulong date[5];
|
||||
ulonglong value;
|
||||
|
@ -200,7 +200,7 @@ mysql_event_fill_row(THD *thd,
|
||||
TABLE *table,
|
||||
Event_parse_data *et,
|
||||
sp_head *sp,
|
||||
ulong sql_mode,
|
||||
ulonglong sql_mode,
|
||||
my_bool is_update)
|
||||
{
|
||||
CHARSET_INFO *scs= system_charset_info;
|
||||
@ -651,7 +651,7 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data,
|
||||
int ret= 1;
|
||||
TABLE *table= NULL;
|
||||
sp_head *sp= thd->lex->sphead;
|
||||
ulong saved_mode= thd->variables.sql_mode;
|
||||
ulonglong saved_mode= thd->variables.sql_mode;
|
||||
/*
|
||||
Take a savepoint to release only the lock on mysql.event
|
||||
table at the end but keep the global read lock and
|
||||
@ -768,7 +768,7 @@ Event_db_repository::update_event(THD *thd, Event_parse_data *parse_data,
|
||||
CHARSET_INFO *scs= system_charset_info;
|
||||
TABLE *table= NULL;
|
||||
sp_head *sp= thd->lex->sphead;
|
||||
ulong saved_mode= thd->variables.sql_mode;
|
||||
ulonglong saved_mode= thd->variables.sql_mode;
|
||||
/*
|
||||
Take a savepoint to release only the lock on mysql.event
|
||||
table at the end but keep the global read lock and
|
||||
@ -1052,7 +1052,7 @@ Event_db_repository::load_named_event(THD *thd, LEX_STRING dbname,
|
||||
LEX_STRING name, Event_basic *etn)
|
||||
{
|
||||
bool ret;
|
||||
ulong saved_mode= thd->variables.sql_mode;
|
||||
ulonglong saved_mode= thd->variables.sql_mode;
|
||||
Open_tables_backup open_tables_backup;
|
||||
TABLE_LIST event_table;
|
||||
|
||||
|
18
sql/field.cc
18
sql/field.cc
@ -1759,7 +1759,7 @@ uint Field::fill_cache_field(CACHE_FIELD *copy)
|
||||
}
|
||||
|
||||
|
||||
bool Field::get_date(MYSQL_TIME *ltime,uint fuzzydate)
|
||||
bool Field::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
|
||||
{
|
||||
char buff[40];
|
||||
String tmp(buff,sizeof(buff),&my_charset_bin),*res;
|
||||
@ -4251,7 +4251,7 @@ my_decimal *Field_real::val_decimal(my_decimal *decimal_value)
|
||||
}
|
||||
|
||||
|
||||
bool Field_real::get_date(MYSQL_TIME *ltime,uint fuzzydate)
|
||||
bool Field_real::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
|
||||
{
|
||||
ASSERT_COLUMN_MARKED_FOR_READ;
|
||||
double nr= val_real();
|
||||
@ -4637,7 +4637,7 @@ String *Field_timestamp::val_str(String *val_buffer, String *val_ptr)
|
||||
}
|
||||
|
||||
|
||||
bool Field_timestamp::get_date(MYSQL_TIME *ltime, uint fuzzydate)
|
||||
bool Field_timestamp::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
|
||||
{
|
||||
THD *thd= table->in_use;
|
||||
thd->time_zone_used= 1;
|
||||
@ -5182,7 +5182,7 @@ String *Field_time::val_str(String *val_buffer,
|
||||
DATE_FORMAT(time, "%l.%i %p")
|
||||
*/
|
||||
|
||||
bool Field_time::get_date(MYSQL_TIME *ltime, uint fuzzydate)
|
||||
bool Field_time::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
|
||||
{
|
||||
THD *thd= table->in_use;
|
||||
if (!(fuzzydate & (TIME_FUZZY_DATE|TIME_TIME_ONLY)))
|
||||
@ -5300,7 +5300,7 @@ String *Field_time_hires::val_str(String *str,
|
||||
return str;
|
||||
}
|
||||
|
||||
bool Field_time_hires::get_date(MYSQL_TIME *ltime, uint fuzzydate)
|
||||
bool Field_time_hires::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
|
||||
{
|
||||
uint32 len= pack_length();
|
||||
longlong packed= read_bigendian(ptr, len);
|
||||
@ -5480,7 +5480,7 @@ String *Field_year::val_str(String *val_buffer,
|
||||
}
|
||||
|
||||
|
||||
bool Field_year::get_date(MYSQL_TIME *ltime,uint fuzzydate)
|
||||
bool Field_year::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
|
||||
{
|
||||
int tmp= (int) ptr[0];
|
||||
if (tmp || field_length != 4)
|
||||
@ -5651,7 +5651,7 @@ String *Field_newdate::val_str(String *val_buffer,
|
||||
}
|
||||
|
||||
|
||||
bool Field_newdate::get_date(MYSQL_TIME *ltime,uint fuzzydate)
|
||||
bool Field_newdate::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
|
||||
{
|
||||
uint32 tmp=(uint32) uint3korr(ptr);
|
||||
ltime->day= tmp & 31;
|
||||
@ -5771,7 +5771,7 @@ String *Field_datetime::val_str(String *val_buffer,
|
||||
return val_buffer;
|
||||
}
|
||||
|
||||
bool Field_datetime::get_date(MYSQL_TIME *ltime, uint fuzzydate)
|
||||
bool Field_datetime::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
|
||||
{
|
||||
longlong tmp=Field_datetime::val_int();
|
||||
uint32 part1,part2;
|
||||
@ -5887,7 +5887,7 @@ String *Field_datetime_hires::val_str(String *str,
|
||||
return str;
|
||||
}
|
||||
|
||||
bool Field_datetime_hires::get_date(MYSQL_TIME *ltime, uint fuzzydate)
|
||||
bool Field_datetime_hires::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
|
||||
{
|
||||
ulonglong packed= read_bigendian(ptr, Field_datetime_hires::pack_length());
|
||||
unpack_time(sec_part_unshift(packed, dec), ltime);
|
||||
|
18
sql/field.h
18
sql/field.h
@ -526,7 +526,7 @@ public:
|
||||
}
|
||||
void copy_from_tmp(int offset);
|
||||
uint fill_cache_field(struct st_cache_field *copy);
|
||||
virtual bool get_date(MYSQL_TIME *ltime,uint fuzzydate);
|
||||
virtual bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
bool get_time(MYSQL_TIME *ltime) { return get_date(ltime, TIME_TIME_ONLY); }
|
||||
virtual CHARSET_INFO *charset(void) const { return &my_charset_bin; }
|
||||
virtual CHARSET_INFO *charset_for_protocol(void) const
|
||||
@ -792,7 +792,7 @@ public:
|
||||
Item_result result_type () const { return REAL_RESULT; }
|
||||
int store_decimal(const my_decimal *);
|
||||
int store_time_dec(MYSQL_TIME *ltime, uint dec);
|
||||
bool get_date(MYSQL_TIME *ltime,uint fuzzydate);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
uint32 max_display_length() { return field_length; }
|
||||
uint size_of() const { return sizeof(*this); }
|
||||
@ -1257,7 +1257,7 @@ public:
|
||||
{
|
||||
int4store(ptr,timestamp);
|
||||
}
|
||||
bool get_date(MYSQL_TIME *ltime,uint fuzzydate);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
timestamp_auto_set_type get_auto_set_type() const;
|
||||
uchar *pack(uchar *to, const uchar *from,
|
||||
uint max_length __attribute__((unused)))
|
||||
@ -1327,7 +1327,7 @@ public:
|
||||
double val_real(void);
|
||||
longlong val_int(void);
|
||||
String *val_str(String*,String *);
|
||||
bool get_date(MYSQL_TIME *ltime,uint fuzzydate);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
bool send_binary(Protocol *protocol);
|
||||
uint32 max_display_length() { return field_length; }
|
||||
void sql_type(String &str) const;
|
||||
@ -1420,7 +1420,7 @@ public:
|
||||
uint32 pack_length() const { return 3; }
|
||||
void sql_type(String &str) const;
|
||||
bool zero_pack() const { return 1; }
|
||||
bool get_date(MYSQL_TIME *ltime,uint fuzzydate);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
};
|
||||
|
||||
|
||||
@ -1443,7 +1443,7 @@ public:
|
||||
double val_real(void);
|
||||
longlong val_int(void);
|
||||
String *val_str(String*,String *);
|
||||
bool get_date(MYSQL_TIME *ltime, uint fuzzydate);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
bool send_binary(Protocol *protocol);
|
||||
int cmp(const uchar *,const uchar *);
|
||||
void sort_string(uchar *buff,uint length);
|
||||
@ -1476,7 +1476,7 @@ public:
|
||||
double val_real(void);
|
||||
String *val_str(String*,String *);
|
||||
int reset(void);
|
||||
bool get_date(MYSQL_TIME *ltime, uint fuzzydate);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
bool send_binary(Protocol *protocol);
|
||||
int cmp(const uchar *,const uchar *);
|
||||
void sort_string(uchar *buff,uint length);
|
||||
@ -1507,7 +1507,7 @@ public:
|
||||
uint32 pack_length() const { return 8; }
|
||||
void sql_type(String &str) const;
|
||||
bool zero_pack() const { return 1; }
|
||||
bool get_date(MYSQL_TIME *ltime,uint fuzzydate);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
uchar *pack(uchar* to, const uchar *from,
|
||||
uint max_length __attribute__((unused)))
|
||||
{
|
||||
@ -1548,7 +1548,7 @@ public:
|
||||
void sort_string(uchar *buff,uint length);
|
||||
uint32 pack_length() const;
|
||||
void sql_type(String &str) const;
|
||||
bool get_date(MYSQL_TIME *ltime,uint fuzzydate);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
uchar *pack(uchar *to, const uchar *from, uint max_length)
|
||||
{ return Field::pack(to, from, max_length); }
|
||||
const uchar *unpack(uchar* to, const uchar *from, uint param_data)
|
||||
|
@ -3323,7 +3323,7 @@ int ha_partition::write_row(uchar * buf)
|
||||
my_bitmap_map *old_map;
|
||||
THD *thd= ha_thd();
|
||||
timestamp_auto_set_type saved_timestamp_type= table->timestamp_field_type;
|
||||
ulong saved_sql_mode= thd->variables.sql_mode;
|
||||
ulonglong saved_sql_mode= thd->variables.sql_mode;
|
||||
bool saved_auto_inc_field_not_null= table->auto_increment_field_not_null;
|
||||
#ifdef NOT_NEEDED
|
||||
uchar *rec0= m_rec0;
|
||||
|
@ -4084,9 +4084,9 @@ int ha_init_key_cache(const char *name, KEY_CACHE *key_cache, void *unused
|
||||
mysql_mutex_lock(&LOCK_global_system_variables);
|
||||
size_t tmp_buff_size= (size_t) key_cache->param_buff_size;
|
||||
uint tmp_block_size= (uint) key_cache->param_block_size;
|
||||
uint division_limit= key_cache->param_division_limit;
|
||||
uint age_threshold= key_cache->param_age_threshold;
|
||||
uint partitions= key_cache->param_partitions;
|
||||
uint division_limit= (uint)key_cache->param_division_limit;
|
||||
uint age_threshold= (uint)key_cache->param_age_threshold;
|
||||
uint partitions= (uint)key_cache->param_partitions;
|
||||
mysql_mutex_unlock(&LOCK_global_system_variables);
|
||||
DBUG_RETURN(!init_key_cache(key_cache,
|
||||
tmp_block_size,
|
||||
@ -4110,8 +4110,8 @@ int ha_resize_key_cache(KEY_CACHE *key_cache)
|
||||
mysql_mutex_lock(&LOCK_global_system_variables);
|
||||
size_t tmp_buff_size= (size_t) key_cache->param_buff_size;
|
||||
long tmp_block_size= (long) key_cache->param_block_size;
|
||||
uint division_limit= key_cache->param_division_limit;
|
||||
uint age_threshold= key_cache->param_age_threshold;
|
||||
uint division_limit= (uint)key_cache->param_division_limit;
|
||||
uint age_threshold= (uint)key_cache->param_age_threshold;
|
||||
mysql_mutex_unlock(&LOCK_global_system_variables);
|
||||
DBUG_RETURN(!resize_key_cache(key_cache, tmp_block_size,
|
||||
tmp_buff_size,
|
||||
@ -4131,8 +4131,8 @@ int ha_change_key_cache_param(KEY_CACHE *key_cache)
|
||||
if (key_cache->key_cache_inited)
|
||||
{
|
||||
mysql_mutex_lock(&LOCK_global_system_variables);
|
||||
uint division_limit= key_cache->param_division_limit;
|
||||
uint age_threshold= key_cache->param_age_threshold;
|
||||
uint division_limit= (uint)key_cache->param_division_limit;
|
||||
uint age_threshold= (uint)key_cache->param_age_threshold;
|
||||
mysql_mutex_unlock(&LOCK_global_system_variables);
|
||||
change_key_cache_param(key_cache, division_limit, age_threshold);
|
||||
}
|
||||
@ -4152,9 +4152,9 @@ int ha_repartition_key_cache(KEY_CACHE *key_cache)
|
||||
mysql_mutex_lock(&LOCK_global_system_variables);
|
||||
size_t tmp_buff_size= (size_t) key_cache->param_buff_size;
|
||||
long tmp_block_size= (long) key_cache->param_block_size;
|
||||
uint division_limit= key_cache->param_division_limit;
|
||||
uint age_threshold= key_cache->param_age_threshold;
|
||||
uint partitions= key_cache->param_partitions;
|
||||
uint division_limit= (uint)key_cache->param_division_limit;
|
||||
uint age_threshold= (uint)key_cache->param_age_threshold;
|
||||
uint partitions= (uint)key_cache->param_partitions;
|
||||
mysql_mutex_unlock(&LOCK_global_system_variables);
|
||||
DBUG_RETURN(!repartition_key_cache(key_cache, tmp_block_size,
|
||||
tmp_buff_size,
|
||||
|
18
sql/item.cc
18
sql/item.cc
@ -1181,7 +1181,7 @@ bool Item_string::eq(const Item *item, bool binary_cmp) const
|
||||
As a extra convenience the time structure is reset on error or NULL values!
|
||||
*/
|
||||
|
||||
bool Item::get_date(MYSQL_TIME *ltime,uint fuzzydate)
|
||||
bool Item::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
|
||||
{
|
||||
if (field_type() == MYSQL_TYPE_TIME)
|
||||
fuzzydate|= TIME_TIME_ONLY;
|
||||
@ -2467,7 +2467,7 @@ String *Item_field::str_result(String *str)
|
||||
return result_field->val_str(str,&str_value);
|
||||
}
|
||||
|
||||
bool Item_field::get_date(MYSQL_TIME *ltime,uint fuzzydate)
|
||||
bool Item_field::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
|
||||
{
|
||||
if ((null_value=field->is_null()) || field->get_date(ltime,fuzzydate))
|
||||
{
|
||||
@ -2477,7 +2477,7 @@ bool Item_field::get_date(MYSQL_TIME *ltime,uint fuzzydate)
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool Item_field::get_date_result(MYSQL_TIME *ltime,uint fuzzydate)
|
||||
bool Item_field::get_date_result(MYSQL_TIME *ltime, ulonglong fuzzydate)
|
||||
{
|
||||
if (result_field->is_null() || result_field->get_date(ltime,fuzzydate))
|
||||
{
|
||||
@ -3395,7 +3395,7 @@ int Item_param::save_in_field(Field *field, bool no_conversions)
|
||||
}
|
||||
|
||||
|
||||
bool Item_param::get_date(MYSQL_TIME *res, uint fuzzydate)
|
||||
bool Item_param::get_date(MYSQL_TIME *res, ulonglong fuzzydate)
|
||||
{
|
||||
if (state == TIME_VALUE)
|
||||
{
|
||||
@ -4217,7 +4217,7 @@ String* Item_ref_null_helper::val_str(String* s)
|
||||
}
|
||||
|
||||
|
||||
bool Item_ref_null_helper::get_date(MYSQL_TIME *ltime, uint fuzzydate)
|
||||
bool Item_ref_null_helper::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
|
||||
{
|
||||
return (owner->was_null|= null_value= (*ref)->get_date(ltime, fuzzydate));
|
||||
}
|
||||
@ -7176,7 +7176,7 @@ bool Item_ref::is_null()
|
||||
}
|
||||
|
||||
|
||||
bool Item_ref::get_date(MYSQL_TIME *ltime,uint fuzzydate)
|
||||
bool Item_ref::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
|
||||
{
|
||||
return (null_value=(*ref)->get_date_result(ltime,fuzzydate));
|
||||
}
|
||||
@ -7313,7 +7313,7 @@ bool Item_direct_ref::is_null()
|
||||
}
|
||||
|
||||
|
||||
bool Item_direct_ref::get_date(MYSQL_TIME *ltime,uint fuzzydate)
|
||||
bool Item_direct_ref::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
|
||||
{
|
||||
return (null_value=(*ref)->get_date(ltime,fuzzydate));
|
||||
}
|
||||
@ -7675,7 +7675,7 @@ bool Item_cache_wrapper::is_null()
|
||||
Get the date value of the possibly cached item
|
||||
*/
|
||||
|
||||
bool Item_cache_wrapper::get_date(MYSQL_TIME *ltime, uint fuzzydate)
|
||||
bool Item_cache_wrapper::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
|
||||
{
|
||||
Item *cached_value;
|
||||
DBUG_ENTER("Item_cache_wrapper::get_date");
|
||||
@ -8734,7 +8734,7 @@ bool Item_cache_temporal::cache_value()
|
||||
}
|
||||
|
||||
|
||||
bool Item_cache_temporal::get_date(MYSQL_TIME *ltime, uint fuzzydate)
|
||||
bool Item_cache_temporal::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
|
||||
{
|
||||
ErrConvInteger str(value);
|
||||
|
||||
|
20
sql/item.h
20
sql/item.h
@ -1021,11 +1021,11 @@ public:
|
||||
/* Called for items that really have to be split */
|
||||
void split_sum_func2(THD *thd, Item **ref_pointer_array, List<Item> &fields,
|
||||
Item **ref, bool skip_registered);
|
||||
virtual bool get_date(MYSQL_TIME *ltime,uint fuzzydate);
|
||||
virtual bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
bool get_time(MYSQL_TIME *ltime)
|
||||
{ return get_date(ltime, TIME_TIME_ONLY | TIME_FUZZY_DATE); }
|
||||
bool get_seconds(ulonglong *sec, ulong *sec_part);
|
||||
virtual bool get_date_result(MYSQL_TIME *ltime,uint fuzzydate)
|
||||
virtual bool get_date_result(MYSQL_TIME *ltime, ulonglong fuzzydate)
|
||||
{ return get_date(ltime,fuzzydate); }
|
||||
/*
|
||||
The method allows to determine nullness of a complex expression
|
||||
@ -2018,8 +2018,8 @@ public:
|
||||
longlong val_int_endpoint(bool left_endp, bool *incl_endp);
|
||||
Field *get_tmp_table_field() { return result_field; }
|
||||
Field *tmp_table_field(TABLE *t_arg) { return result_field; }
|
||||
bool get_date(MYSQL_TIME *ltime,uint fuzzydate);
|
||||
bool get_date_result(MYSQL_TIME *ltime,uint fuzzydate);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
bool get_date_result(MYSQL_TIME *ltime,ulonglong fuzzydate);
|
||||
bool is_null() { return field->is_null(); }
|
||||
void update_null_value();
|
||||
Item *get_tmp_table_item(THD *thd);
|
||||
@ -2201,7 +2201,7 @@ public:
|
||||
longlong val_int();
|
||||
my_decimal *val_decimal(my_decimal*);
|
||||
String *val_str(String*);
|
||||
bool get_date(MYSQL_TIME *tm, uint fuzzydate);
|
||||
bool get_date(MYSQL_TIME *tm, ulonglong fuzzydate);
|
||||
int save_in_field(Field *field, bool no_conversions);
|
||||
|
||||
void set_null();
|
||||
@ -2817,7 +2817,7 @@ public:
|
||||
bool val_bool();
|
||||
String *val_str(String* tmp);
|
||||
bool is_null();
|
||||
bool get_date(MYSQL_TIME *ltime,uint fuzzydate);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
double val_result();
|
||||
longlong val_int_result();
|
||||
String *str_result(String* tmp);
|
||||
@ -2953,7 +2953,7 @@ public:
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
bool val_bool();
|
||||
bool is_null();
|
||||
bool get_date(MYSQL_TIME *ltime,uint fuzzydate);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
virtual Ref_Type ref_type() { return DIRECT_REF; }
|
||||
};
|
||||
|
||||
@ -3041,7 +3041,7 @@ public:
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
bool val_bool();
|
||||
bool is_null();
|
||||
bool get_date(MYSQL_TIME *ltime, uint fuzzydate);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
bool send(Protocol *protocol, String *buffer);
|
||||
void save_org_in_field(Field *field)
|
||||
{
|
||||
@ -3253,7 +3253,7 @@ public:
|
||||
String* val_str(String* s);
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
bool val_bool();
|
||||
bool get_date(MYSQL_TIME *ltime, uint fuzzydate);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
table_map used_tables() const;
|
||||
};
|
||||
@ -3877,7 +3877,7 @@ public:
|
||||
Item_cache_temporal(enum_field_types field_type_arg);
|
||||
String* val_str(String *str);
|
||||
bool cache_value();
|
||||
bool get_date(MYSQL_TIME *ltime, uint fuzzydate);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
int save_in_field(Field *field, bool no_conversions);
|
||||
void store_packed(longlong val_arg);
|
||||
/*
|
||||
|
@ -3141,7 +3141,7 @@ double Item_func_coalesce::real_op()
|
||||
}
|
||||
|
||||
|
||||
bool Item_func_coalesce::get_date(MYSQL_TIME *ltime,uint fuzzydate)
|
||||
bool Item_func_coalesce::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
|
||||
{
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
null_value= 0;
|
||||
|
@ -744,7 +744,7 @@ public:
|
||||
const char *func_name() const { return "coalesce"; }
|
||||
table_map not_null_tables() const { return 0; }
|
||||
enum_field_types field_type() const { return cached_field_type; }
|
||||
bool get_date(MYSQL_TIME *ltime,uint fuzzydate);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
};
|
||||
|
||||
|
||||
|
@ -2725,7 +2725,7 @@ void Item_func_min_max::fix_length_and_dec()
|
||||
0 Otherwise
|
||||
*/
|
||||
|
||||
bool Item_func_min_max::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
bool Item_func_min_max::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
||||
{
|
||||
longlong UNINIT_VAR(min_max);
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
|
@ -970,7 +970,7 @@ public:
|
||||
longlong val_int();
|
||||
String *val_str(String *);
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
bool get_date(MYSQL_TIME *res, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
void fix_length_and_dec();
|
||||
enum Item_result result_type () const { return cmp_type; }
|
||||
enum_field_types field_type() const { return cached_field_type; }
|
||||
|
@ -4399,7 +4399,7 @@ null:
|
||||
}
|
||||
|
||||
|
||||
bool Item_dyncol_get::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
bool Item_dyncol_get::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
||||
{
|
||||
DYNAMIC_COLUMN_VALUE val;
|
||||
char buff[STRING_BUFFER_USUAL_SIZE];
|
||||
|
@ -1025,7 +1025,7 @@ public:
|
||||
double val_real();
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
bool get_dyn_value(DYNAMIC_COLUMN_VALUE *val, String *tmp);
|
||||
bool get_date(MYSQL_TIME *ltime,uint fuzzydate);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
|
||||
void print(String *str, enum_query_type query_type);
|
||||
};
|
||||
|
||||
|
@ -105,7 +105,7 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
|
||||
timestamp_type cached_timestamp_type,
|
||||
const char **sub_pattern_end,
|
||||
const char *date_time_type,
|
||||
uint fuzzy_date)
|
||||
ulonglong fuzzy_date)
|
||||
{
|
||||
int weekday= 0, yearday= 0, daypart= 0;
|
||||
int week_number= -1;
|
||||
@ -1499,7 +1499,7 @@ double Item_temporal_func::val_real()
|
||||
}
|
||||
|
||||
|
||||
bool Item_func_from_days::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
bool Item_func_from_days::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
||||
{
|
||||
longlong value=args[0]->val_int();
|
||||
if (args[0]->null_value)
|
||||
@ -1557,7 +1557,7 @@ void Item_func_curdate_utc::store_now_in_TIME(MYSQL_TIME *now_time)
|
||||
|
||||
|
||||
bool Item_func_curdate::get_date(MYSQL_TIME *res,
|
||||
uint fuzzy_date __attribute__((unused)))
|
||||
ulonglong fuzzy_date __attribute__((unused)))
|
||||
{
|
||||
*res=ltime;
|
||||
return 0;
|
||||
@ -1576,7 +1576,7 @@ bool Item_func_curtime::fix_fields(THD *thd, Item **items)
|
||||
}
|
||||
|
||||
bool Item_func_curtime::get_date(MYSQL_TIME *res,
|
||||
uint fuzzy_date __attribute__((unused)))
|
||||
ulonglong fuzzy_date __attribute__((unused)))
|
||||
{
|
||||
*res= ltime;
|
||||
return 0;
|
||||
@ -1667,7 +1667,7 @@ void Item_func_now_utc::store_now_in_TIME(MYSQL_TIME *now_time)
|
||||
|
||||
|
||||
bool Item_func_now::get_date(MYSQL_TIME *res,
|
||||
uint fuzzy_date __attribute__((unused)))
|
||||
ulonglong fuzzy_date __attribute__((unused)))
|
||||
{
|
||||
*res= ltime;
|
||||
return 0;
|
||||
@ -1689,13 +1689,13 @@ void Item_func_sysdate_local::store_now_in_TIME(MYSQL_TIME *now_time)
|
||||
|
||||
|
||||
bool Item_func_sysdate_local::get_date(MYSQL_TIME *res,
|
||||
uint fuzzy_date __attribute__((unused)))
|
||||
ulonglong fuzzy_date __attribute__((unused)))
|
||||
{
|
||||
store_now_in_TIME(res);
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool Item_func_sec_to_time::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
bool Item_func_sec_to_time::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
||||
{
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
bool sign;
|
||||
@ -1922,7 +1922,7 @@ void Item_func_from_unixtime::fix_length_and_dec()
|
||||
|
||||
|
||||
bool Item_func_from_unixtime::get_date(MYSQL_TIME *ltime,
|
||||
uint fuzzy_date __attribute__((unused)))
|
||||
ulonglong fuzzy_date __attribute__((unused)))
|
||||
{
|
||||
bool sign;
|
||||
ulonglong sec;
|
||||
@ -1952,7 +1952,7 @@ void Item_func_convert_tz::fix_length_and_dec()
|
||||
|
||||
|
||||
bool Item_func_convert_tz::get_date(MYSQL_TIME *ltime,
|
||||
uint fuzzy_date __attribute__((unused)))
|
||||
ulonglong fuzzy_date __attribute__((unused)))
|
||||
{
|
||||
my_time_t my_time_tmp;
|
||||
String str;
|
||||
@ -2045,7 +2045,7 @@ void Item_date_add_interval::fix_length_and_dec()
|
||||
|
||||
/* Here arg[1] is a Item_interval object */
|
||||
|
||||
bool Item_date_add_interval::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
bool Item_date_add_interval::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
||||
{
|
||||
INTERVAL interval;
|
||||
|
||||
@ -2411,7 +2411,7 @@ void Item_char_typecast::fix_length_and_dec()
|
||||
}
|
||||
|
||||
|
||||
bool Item_time_typecast::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
bool Item_time_typecast::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
||||
{
|
||||
if (get_arg0_time(ltime))
|
||||
return 1;
|
||||
@ -2428,7 +2428,7 @@ bool Item_time_typecast::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
}
|
||||
|
||||
|
||||
bool Item_date_typecast::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
bool Item_date_typecast::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
||||
{
|
||||
if (get_arg0_date(ltime, TIME_FUZZY_DATE))
|
||||
return 1;
|
||||
@ -2449,7 +2449,7 @@ bool Item_date_typecast::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
}
|
||||
|
||||
|
||||
bool Item_datetime_typecast::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
bool Item_datetime_typecast::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
||||
{
|
||||
if (get_arg0_date(ltime, fuzzy_date & ~TIME_TIME_ONLY))
|
||||
return 1;
|
||||
@ -2494,7 +2494,7 @@ bool Item_datetime_typecast::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
0099-12-31
|
||||
*/
|
||||
|
||||
bool Item_func_makedate::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
bool Item_func_makedate::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
||||
{
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
long daynr= (long) args[1]->val_int();
|
||||
@ -2559,7 +2559,7 @@ void Item_func_add_time::fix_length_and_dec()
|
||||
Result: Time value or datetime value
|
||||
*/
|
||||
|
||||
bool Item_func_add_time::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
bool Item_func_add_time::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
||||
{
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
MYSQL_TIME l_time1, l_time2;
|
||||
@ -2664,7 +2664,7 @@ void Item_func_add_time::print(String *str, enum_query_type query_type)
|
||||
Result: Time value
|
||||
*/
|
||||
|
||||
bool Item_func_timediff::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
bool Item_func_timediff::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
||||
{
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
longlong seconds;
|
||||
@ -2727,7 +2727,7 @@ bool Item_func_timediff::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
Result: Time value
|
||||
*/
|
||||
|
||||
bool Item_func_maketime::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
bool Item_func_maketime::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
||||
{
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
bool overflow= 0;
|
||||
@ -3110,7 +3110,7 @@ void Item_func_str_to_date::fix_length_and_dec()
|
||||
}
|
||||
|
||||
|
||||
bool Item_func_str_to_date::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
bool Item_func_str_to_date::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
||||
{
|
||||
DATE_TIME_FORMAT date_time_format;
|
||||
char val_buff[64], format_buff[64];
|
||||
@ -3143,7 +3143,7 @@ bool Item_func_str_to_date::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
}
|
||||
|
||||
|
||||
bool Item_func_last_day::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
||||
bool Item_func_last_day::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
||||
{
|
||||
if (get_arg0_date(ltime, fuzzy_date & ~TIME_FUZZY_DATE) ||
|
||||
(ltime->month == 0))
|
||||
|
@ -498,7 +498,7 @@ public:
|
||||
String *val_str(String *str);
|
||||
longlong val_int();
|
||||
double val_real();
|
||||
bool get_date(MYSQL_TIME *res, uint fuzzy_date) { DBUG_ASSERT(0); return 1; }
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date) { DBUG_ASSERT(0); return 1; }
|
||||
my_decimal *val_decimal(my_decimal *decimal_value)
|
||||
{ return val_decimal_from_date(decimal_value); }
|
||||
Field *tmp_table_field(TABLE *table)
|
||||
@ -543,7 +543,7 @@ public:
|
||||
Item_timefunc::fix_length_and_dec();
|
||||
maybe_null= false;
|
||||
}
|
||||
bool get_date(MYSQL_TIME *res, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
/*
|
||||
Abstract method that defines which time zone is used for conversion.
|
||||
Converts time current time in my_time_t representation to broken-down
|
||||
@ -583,7 +583,7 @@ class Item_func_curdate :public Item_datefunc
|
||||
public:
|
||||
Item_func_curdate() :Item_datefunc() {}
|
||||
void fix_length_and_dec();
|
||||
bool get_date(MYSQL_TIME *res, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
virtual void store_now_in_TIME(MYSQL_TIME *now_time)=0;
|
||||
bool check_vcol_func_processor(uchar *int_arg)
|
||||
{
|
||||
@ -625,7 +625,7 @@ public:
|
||||
Item_temporal_func::fix_length_and_dec();
|
||||
maybe_null= false;
|
||||
}
|
||||
bool get_date(MYSQL_TIME *res, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
virtual void store_now_in_TIME(MYSQL_TIME *now_time)=0;
|
||||
bool check_vcol_func_processor(uchar *int_arg)
|
||||
{
|
||||
@ -664,7 +664,7 @@ public:
|
||||
bool const_item() const { return 0; }
|
||||
const char *func_name() const { return "sysdate"; }
|
||||
void store_now_in_TIME(MYSQL_TIME *now_time);
|
||||
bool get_date(MYSQL_TIME *res, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
void update_used_tables()
|
||||
{
|
||||
Item_func_now::update_used_tables();
|
||||
@ -679,7 +679,7 @@ class Item_func_from_days :public Item_datefunc
|
||||
public:
|
||||
Item_func_from_days(Item *a) :Item_datefunc(a) {}
|
||||
const char *func_name() const { return "from_days"; }
|
||||
bool get_date(MYSQL_TIME *res, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
|
||||
bool check_vcol_func_processor(uchar *int_arg) { return FALSE;}
|
||||
bool check_valid_arguments_processor(uchar *int_arg)
|
||||
@ -713,7 +713,7 @@ class Item_func_from_unixtime :public Item_temporal_func
|
||||
Item_func_from_unixtime(Item *a) :Item_temporal_func(a) {}
|
||||
const char *func_name() const { return "from_unixtime"; }
|
||||
void fix_length_and_dec();
|
||||
bool get_date(MYSQL_TIME *res, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
};
|
||||
|
||||
|
||||
@ -746,7 +746,7 @@ class Item_func_convert_tz :public Item_temporal_func
|
||||
Item_temporal_func(a, b, c), from_tz_cached(0), to_tz_cached(0) {}
|
||||
const char *func_name() const { return "convert_tz"; }
|
||||
void fix_length_and_dec();
|
||||
bool get_date(MYSQL_TIME *res, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
void cleanup();
|
||||
};
|
||||
|
||||
@ -755,7 +755,7 @@ class Item_func_sec_to_time :public Item_timefunc
|
||||
{
|
||||
public:
|
||||
Item_func_sec_to_time(Item *item) :Item_timefunc(item) {}
|
||||
bool get_date(MYSQL_TIME *res, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
void fix_length_and_dec()
|
||||
{
|
||||
decimals= args[0]->decimals;
|
||||
@ -776,7 +776,7 @@ public:
|
||||
const char *func_name() const { return "date_add_interval"; }
|
||||
void fix_length_and_dec();
|
||||
enum_field_types field_type() const { return cached_field_type; }
|
||||
bool get_date(MYSQL_TIME *res, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
bool eq(const Item *item, bool binary_cmp) const;
|
||||
void print(String *str, enum_query_type query_type);
|
||||
};
|
||||
@ -873,7 +873,7 @@ class Item_date_typecast :public Item_temporal_typecast
|
||||
public:
|
||||
Item_date_typecast(Item *a) :Item_temporal_typecast(a) {}
|
||||
const char *func_name() const { return "cast_as_date"; }
|
||||
bool get_date(MYSQL_TIME *ltime, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
const char *cast_type() const { return "date"; }
|
||||
enum_field_types field_type() const { return MYSQL_TYPE_DATE; }
|
||||
};
|
||||
@ -885,7 +885,7 @@ public:
|
||||
Item_time_typecast(Item *a, uint dec_arg)
|
||||
:Item_temporal_typecast(a) { decimals= dec_arg; }
|
||||
const char *func_name() const { return "cast_as_time"; }
|
||||
bool get_date(MYSQL_TIME *ltime, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
const char *cast_type() const { return "time"; }
|
||||
enum_field_types field_type() const { return MYSQL_TYPE_TIME; }
|
||||
};
|
||||
@ -899,7 +899,7 @@ public:
|
||||
const char *func_name() const { return "cast_as_datetime"; }
|
||||
const char *cast_type() const { return "datetime"; }
|
||||
enum_field_types field_type() const { return MYSQL_TYPE_DATETIME; }
|
||||
bool get_date(MYSQL_TIME *ltime, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
};
|
||||
|
||||
|
||||
@ -909,7 +909,7 @@ public:
|
||||
Item_func_makedate(Item *a,Item *b) :Item_temporal_func(a,b) {}
|
||||
const char *func_name() const { return "makedate"; }
|
||||
enum_field_types field_type() const { return MYSQL_TYPE_DATE; }
|
||||
bool get_date(MYSQL_TIME *ltime, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
};
|
||||
|
||||
|
||||
@ -924,7 +924,7 @@ public:
|
||||
:Item_temporal_func(a, b), is_date(type_arg) { sign= neg_arg ? -1 : 1; }
|
||||
enum_field_types field_type() const { return cached_field_type; }
|
||||
void fix_length_and_dec();
|
||||
bool get_date(MYSQL_TIME *ltime, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
void print(String *str, enum_query_type query_type);
|
||||
const char *func_name() const { return "add_time"; }
|
||||
};
|
||||
@ -940,7 +940,7 @@ public:
|
||||
decimals= max(args[0]->decimals, args[1]->decimals);
|
||||
Item_timefunc::fix_length_and_dec();
|
||||
}
|
||||
bool get_date(MYSQL_TIME *ltime, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
};
|
||||
|
||||
class Item_func_maketime :public Item_timefunc
|
||||
@ -950,7 +950,7 @@ public:
|
||||
:Item_timefunc(a, b, c)
|
||||
{}
|
||||
const char *func_name() const { return "maketime"; }
|
||||
bool get_date(MYSQL_TIME *ltime, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
};
|
||||
|
||||
|
||||
@ -1024,7 +1024,7 @@ public:
|
||||
Item_func_str_to_date(Item *a, Item *b)
|
||||
:Item_temporal_func(a, b), const_item(false)
|
||||
{}
|
||||
bool get_date(MYSQL_TIME *ltime, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
|
||||
const char *func_name() const { return "str_to_date"; }
|
||||
enum_field_types field_type() const { return cached_field_type; }
|
||||
void fix_length_and_dec();
|
||||
@ -1036,7 +1036,7 @@ class Item_func_last_day :public Item_datefunc
|
||||
public:
|
||||
Item_func_last_day(Item *a) :Item_datefunc(a) {}
|
||||
const char *func_name() const { return "last_day"; }
|
||||
bool get_date(MYSQL_TIME *res, uint fuzzy_date);
|
||||
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
|
||||
};
|
||||
|
||||
|
||||
|
12
sql/log.cc
12
sql/log.cc
@ -1334,7 +1334,7 @@ bool LOGGER::general_log_print(THD *thd, enum enum_server_command command,
|
||||
return general_log_write(thd, command, message_buff, message_buff_len);
|
||||
}
|
||||
|
||||
void LOGGER::init_error_log(uint error_log_printer)
|
||||
void LOGGER::init_error_log(ulonglong error_log_printer)
|
||||
{
|
||||
if (error_log_printer & LOG_NONE)
|
||||
{
|
||||
@ -1357,7 +1357,7 @@ void LOGGER::init_error_log(uint error_log_printer)
|
||||
}
|
||||
}
|
||||
|
||||
void LOGGER::init_slow_log(uint slow_log_printer)
|
||||
void LOGGER::init_slow_log(ulonglong slow_log_printer)
|
||||
{
|
||||
if (slow_log_printer & LOG_NONE)
|
||||
{
|
||||
@ -1382,7 +1382,7 @@ void LOGGER::init_slow_log(uint slow_log_printer)
|
||||
}
|
||||
}
|
||||
|
||||
void LOGGER::init_general_log(uint general_log_printer)
|
||||
void LOGGER::init_general_log(ulonglong general_log_printer)
|
||||
{
|
||||
if (general_log_printer & LOG_NONE)
|
||||
{
|
||||
@ -1495,9 +1495,9 @@ bool Log_to_csv_event_handler::init()
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LOGGER::set_handlers(uint error_log_printer,
|
||||
uint slow_log_printer,
|
||||
uint general_log_printer)
|
||||
int LOGGER::set_handlers(ulonglong error_log_printer,
|
||||
ulonglong slow_log_printer,
|
||||
ulonglong general_log_printer)
|
||||
{
|
||||
/* error log table is not supported yet */
|
||||
DBUG_ASSERT(error_log_printer < LOG_TABLE);
|
||||
|
12
sql/log.h
12
sql/log.h
@ -818,12 +818,12 @@ public:
|
||||
const char *query, uint query_length);
|
||||
|
||||
/* we use this function to setup all enabled log event handlers */
|
||||
int set_handlers(uint error_log_printer,
|
||||
uint slow_log_printer,
|
||||
uint general_log_printer);
|
||||
void init_error_log(uint error_log_printer);
|
||||
void init_slow_log(uint slow_log_printer);
|
||||
void init_general_log(uint general_log_printer);
|
||||
int set_handlers(ulonglong error_log_printer,
|
||||
ulonglong slow_log_printer,
|
||||
ulonglong general_log_printer);
|
||||
void init_error_log(ulonglong error_log_printer);
|
||||
void init_slow_log(ulonglong slow_log_printer);
|
||||
void init_general_log(ulonglong general_log_printer);
|
||||
void deactivate_log_handler(THD* thd, uint log_type);
|
||||
bool activate_log_handler(THD* thd, uint log_type);
|
||||
MYSQL_QUERY_LOG *get_slow_log_file_handler() const
|
||||
|
@ -2875,7 +2875,7 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg,
|
||||
else
|
||||
cache_type= Log_event::EVENT_STMT_CACHE;
|
||||
DBUG_ASSERT(cache_type != Log_event::EVENT_INVALID_CACHE);
|
||||
DBUG_PRINT("info",("Query_log_event has flags2: %lu sql_mode: %lu",
|
||||
DBUG_PRINT("info",("Query_log_event has flags2: %lu sql_mode: %llu",
|
||||
(ulong) flags2, sql_mode));
|
||||
}
|
||||
#endif /* MYSQL_CLIENT */
|
||||
@ -8222,7 +8222,7 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
|
||||
Don't allow generation of auto_increment value when processing
|
||||
rows event by setting 'MODE_NO_AUTO_VALUE_ON_ZERO'.
|
||||
*/
|
||||
ulong saved_sql_mode= thd->variables.sql_mode;
|
||||
ulonglong saved_sql_mode= thd->variables.sql_mode;
|
||||
thd->variables.sql_mode= MODE_NO_AUTO_VALUE_ON_ZERO;
|
||||
|
||||
// row processing loop
|
||||
|
@ -690,7 +690,7 @@ typedef struct st_print_event_info
|
||||
bool flags2_inited;
|
||||
uint32 flags2;
|
||||
bool sql_mode_inited;
|
||||
ulong sql_mode; /* must be same as THD.variables.sql_mode */
|
||||
ulonglong sql_mode; /* must be same as THD.variables.sql_mode */
|
||||
ulong auto_increment_increment, auto_increment_offset;
|
||||
bool charset_inited;
|
||||
char charset[6]; // 3 variables, each of them storable in 2 bytes
|
||||
@ -1754,7 +1754,7 @@ public:
|
||||
|
||||
uint32 flags2;
|
||||
/* In connections sql_mode is 32 bits now but will be 64 bits soon */
|
||||
ulong sql_mode;
|
||||
ulonglong sql_mode;
|
||||
ulong auto_increment_increment, auto_increment_offset;
|
||||
char charset[6];
|
||||
uint time_zone_len; /* 0 means uninited */
|
||||
|
@ -474,9 +474,9 @@ ulong slave_exec_mode_options;
|
||||
ulonglong slave_type_conversions_options;
|
||||
ulong thread_cache_size=0;
|
||||
ulong binlog_cache_size=0;
|
||||
ulonglong max_binlog_cache_size=0;
|
||||
ulong max_binlog_cache_size=0;
|
||||
ulong binlog_stmt_cache_size=0;
|
||||
ulonglong max_binlog_stmt_cache_size=0;
|
||||
ulong max_binlog_stmt_cache_size=0;
|
||||
ulong query_cache_size=0;
|
||||
ulong refresh_version; /* Increments on each reload */
|
||||
query_id_t global_query_id;
|
||||
@ -2209,7 +2209,7 @@ static void network_init(void)
|
||||
extra_ip_sock= activate_tcp_port(mysqld_extra_port);
|
||||
}
|
||||
|
||||
#ifdef __NT__
|
||||
#ifdef _WIN32
|
||||
/* create named pipe */
|
||||
if (Service.IsNT() && mysqld_unix_port[0] && !opt_bootstrap &&
|
||||
opt_enable_named_pipe)
|
||||
@ -5106,6 +5106,7 @@ int mysqld_main(int argc, char **argv)
|
||||
}
|
||||
#endif
|
||||
mysqld_exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* !EMBEDDED_LIBRARY */
|
||||
|
@ -166,7 +166,7 @@ extern ulong what_to_log,flush_time;
|
||||
extern ulong max_prepared_stmt_count, prepared_stmt_count;
|
||||
extern ulong open_files_limit;
|
||||
extern ulong binlog_cache_size, binlog_stmt_cache_size;
|
||||
extern ulonglong max_binlog_cache_size, max_binlog_stmt_cache_size;
|
||||
extern ulong max_binlog_cache_size, max_binlog_stmt_cache_size;
|
||||
extern ulong max_binlog_size, max_relay_log_size;
|
||||
extern ulong opt_binlog_rows_event_max_size;
|
||||
extern ulong rpl_recovery_rank, thread_cache_size;
|
||||
|
@ -2088,7 +2088,7 @@ bool partition_info::fix_column_value_functions(THD *thd,
|
||||
{
|
||||
uchar *val_ptr;
|
||||
uint len= field->pack_length();
|
||||
ulong save_sql_mode;
|
||||
ulonglong save_sql_mode;
|
||||
bool save_got_warning;
|
||||
|
||||
if (!(column_item= get_column_item(column_item,
|
||||
|
@ -305,8 +305,8 @@ int sql_set_variables(THD *thd, List<set_var_base> *var_list);
|
||||
|
||||
bool fix_delay_key_write(sys_var *self, THD *thd, enum_var_type type);
|
||||
|
||||
ulong expand_sql_mode(ulonglong sql_mode);
|
||||
bool sql_mode_string_representation(THD *thd, ulong sql_mode, LEX_STRING *ls);
|
||||
ulonglong expand_sql_mode(ulonglong sql_mode);
|
||||
bool sql_mode_string_representation(THD *thd, ulonglong sql_mode, LEX_STRING *ls);
|
||||
|
||||
extern sys_var *Sys_autocommit_ptr;
|
||||
|
||||
|
19
sql/sp.cc
19
sql/sp.cc
@ -42,11 +42,11 @@ create_string(THD *thd, String *buf,
|
||||
st_sp_chistics *chistics,
|
||||
const LEX_STRING *definer_user,
|
||||
const LEX_STRING *definer_host,
|
||||
ulong sql_mode);
|
||||
ulonglong sql_mode);
|
||||
|
||||
static int
|
||||
db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
|
||||
ulong sql_mode, const char *params, const char *returns,
|
||||
ulonglong sql_mode, const char *params, const char *returns,
|
||||
const char *body, st_sp_chistics &chistics,
|
||||
const char *definer, longlong created, longlong modified,
|
||||
Stored_program_creation_ctx *creation_ctx);
|
||||
@ -541,7 +541,7 @@ db_find_routine(THD *thd, int type, sp_name *name, sp_head **sphp)
|
||||
char buff[65];
|
||||
String str(buff, sizeof(buff), &my_charset_bin);
|
||||
bool saved_time_zone_used= thd->time_zone_used;
|
||||
ulong sql_mode, saved_mode= thd->variables.sql_mode;
|
||||
ulonglong sql_mode, saved_mode= thd->variables.sql_mode;
|
||||
Open_tables_backup open_tables_state_backup;
|
||||
Stored_program_creation_ctx *creation_ctx;
|
||||
|
||||
@ -715,11 +715,11 @@ Silence_deprecated_warning::handle_condition(
|
||||
@retval 0 error
|
||||
*/
|
||||
|
||||
static sp_head *sp_compile(THD *thd, String *defstr, ulong sql_mode,
|
||||
static sp_head *sp_compile(THD *thd, String *defstr, ulonglong sql_mode,
|
||||
Stored_program_creation_ctx *creation_ctx)
|
||||
{
|
||||
sp_head *sp;
|
||||
ulong old_sql_mode= thd->variables.sql_mode;
|
||||
ulonglong old_sql_mode= thd->variables.sql_mode;
|
||||
ha_rows old_select_limit= thd->variables.select_limit;
|
||||
sp_rcontext *old_spcont= thd->spcont;
|
||||
Silence_deprecated_warning warning_handler;
|
||||
@ -760,7 +760,7 @@ static sp_head *sp_compile(THD *thd, String *defstr, ulong sql_mode,
|
||||
|
||||
static int
|
||||
db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
|
||||
ulong sql_mode, const char *params, const char *returns,
|
||||
ulonglong sql_mode, const char *params, const char *returns,
|
||||
const char *body, st_sp_chistics &chistics,
|
||||
const char *definer, longlong created, longlong modified,
|
||||
Stored_program_creation_ctx *creation_ctx)
|
||||
@ -923,7 +923,7 @@ sp_create_routine(THD *thd, int type, sp_head *sp)
|
||||
int ret;
|
||||
TABLE *table;
|
||||
char definer[USER_HOST_BUFF_SIZE];
|
||||
ulong saved_mode= thd->variables.sql_mode;
|
||||
ulonglong saved_mode= thd->variables.sql_mode;
|
||||
MDL_key::enum_mdl_namespace mdl_type= type == TYPE_ENUM_FUNCTION ?
|
||||
MDL_key::FUNCTION : MDL_key::PROCEDURE;
|
||||
|
||||
@ -2079,7 +2079,6 @@ int sp_cache_routine(THD *thd, int type, sp_name *name,
|
||||
Returns TRUE on success, FALSE on (alloc) failure.
|
||||
*/
|
||||
static bool
|
||||
|
||||
create_string(THD *thd, String *buf,
|
||||
int type,
|
||||
const char *db, ulong dblen,
|
||||
@ -2090,9 +2089,9 @@ create_string(THD *thd, String *buf,
|
||||
st_sp_chistics *chistics,
|
||||
const LEX_STRING *definer_user,
|
||||
const LEX_STRING *definer_host,
|
||||
ulong sql_mode)
|
||||
ulonglong sql_mode)
|
||||
{
|
||||
ulong old_sql_mode= thd->variables.sql_mode;
|
||||
ulonglong old_sql_mode= thd->variables.sql_mode;
|
||||
/* Make some room to begin with */
|
||||
if (buf->alloc(100 + dblen + 1 + namelen + paramslen + returnslen + bodylen +
|
||||
chistics->comment.length + 10 /* length of " DEFINER= "*/ +
|
||||
|
@ -1194,7 +1194,7 @@ sp_head::execute(THD *thd, bool merge_da_on_success)
|
||||
sp_rcontext *ctx= thd->spcont;
|
||||
bool err_status= FALSE;
|
||||
uint ip= 0;
|
||||
ulong save_sql_mode;
|
||||
ulonglong save_sql_mode;
|
||||
bool save_abort_on_warning;
|
||||
Query_arena *old_arena;
|
||||
/* per-instruction arena */
|
||||
@ -2476,7 +2476,7 @@ sp_head::do_cont_backpatch()
|
||||
|
||||
void
|
||||
sp_head::set_info(longlong created, longlong modified,
|
||||
st_sp_chistics *chistics, ulong sql_mode)
|
||||
st_sp_chistics *chistics, ulonglong sql_mode)
|
||||
{
|
||||
m_created= created;
|
||||
m_modified= modified;
|
||||
|
@ -172,7 +172,7 @@ public:
|
||||
|
||||
const char *m_tmp_query; ///< Temporary pointer to sub query string
|
||||
st_sp_chistics *m_chistics;
|
||||
ulong m_sql_mode; ///< For SHOW CREATE and execution
|
||||
ulonglong m_sql_mode; ///< For SHOW CREATE and execution
|
||||
LEX_STRING m_qname; ///< db.name
|
||||
bool m_explicit_name; ///< Prepend the db name? */
|
||||
LEX_STRING m_db;
|
||||
@ -394,7 +394,7 @@ public:
|
||||
Create_field *field_def);
|
||||
|
||||
void set_info(longlong created, longlong modified,
|
||||
st_sp_chistics *chistics, ulong sql_mode);
|
||||
st_sp_chistics *chistics, ulonglong sql_mode);
|
||||
|
||||
void set_definer(const char *definer, uint definerlen);
|
||||
void set_definer(const LEX_STRING *user_name, const LEX_STRING *host_name);
|
||||
|
@ -740,7 +740,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
|
||||
bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE;
|
||||
char tmp_name[SAFE_NAME_LEN+1];
|
||||
int password_length;
|
||||
ulong old_sql_mode= thd->variables.sql_mode;
|
||||
ulonglong old_sql_mode= thd->variables.sql_mode;
|
||||
DBUG_ENTER("acl_load");
|
||||
|
||||
thd->variables.sql_mode&= ~MODE_PAD_CHAR_TO_FULL_LENGTH;
|
||||
@ -4307,7 +4307,7 @@ static my_bool grant_load(THD *thd, TABLE_LIST *tables)
|
||||
bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE;
|
||||
MEM_ROOT **save_mem_root_ptr= my_pthread_getspecific_ptr(MEM_ROOT**,
|
||||
THR_MALLOC);
|
||||
ulong old_sql_mode= thd->variables.sql_mode;
|
||||
ulonglong old_sql_mode= thd->variables.sql_mode;
|
||||
DBUG_ENTER("grant_load");
|
||||
|
||||
thd->variables.sql_mode&= ~MODE_PAD_CHAR_TO_FULL_LENGTH;
|
||||
@ -6541,7 +6541,7 @@ bool mysql_drop_user(THD *thd, List <LEX_USER> &list)
|
||||
List_iterator <LEX_USER> user_list(list);
|
||||
TABLE_LIST tables[GRANT_TABLES];
|
||||
bool some_users_deleted= FALSE;
|
||||
ulong old_sql_mode= thd->variables.sql_mode;
|
||||
ulonglong old_sql_mode= thd->variables.sql_mode;
|
||||
bool save_binlog_row_based;
|
||||
DBUG_ENTER("mysql_drop_user");
|
||||
|
||||
|
@ -1422,7 +1422,7 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
|
||||
DBUG_PRINT("qcache", ("\
|
||||
long %d, 4.1: %d, bin_proto: %d, more results %d, pkt_nr: %d, \
|
||||
CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \
|
||||
sql mode: 0x%lx, sort len: %lu, conncat len: %lu, div_precision: %lu, \
|
||||
sql mode: 0x%llx, sort len: %lu, conncat len: %lu, div_precision: %lu, \
|
||||
def_week_frmt: %lu, in_trans: %d, autocommit: %d",
|
||||
(int)flags.client_long_flag,
|
||||
(int)flags.client_protocol_41,
|
||||
@ -1824,7 +1824,7 @@ Query_cache::send_result_to_client(THD *thd, char *org_sql, uint query_length)
|
||||
DBUG_PRINT("qcache", ("\
|
||||
long %d, 4.1: %d, bin_proto: %d, more results %d, pkt_nr: %d, \
|
||||
CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \
|
||||
sql mode: 0x%lx, sort len: %lu, conncat len: %lu, div_precision: %lu, \
|
||||
sql mode: 0x%llx, sort len: %lu, conncat len: %lu, div_precision: %lu, \
|
||||
def_week_frmt: %lu, in_trans: %d, autocommit: %d",
|
||||
(int)flags.client_long_flag,
|
||||
(int)flags.client_protocol_41,
|
||||
|
@ -537,7 +537,7 @@ struct Query_cache_query_flags
|
||||
uint collation_connection_num;
|
||||
ha_rows limit;
|
||||
Time_zone *time_zone;
|
||||
ulong sql_mode;
|
||||
ulonglong sql_mode;
|
||||
ulong max_sort_length;
|
||||
ulong group_concat_max_len;
|
||||
ulong default_week_format;
|
||||
|
@ -1656,7 +1656,7 @@ bool mysql_upgrade_db(THD *thd, LEX_STRING *old_db)
|
||||
|
||||
/* Lock the old name, the new name will be locked by mysql_create_db().*/
|
||||
if (lock_schema_name(thd, old_db->str))
|
||||
DBUG_RETURN(-1);
|
||||
DBUG_RETURN(1);
|
||||
|
||||
/*
|
||||
Let's remember if we should do "USE newdb" afterwards.
|
||||
|
@ -1880,7 +1880,7 @@ public:
|
||||
enum_duplicates dup;
|
||||
my_time_t start_time;
|
||||
ulong start_time_sec_part;
|
||||
ulong sql_mode;
|
||||
ulonglong sql_mode;
|
||||
bool auto_increment_field_not_null;
|
||||
bool query_start_used, ignore, log_query, query_start_sec_part_used;
|
||||
bool stmt_depends_on_first_successful_insert_id_in_prev_stmt;
|
||||
|
@ -7137,7 +7137,7 @@ copy_data_between_tables(THD *thd, TABLE *from,TABLE *to,
|
||||
List<Item> all_fields;
|
||||
ha_rows examined_rows;
|
||||
bool auto_increment_field_copied= 0;
|
||||
ulong save_sql_mode= thd->variables.sql_mode;
|
||||
ulonglong save_sql_mode= thd->variables.sql_mode;
|
||||
ulonglong prev_insert_id, time_to_report_progress;
|
||||
List_iterator<Create_field> it(create);
|
||||
Create_field *def;
|
||||
|
@ -245,7 +245,7 @@ to_ascii(CHARSET_INFO *cs,
|
||||
wc < 128)
|
||||
{
|
||||
src+= cnvres;
|
||||
*dst++= wc;
|
||||
*dst++= static_cast<char>(wc);
|
||||
}
|
||||
*dst= '\0';
|
||||
return dst - dst0;
|
||||
@ -255,7 +255,7 @@ to_ascii(CHARSET_INFO *cs,
|
||||
/* Character set-aware version of str_to_time() */
|
||||
timestamp_type
|
||||
str_to_time(CHARSET_INFO *cs, const char *str,uint length,
|
||||
MYSQL_TIME *l_time, ulong fuzzydate, int *warning)
|
||||
MYSQL_TIME *l_time, ulonglong fuzzydate, int *warning)
|
||||
{
|
||||
char cnv[32];
|
||||
if ((cs->state & MY_CS_NONASCII) != 0)
|
||||
@ -270,7 +270,7 @@ str_to_time(CHARSET_INFO *cs, const char *str,uint length,
|
||||
/* Character set-aware version of str_to_datetime() */
|
||||
timestamp_type str_to_datetime(CHARSET_INFO *cs,
|
||||
const char *str, uint length,
|
||||
MYSQL_TIME *l_time, uint flags, int *was_cut)
|
||||
MYSQL_TIME *l_time, ulonglong flags, int *was_cut)
|
||||
{
|
||||
char cnv[32];
|
||||
if ((cs->state & MY_CS_NONASCII) != 0)
|
||||
@ -293,7 +293,7 @@ timestamp_type str_to_datetime(CHARSET_INFO *cs,
|
||||
timestamp_type
|
||||
str_to_datetime_with_warn(CHARSET_INFO *cs,
|
||||
const char *str, uint length, MYSQL_TIME *l_time,
|
||||
ulong flags)
|
||||
ulonglong flags)
|
||||
{
|
||||
int was_cut;
|
||||
THD *thd= current_thd;
|
||||
@ -324,7 +324,7 @@ str_to_datetime_with_warn(CHARSET_INFO *cs,
|
||||
@returns 0 for success, 1 for a failure
|
||||
*/
|
||||
static bool number_to_time_with_warn(bool neg, ulonglong nr, ulong sec_part,
|
||||
MYSQL_TIME *ltime, ulong fuzzydate,
|
||||
MYSQL_TIME *ltime, ulonglong fuzzydate,
|
||||
const ErrConv *str,
|
||||
const char *field_name)
|
||||
{
|
||||
@ -356,7 +356,7 @@ static bool number_to_time_with_warn(bool neg, ulonglong nr, ulong sec_part,
|
||||
|
||||
|
||||
bool double_to_datetime_with_warn(double value, MYSQL_TIME *ltime,
|
||||
ulong fuzzydate, const char *field_name)
|
||||
ulonglong fuzzydate, const char *field_name)
|
||||
{
|
||||
const ErrConvDouble str(value);
|
||||
bool neg= value < 0;
|
||||
@ -375,7 +375,7 @@ bool double_to_datetime_with_warn(double value, MYSQL_TIME *ltime,
|
||||
|
||||
|
||||
bool decimal_to_datetime_with_warn(const my_decimal *value, MYSQL_TIME *ltime,
|
||||
ulong fuzzydate, const char *field_name)
|
||||
ulonglong fuzzydate, const char *field_name)
|
||||
{
|
||||
const ErrConvDecimal str(value);
|
||||
ulonglong nr;
|
||||
@ -387,7 +387,7 @@ bool decimal_to_datetime_with_warn(const my_decimal *value, MYSQL_TIME *ltime,
|
||||
|
||||
|
||||
bool int_to_datetime_with_warn(longlong value, MYSQL_TIME *ltime,
|
||||
ulong fuzzydate, const char *field_name)
|
||||
ulonglong fuzzydate, const char *field_name)
|
||||
{
|
||||
const ErrConvInteger str(value);
|
||||
bool neg= value < 0;
|
||||
|
@ -36,18 +36,18 @@ ulong convert_month_to_period(ulong month);
|
||||
void get_date_from_daynr(long daynr,uint *year, uint *month, uint *day);
|
||||
my_time_t TIME_to_timestamp(THD *thd, const MYSQL_TIME *t, uint *error_code);
|
||||
bool str_to_time_with_warn(CHARSET_INFO *cs, const char *str, uint length,
|
||||
MYSQL_TIME *l_time, ulong fuzzydate);
|
||||
MYSQL_TIME *l_time, ulonglong fuzzydate);
|
||||
timestamp_type str_to_datetime_with_warn(CHARSET_INFO *cs, const char *str,
|
||||
uint length, MYSQL_TIME *l_time,
|
||||
ulong flags);
|
||||
ulonglong flags);
|
||||
bool double_to_datetime_with_warn(double value, MYSQL_TIME *ltime,
|
||||
ulong fuzzydate,
|
||||
ulonglong fuzzydate,
|
||||
const char *name);
|
||||
bool decimal_to_datetime_with_warn(const my_decimal *value, MYSQL_TIME *ltime,
|
||||
ulong fuzzydate,
|
||||
ulonglong fuzzydate,
|
||||
const char *name);
|
||||
bool int_to_datetime_with_warn(longlong value, MYSQL_TIME *ltime,
|
||||
ulong fuzzydate,
|
||||
ulonglong fuzzydate,
|
||||
const char *name);
|
||||
|
||||
void make_truncated_value_warning(THD *thd, MYSQL_ERROR::enum_warning_level level,
|
||||
@ -87,11 +87,11 @@ bool parse_date_time_format(timestamp_type format_type,
|
||||
DATE_TIME_FORMAT *date_time_format);
|
||||
/* Character set-aware version of str_to_time() */
|
||||
timestamp_type str_to_time(CHARSET_INFO *cs, const char *str,uint length,
|
||||
MYSQL_TIME *l_time, ulong fuzzydate, int *warning);
|
||||
MYSQL_TIME *l_time, ulonglong fuzzydate, int *warning);
|
||||
/* Character set-aware version of str_to_datetime() */
|
||||
timestamp_type str_to_datetime(CHARSET_INFO *cs,
|
||||
const char *str, uint length,
|
||||
MYSQL_TIME *l_time, uint flags, int *was_cut);
|
||||
MYSQL_TIME *l_time, ulonglong flags, int *was_cut);
|
||||
|
||||
/* convenience wrapper */
|
||||
inline bool parse_date_time_format(timestamp_type format_type,
|
||||
|
@ -1348,7 +1348,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
|
||||
List_iterator_fast<LEX_STRING> it_db_cl_name(triggers->db_cl_names);
|
||||
LEX *old_lex= thd->lex, lex;
|
||||
sp_rcontext *save_spcont= thd->spcont;
|
||||
ulong save_sql_mode= thd->variables.sql_mode;
|
||||
ulonglong save_sql_mode= thd->variables.sql_mode;
|
||||
LEX_STRING *on_table_name;
|
||||
|
||||
thd->lex= &lex;
|
||||
@ -1848,7 +1848,7 @@ Table_triggers_list::change_table_name_in_triggers(THD *thd,
|
||||
{
|
||||
char path_buff[FN_REFLEN];
|
||||
LEX_STRING *def, *on_table_name, new_def;
|
||||
ulong save_sql_mode= thd->variables.sql_mode;
|
||||
ulonglong save_sql_mode= thd->variables.sql_mode;
|
||||
List_iterator_fast<LEX_STRING> it_def(definitions_list);
|
||||
List_iterator_fast<LEX_STRING> it_on_table_name(on_table_names_list);
|
||||
List_iterator_fast<ulonglong> it_mode(definition_modes_list);
|
||||
|
@ -1225,7 +1225,7 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
|
||||
view_select= &lex->select_lex;
|
||||
view_select->select_number= ++thd->select_number;
|
||||
|
||||
ulong saved_mode= thd->variables.sql_mode;
|
||||
ulonglong saved_mode= thd->variables.sql_mode;
|
||||
/* switch off modes which can prevent normal parsing of VIEW
|
||||
- MODE_REAL_AS_FLOAT affect only CREATE TABLE parsing
|
||||
+ MODE_PIPES_AS_CONCAT affect expression parsing
|
||||
|
@ -1040,20 +1040,20 @@ static Sys_var_ulong Sys_max_allowed_packet(
|
||||
BLOCK_SIZE(1024), NO_MUTEX_GUARD, NOT_IN_BINLOG,
|
||||
ON_CHECK(check_max_allowed_packet));
|
||||
|
||||
static Sys_var_ulonglong Sys_max_binlog_cache_size(
|
||||
static Sys_var_ulong Sys_max_binlog_cache_size(
|
||||
"max_binlog_cache_size",
|
||||
"Sets the total size of the transactional cache",
|
||||
GLOBAL_VAR(max_binlog_cache_size), CMD_LINE(REQUIRED_ARG),
|
||||
VALID_RANGE(IO_SIZE, ULONGLONG_MAX),
|
||||
DEFAULT((ULONGLONG_MAX/IO_SIZE)*IO_SIZE),
|
||||
VALID_RANGE(IO_SIZE, ULONG_MAX),
|
||||
DEFAULT((ULONG_MAX/IO_SIZE)*IO_SIZE),
|
||||
BLOCK_SIZE(IO_SIZE));
|
||||
|
||||
static Sys_var_ulonglong Sys_max_binlog_stmt_cache_size(
|
||||
static Sys_var_ulong Sys_max_binlog_stmt_cache_size(
|
||||
"max_binlog_stmt_cache_size",
|
||||
"Sets the total size of the statement cache",
|
||||
GLOBAL_VAR(max_binlog_stmt_cache_size), CMD_LINE(REQUIRED_ARG),
|
||||
VALID_RANGE(IO_SIZE, ULONGLONG_MAX),
|
||||
DEFAULT((ULONGLONG_MAX/IO_SIZE)*IO_SIZE),
|
||||
VALID_RANGE(IO_SIZE, ULONG_MAX),
|
||||
DEFAULT((ULONG_MAX/IO_SIZE)*IO_SIZE),
|
||||
BLOCK_SIZE(IO_SIZE));
|
||||
|
||||
static bool fix_max_binlog_size(sys_var *self, THD *thd, enum_var_type type)
|
||||
@ -1977,7 +1977,7 @@ static Sys_var_ulong Sys_sort_buffer(
|
||||
VALID_RANGE(MIN_SORT_MEMORY, ULONG_MAX), DEFAULT(MAX_SORT_MEMORY),
|
||||
BLOCK_SIZE(1));
|
||||
|
||||
export ulong expand_sql_mode(ulonglong sql_mode)
|
||||
export ulonglong expand_sql_mode(ulonglong sql_mode)
|
||||
{
|
||||
if (sql_mode & MODE_ANSI)
|
||||
{
|
||||
@ -2064,7 +2064,7 @@ static const char *sql_mode_names[]=
|
||||
"PAD_CHAR_TO_FULL_LENGTH",
|
||||
0
|
||||
};
|
||||
export bool sql_mode_string_representation(THD *thd, ulong sql_mode,
|
||||
export bool sql_mode_string_representation(THD *thd, ulonglong sql_mode,
|
||||
LEX_STRING *ls)
|
||||
{
|
||||
set_to_string(thd, ls, sql_mode, sql_mode_names);
|
||||
|
@ -154,12 +154,12 @@ public:
|
||||
}
|
||||
bool session_update(THD *thd, set_var *var)
|
||||
{
|
||||
session_var(thd, T)= var->save_result.ulonglong_value;
|
||||
session_var(thd, T)= static_cast<T>(var->save_result.ulonglong_value);
|
||||
return false;
|
||||
}
|
||||
bool global_update(THD *thd, set_var *var)
|
||||
{
|
||||
global_var(T)= var->save_result.ulonglong_value;
|
||||
global_var(T)= static_cast<T>(var->save_result.ulonglong_value);
|
||||
return false;
|
||||
}
|
||||
bool check_update_type(Item_result type)
|
||||
@ -276,12 +276,12 @@ public:
|
||||
}
|
||||
bool session_update(THD *thd, set_var *var)
|
||||
{
|
||||
session_var(thd, ulong)= var->save_result.ulonglong_value;
|
||||
session_var(thd, ulong)= static_cast<ulong>(var->save_result.ulonglong_value);
|
||||
return false;
|
||||
}
|
||||
bool global_update(THD *thd, set_var *var)
|
||||
{
|
||||
global_var(ulong)= var->save_result.ulonglong_value;
|
||||
global_var(ulong)= static_cast<ulong>(var->save_result.ulonglong_value);
|
||||
return false;
|
||||
}
|
||||
void session_save_default(THD *thd, set_var *var)
|
||||
@ -324,12 +324,12 @@ public:
|
||||
}
|
||||
bool session_update(THD *thd, set_var *var)
|
||||
{
|
||||
session_var(thd, my_bool)= var->save_result.ulonglong_value;
|
||||
session_var(thd, my_bool)= var->save_result.ulonglong_value != 0;
|
||||
return false;
|
||||
}
|
||||
bool global_update(THD *thd, set_var *var)
|
||||
{
|
||||
global_var(my_bool)= var->save_result.ulonglong_value;
|
||||
global_var(my_bool)= var->save_result.ulonglong_value != 0;
|
||||
return false;
|
||||
}
|
||||
void session_save_default(THD *thd, set_var *var)
|
||||
@ -651,7 +651,7 @@ public:
|
||||
const char *comment, int flag_args, ptrdiff_t off, size_t size,
|
||||
CMD_LINE getopt,
|
||||
ulonglong min_val, ulonglong max_val, ulonglong def_val,
|
||||
ulonglong block_size, PolyLock *lock,
|
||||
uint block_size, PolyLock *lock,
|
||||
enum binlog_status_enum binlog_status_arg,
|
||||
on_check_function on_check_func,
|
||||
keycache_update_function on_update_func,
|
||||
@ -1410,7 +1410,7 @@ public:
|
||||
Sys_var_session_special(const char *name_arg,
|
||||
const char *comment, int flag_args,
|
||||
CMD_LINE getopt,
|
||||
ulonglong min_val, ulonglong max_val, ulonglong block_size,
|
||||
ulonglong min_val, ulonglong max_val, uint block_size,
|
||||
PolyLock *lock, enum binlog_status_enum binlog_status_arg,
|
||||
on_check_function on_check_func,
|
||||
session_special_update_function update_func_arg,
|
||||
|
@ -4725,19 +4725,19 @@ i_s_innodb_buffer_pool_pages_index_fill(
|
||||
|
||||
if (fil_page_get_type(frame) == FIL_PAGE_INDEX) {
|
||||
index_id = btr_page_get_index_id(frame);
|
||||
table->field[0]->store(index_id);
|
||||
table->field[1]->store(block->page.space);
|
||||
table->field[2]->store(block->page.offset);
|
||||
table->field[3]->store(page_get_n_recs(frame));
|
||||
table->field[4]->store(page_get_data_size(frame));
|
||||
table->field[5]->store(block->is_hashed);
|
||||
table->field[6]->store(block->page.access_time);
|
||||
table->field[7]->store(block->page.newest_modification != 0);
|
||||
table->field[8]->store(block->page.oldest_modification != 0);
|
||||
table->field[9]->store(block->page.old);
|
||||
table->field[10]->store(0);
|
||||
table->field[11]->store(block->page.buf_fix_count);
|
||||
table->field[12]->store(block->page.flush_type);
|
||||
table->field[0]->store(index_id, TRUE);
|
||||
table->field[1]->store(block->page.space, TRUE);
|
||||
table->field[2]->store(block->page.offset, TRUE);
|
||||
table->field[3]->store(page_get_n_recs(frame), TRUE);
|
||||
table->field[4]->store(page_get_data_size(frame), TRUE);
|
||||
table->field[5]->store(block->is_hashed, TRUE);
|
||||
table->field[6]->store(block->page.access_time, TRUE);
|
||||
table->field[7]->store(block->page.newest_modification != 0, TRUE);
|
||||
table->field[8]->store(block->page.oldest_modification != 0, TRUE);
|
||||
table->field[9]->store(block->page.old, TRUE);
|
||||
table->field[10]->store(0, TRUE);
|
||||
table->field[11]->store(block->page.buf_fix_count, TRUE);
|
||||
table->field[12]->store(block->page.flush_type, TRUE);
|
||||
|
||||
if (schema_table_store_record(thd, table)) {
|
||||
status = 1;
|
||||
|
@ -197,7 +197,7 @@ static uint mbcharlen_cp932(CHARSET_INFO *cs __attribute__((unused)),uint c)
|
||||
#define cp932code(c,d) ((((uint) (uchar)(c)) << 8) | (uint) (uchar) (d))
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO c81[256]=
|
||||
static MY_UNICASE_INFO c81[256]=
|
||||
{
|
||||
/* 8100-810F */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -407,7 +407,7 @@ static const MY_UNICASE_INFO c81[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO c82[256]=
|
||||
static MY_UNICASE_INFO c82[256]=
|
||||
{
|
||||
/* 8200-820F */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -615,7 +615,7 @@ static const MY_UNICASE_INFO c82[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO c83[256]=
|
||||
static MY_UNICASE_INFO c83[256]=
|
||||
{
|
||||
/* 8300-830F */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -825,7 +825,7 @@ static const MY_UNICASE_INFO c83[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO c84[256]=
|
||||
static MY_UNICASE_INFO c84[256]=
|
||||
{
|
||||
/* 8400-840F */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -1035,7 +1035,7 @@ static const MY_UNICASE_INFO c84[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO c87[256]=
|
||||
static MY_UNICASE_INFO c87[256]=
|
||||
{
|
||||
/* 8700-870F */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -1245,7 +1245,7 @@ static const MY_UNICASE_INFO c87[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO cEE[256]=
|
||||
static MY_UNICASE_INFO cEE[256]=
|
||||
{
|
||||
/* EE00-EE0F */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -1456,7 +1456,7 @@ static const MY_UNICASE_INFO cEE[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO cFA[256]=
|
||||
static MY_UNICASE_INFO cFA[256]=
|
||||
{
|
||||
/* FA00-FA0F */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -1666,7 +1666,7 @@ static const MY_UNICASE_INFO cFA[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO *my_caseinfo_cp932[256]=
|
||||
static MY_UNICASE_INFO *my_caseinfo_cp932[256]=
|
||||
{
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0 */
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
|
@ -204,7 +204,7 @@ static uint mbcharlen_eucjpms(CHARSET_INFO *cs __attribute__((unused)),uint c)
|
||||
|
||||
/* Case info pages for JIS-X-0208 range */
|
||||
|
||||
static const MY_UNICASE_INFO cA2[256]=
|
||||
static MY_UNICASE_INFO cA2[256]=
|
||||
{
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -325,7 +325,7 @@ static const MY_UNICASE_INFO cA2[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO cA3[256]=
|
||||
static MY_UNICASE_INFO cA3[256]=
|
||||
{
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -446,7 +446,7 @@ static const MY_UNICASE_INFO cA3[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO cA6[256]=
|
||||
static MY_UNICASE_INFO cA6[256]=
|
||||
{
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -567,7 +567,7 @@ static const MY_UNICASE_INFO cA6[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO cA7[256]=
|
||||
static MY_UNICASE_INFO cA7[256]=
|
||||
{
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -688,7 +688,7 @@ static const MY_UNICASE_INFO cA7[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO cAD[256]=
|
||||
static MY_UNICASE_INFO cAD[256]=
|
||||
{
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -811,7 +811,7 @@ static const MY_UNICASE_INFO cAD[256]=
|
||||
|
||||
/* Case info pages for JIS-X-0212 range */
|
||||
|
||||
static const MY_UNICASE_INFO c8FA6[256]=
|
||||
static MY_UNICASE_INFO c8FA6[256]=
|
||||
{
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -932,7 +932,7 @@ static const MY_UNICASE_INFO c8FA6[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO c8FA7[256]=
|
||||
static MY_UNICASE_INFO c8FA7[256]=
|
||||
{
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -1053,7 +1053,7 @@ static const MY_UNICASE_INFO c8FA7[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO c8FA9[256]=
|
||||
static MY_UNICASE_INFO c8FA9[256]=
|
||||
{
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -1174,7 +1174,7 @@ static const MY_UNICASE_INFO c8FA9[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO c8FAA[256]=
|
||||
static MY_UNICASE_INFO c8FAA[256]=
|
||||
{
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -1295,7 +1295,7 @@ static const MY_UNICASE_INFO c8FAA[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO c8FAB[256]=
|
||||
static MY_UNICASE_INFO c8FAB[256]=
|
||||
{
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -1416,7 +1416,7 @@ static const MY_UNICASE_INFO c8FAB[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO c8FF3[256]=
|
||||
static MY_UNICASE_INFO c8FF3[256]=
|
||||
{
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -1537,7 +1537,7 @@ static const MY_UNICASE_INFO c8FF3[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO c8FF4[256]=
|
||||
static MY_UNICASE_INFO c8FF4[256]=
|
||||
{
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
@ -1658,7 +1658,7 @@ static const MY_UNICASE_INFO c8FF4[256]=
|
||||
};
|
||||
|
||||
|
||||
static const MY_UNICASE_INFO *my_caseinfo_eucjpms[512]=
|
||||
static MY_UNICASE_INFO *my_caseinfo_eucjpms[512]=
|
||||
{
|
||||
/* JIS-X-0208 */
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0 */
|
||||
|
@ -136,7 +136,7 @@ static const uchar to_upper_gbk[]=
|
||||
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
|
||||
};
|
||||
|
||||
static const MY_UNICASE_INFO cA2[256]=
|
||||
static MY_UNICASE_INFO cA2[256]=
|
||||
{
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */
|
||||
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
|
||||
|
@ -274,7 +274,7 @@ ok1(int const pass)
|
||||
}
|
||||
|
||||
void
|
||||
skip(int how_many, char const *fmt, ...)
|
||||
skip(int how_many, char const * const fmt, ...)
|
||||
{
|
||||
char reason[80];
|
||||
if (fmt && *fmt)
|
||||
|
Loading…
x
Reference in New Issue
Block a user