mirror of
https://github.com/MariaDB/server.git
synced 2026-04-23 00:35:32 +02:00
merge
This commit is contained in:
commit
6edd76785c
68 changed files with 286 additions and 259 deletions
|
|
@ -92,7 +92,7 @@ ADD_LIBRARY(sql STATIC ${SQL_SOURCE})
|
|||
ADD_DEPENDENCIES(sql GenServerSource)
|
||||
DTRACE_INSTRUMENT(sql)
|
||||
TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATIC_PLUGIN_LIBS}
|
||||
mysys ${DBUG_LIBRARY} strings vio regex
|
||||
mysys dbug strings vio regex
|
||||
${LIBWRAP} ${LIBCRYPT} ${LIBDL}
|
||||
${SSL_LIBRARIES})
|
||||
|
||||
|
|
|
|||
|
|
@ -201,7 +201,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;
|
||||
|
|
@ -652,7 +652,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
|
||||
|
|
@ -769,7 +769,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
|
||||
|
|
@ -1053,7 +1053,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
|
|
@ -1762,7 +1762,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;
|
||||
|
|
@ -4254,7 +4254,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();
|
||||
|
|
@ -4640,7 +4640,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;
|
||||
|
|
@ -5185,7 +5185,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)))
|
||||
|
|
@ -5303,7 +5303,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);
|
||||
|
|
@ -5483,7 +5483,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)
|
||||
|
|
@ -5654,7 +5654,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;
|
||||
|
|
@ -5774,7 +5774,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;
|
||||
|
|
@ -5890,7 +5890,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)
|
||||
|
|
|
|||
|
|
@ -3325,7 +3325,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;
|
||||
|
|
|
|||
|
|
@ -4091,9 +4091,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,
|
||||
|
|
@ -4117,8 +4117,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,
|
||||
|
|
@ -4138,8 +4138,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);
|
||||
}
|
||||
|
|
@ -4159,9 +4159,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
|
|
@ -1182,7 +1182,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;
|
||||
|
|
@ -2468,7 +2468,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))
|
||||
{
|
||||
|
|
@ -2478,7 +2478,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))
|
||||
{
|
||||
|
|
@ -3396,7 +3396,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)
|
||||
{
|
||||
|
|
@ -4218,7 +4218,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));
|
||||
}
|
||||
|
|
@ -7177,7 +7177,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));
|
||||
}
|
||||
|
|
@ -7314,7 +7314,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));
|
||||
}
|
||||
|
|
@ -7676,7 +7676,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");
|
||||
|
|
@ -8735,7 +8735,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);
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -3167,7 +3167,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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2730,7 +2730,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; }
|
||||
|
|
|
|||
|
|
@ -4402,7 +4402,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);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,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;
|
||||
|
|
@ -1500,7 +1500,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)
|
||||
|
|
@ -1558,7 +1558,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;
|
||||
|
|
@ -1577,7 +1577,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;
|
||||
|
|
@ -1668,7 +1668,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;
|
||||
|
|
@ -1690,13 +1690,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;
|
||||
|
|
@ -1923,7 +1923,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;
|
||||
|
|
@ -1953,7 +1953,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;
|
||||
|
|
@ -2046,7 +2046,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;
|
||||
|
||||
|
|
@ -2412,7 +2412,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;
|
||||
|
|
@ -2429,7 +2429,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;
|
||||
|
|
@ -2450,7 +2450,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;
|
||||
|
|
@ -2495,7 +2495,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();
|
||||
|
|
@ -2560,7 +2560,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;
|
||||
|
|
@ -2665,7 +2665,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;
|
||||
|
|
@ -2728,7 +2728,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;
|
||||
|
|
@ -3111,7 +3111,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];
|
||||
|
|
@ -3144,7 +3144,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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
17
sql/log.cc
17
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);
|
||||
|
|
@ -5946,7 +5946,8 @@ MYSQL_BIN_LOG::trx_group_commit_leader(group_commit_entry *leader)
|
|||
{
|
||||
if (!current->error &&
|
||||
RUN_HOOK(binlog_storage, after_flush,
|
||||
(current->thd, log_file_name, log_file.pos_in_file, synced)))
|
||||
(current->thd, log_file_name,
|
||||
current->cache_mngr->last_commit_pos_offset, synced)))
|
||||
{
|
||||
current->error= ER_ERROR_ON_WRITE;
|
||||
current->commit_errno= -1;
|
||||
|
|
@ -6828,7 +6829,7 @@ int TC_LOG_MMAP::open(const char *opt_name)
|
|||
mysql_mutex_init(key_LOCK_pool, &LOCK_pool, MY_MUTEX_INIT_FAST);
|
||||
mysql_cond_init(key_COND_active, &COND_active, 0);
|
||||
mysql_cond_init(key_COND_pool, &COND_pool, 0);
|
||||
mysql_cond_init(key_COND_queue_busy, &COND_queue_busy, 0);
|
||||
mysql_cond_init(key_TC_LOG_MMAP_COND_queue_busy, &COND_queue_busy, 0);
|
||||
|
||||
inited=6;
|
||||
|
||||
|
|
|
|||
16
sql/log.h
16
sql/log.h
|
|
@ -539,12 +539,14 @@ public:
|
|||
void set_psi_keys(PSI_mutex_key key_LOCK_index,
|
||||
PSI_cond_key key_update_cond,
|
||||
PSI_file_key key_file_log,
|
||||
PSI_file_key key_file_log_index)
|
||||
PSI_file_key key_file_log_index,
|
||||
PSI_file_key key_COND_queue_busy)
|
||||
{
|
||||
m_key_LOCK_index= key_LOCK_index;
|
||||
m_key_update_cond= key_update_cond;
|
||||
m_key_file_log= key_file_log;
|
||||
m_key_file_log_index= key_file_log_index;
|
||||
m_key_COND_queue_busy= key_COND_queue_busy;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -818,12 +820,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
|
||||
|
|
|
|||
|
|
@ -2881,7 +2881,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 */
|
||||
|
|
@ -8228,7 +8228,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;
|
||||
|
|
@ -811,7 +811,7 @@ static PSI_rwlock_info all_server_rwlocks[]=
|
|||
};
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
PSI_cond_key key_PAGE_cond, key_COND_active, key_COND_pool, key_COND_queue_busy;
|
||||
PSI_cond_key key_PAGE_cond, key_COND_active, key_COND_pool;
|
||||
#endif /* HAVE_MMAP */
|
||||
|
||||
PSI_cond_key key_BINLOG_COND_prep_xids, key_BINLOG_update_cond,
|
||||
|
|
@ -823,8 +823,11 @@ PSI_cond_key key_BINLOG_COND_prep_xids, key_BINLOG_update_cond,
|
|||
key_relay_log_info_data_cond, key_relay_log_info_log_space_cond,
|
||||
key_relay_log_info_start_cond, key_relay_log_info_stop_cond,
|
||||
key_TABLE_SHARE_cond, key_user_level_lock_cond,
|
||||
key_COND_thread_count, key_COND_thread_cache, key_COND_flush_thread_cache;
|
||||
key_COND_thread_count, key_COND_thread_cache, key_COND_flush_thread_cache,
|
||||
key_BINLOG_COND_queue_busy;
|
||||
PSI_cond_key key_RELAYLOG_update_cond, key_COND_wakeup_ready;
|
||||
PSI_cond_key key_RELAYLOG_COND_queue_busy;
|
||||
PSI_cond_key key_TC_LOG_MMAP_COND_queue_busy;
|
||||
|
||||
static PSI_cond_info all_server_conds[]=
|
||||
{
|
||||
|
|
@ -835,10 +838,13 @@ static PSI_cond_info all_server_conds[]=
|
|||
{ &key_PAGE_cond, "PAGE::cond", 0},
|
||||
{ &key_COND_active, "TC_LOG_MMAP::COND_active", 0},
|
||||
{ &key_COND_pool, "TC_LOG_MMAP::COND_pool", 0},
|
||||
{ &key_TC_LOG_MMAP_COND_queue_busy, "TC_LOG_MMAP::COND_queue_busy", 0},
|
||||
#endif /* HAVE_MMAP */
|
||||
{ &key_BINLOG_COND_prep_xids, "MYSQL_BIN_LOG::COND_prep_xids", 0},
|
||||
{ &key_BINLOG_update_cond, "MYSQL_BIN_LOG::update_cond", 0},
|
||||
{ &key_BINLOG_COND_queue_busy, "MYSQL_BIN_LOG::COND_queue_busy", 0},
|
||||
{ &key_RELAYLOG_update_cond, "MYSQL_RELAY_LOG::update_cond", 0},
|
||||
{ &key_RELAYLOG_COND_queue_busy, "MYSQL_RELAY_LOG::COND_queue_busy", 0},
|
||||
{ &key_COND_wakeup_ready, "THD::COND_wakeup_ready", 0},
|
||||
{ &key_COND_cache_status_changed, "Query_cache::COND_cache_status_changed", 0},
|
||||
{ &key_COND_manager, "COND_manager", PSI_FLAG_GLOBAL},
|
||||
|
|
@ -2213,7 +2219,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)
|
||||
|
|
@ -3543,7 +3549,8 @@ static int init_common_variables()
|
|||
mysql_bin_log.set_psi_keys(key_BINLOG_LOCK_index,
|
||||
key_BINLOG_update_cond,
|
||||
key_file_binlog,
|
||||
key_file_binlog_index);
|
||||
key_file_binlog_index,
|
||||
key_BINLOG_COND_queue_busy);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -5110,6 +5117,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;
|
||||
|
|
@ -247,8 +247,7 @@ extern PSI_rwlock_key key_rwlock_LOCK_grant, key_rwlock_LOCK_logger,
|
|||
key_rwlock_LOCK_system_variables_hash, key_rwlock_query_cache_query_lock;
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
extern PSI_cond_key key_PAGE_cond, key_COND_active, key_COND_pool,
|
||||
key_COND_queue_busy;
|
||||
extern PSI_cond_key key_PAGE_cond, key_COND_active, key_COND_pool;
|
||||
#endif /* HAVE_MMAP */
|
||||
|
||||
extern PSI_cond_key key_BINLOG_COND_prep_xids, key_BINLOG_update_cond,
|
||||
|
|
@ -262,6 +261,8 @@ extern PSI_cond_key key_BINLOG_COND_prep_xids, key_BINLOG_update_cond,
|
|||
key_TABLE_SHARE_cond, key_user_level_lock_cond,
|
||||
key_COND_thread_count, key_COND_thread_cache, key_COND_flush_thread_cache;
|
||||
extern PSI_cond_key key_RELAYLOG_update_cond, key_COND_wakeup_ready;
|
||||
extern PSI_cond_key key_RELAYLOG_COND_queue_busy;
|
||||
extern PSI_cond_key key_TC_LOG_MMAP_COND_queue_busy;
|
||||
|
||||
extern PSI_thread_key key_thread_bootstrap, key_thread_delayed_insert,
|
||||
key_thread_handle_manager, key_thread_kill_server, key_thread_main,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -61,7 +61,8 @@ Relay_log_info::Relay_log_info(bool is_slave_recovery)
|
|||
relay_log.set_psi_keys(key_RELAYLOG_LOCK_index,
|
||||
key_RELAYLOG_update_cond,
|
||||
key_file_relaylog,
|
||||
key_file_relaylog_index);
|
||||
key_file_relaylog_index,
|
||||
key_RELAYLOG_COND_queue_busy);
|
||||
#endif
|
||||
|
||||
group_relay_log_name[0]= event_relay_log_name[0]=
|
||||
|
|
|
|||
|
|
@ -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
|
|
@ -43,11 +43,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);
|
||||
|
|
@ -542,7 +542,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;
|
||||
|
||||
|
|
@ -716,11 +716,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;
|
||||
|
|
@ -798,7 +798,7 @@ Bad_db_error_handler::handle_condition(THD *thd,
|
|||
|
||||
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)
|
||||
|
|
@ -971,7 +971,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;
|
||||
|
||||
|
|
@ -2127,7 +2127,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,
|
||||
|
|
@ -2138,9 +2137,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= "*/ +
|
||||
|
|
|
|||
|
|
@ -1195,7 +1195,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 */
|
||||
|
|
@ -2477,7 +2477,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;
|
||||
|
|
|
|||
|
|
@ -1660,7 +1660,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.
|
||||
|
|
|
|||
|
|
@ -1877,7 +1877,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;
|
||||
|
|
|
|||
|
|
@ -7156,7 +7156,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,
|
||||
|
|
|
|||
|
|
@ -1349,7 +1349,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;
|
||||
|
|
@ -1849,7 +1849,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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue