mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge 10.0 into 10.1
This commit is contained in:
@ -4729,7 +4729,7 @@ double Field_double::val_real(void)
|
||||
return j;
|
||||
}
|
||||
|
||||
longlong Field_double::val_int(void)
|
||||
longlong Field_double::val_int_from_real(bool want_unsigned_result)
|
||||
{
|
||||
ASSERT_COLUMN_MARKED_FOR_READ;
|
||||
double j;
|
||||
@ -4737,7 +4737,7 @@ longlong Field_double::val_int(void)
|
||||
bool error;
|
||||
float8get(j,ptr);
|
||||
|
||||
res= double_to_longlong(j, 0, &error);
|
||||
res= double_to_longlong(j, want_unsigned_result, &error);
|
||||
if (error)
|
||||
{
|
||||
THD *thd= get_thd();
|
||||
|
@ -745,6 +745,10 @@ public:
|
||||
{ return store(ls->str, ls->length, cs); }
|
||||
virtual double val_real(void)=0;
|
||||
virtual longlong val_int(void)=0;
|
||||
virtual ulonglong val_uint(void)
|
||||
{
|
||||
return (ulonglong) val_int();
|
||||
}
|
||||
virtual bool val_bool(void)= 0;
|
||||
virtual my_decimal *val_decimal(my_decimal *);
|
||||
inline String *val_str(String *str) { return val_str(str, str); }
|
||||
@ -1999,6 +2003,7 @@ private:
|
||||
|
||||
|
||||
class Field_double :public Field_real {
|
||||
longlong val_int_from_real(bool want_unsigned_result);
|
||||
public:
|
||||
Field_double(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
|
||||
uchar null_bit_arg,
|
||||
@ -2025,7 +2030,8 @@ public:
|
||||
int store(longlong nr, bool unsigned_val);
|
||||
int reset(void) { bzero(ptr,sizeof(double)); return 0; }
|
||||
double val_real(void);
|
||||
longlong val_int(void);
|
||||
longlong val_int(void) { return val_int_from_real(false); }
|
||||
ulonglong val_uint(void) { return (ulonglong) val_int_from_real(true); }
|
||||
String *val_str(String*,String *);
|
||||
bool send_binary(Protocol *protocol);
|
||||
int cmp(const uchar *,const uchar *);
|
||||
|
@ -1764,6 +1764,13 @@ struct HA_CREATE_INFO: public Table_scope_and_contents_source_st,
|
||||
used_fields|= (HA_CREATE_USED_CHARSET | HA_CREATE_USED_DEFAULT_CHARSET);
|
||||
return false;
|
||||
}
|
||||
ulong table_options_with_row_type()
|
||||
{
|
||||
if (row_type == ROW_TYPE_DYNAMIC || row_type == ROW_TYPE_PAGE)
|
||||
return table_options | HA_OPTION_PACK_RECORD;
|
||||
else
|
||||
return table_options;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -6831,10 +6831,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
|
||||
lpt->part_info= part_info;
|
||||
lpt->alter_info= alter_info;
|
||||
lpt->create_info= create_info;
|
||||
lpt->db_options= create_info->table_options;
|
||||
if (create_info->row_type != ROW_TYPE_FIXED &&
|
||||
create_info->row_type != ROW_TYPE_DEFAULT)
|
||||
lpt->db_options|= HA_OPTION_PACK_RECORD;
|
||||
lpt->db_options= create_info->table_options_with_row_type();
|
||||
lpt->table= table;
|
||||
lpt->key_info_buffer= 0;
|
||||
lpt->key_count= 0;
|
||||
|
@ -4414,10 +4414,7 @@ handler *mysql_create_frm_image(THD *thd,
|
||||
|
||||
set_table_default_charset(thd, create_info, (char*) db);
|
||||
|
||||
db_options= create_info->table_options;
|
||||
if (create_info->row_type == ROW_TYPE_DYNAMIC ||
|
||||
create_info->row_type == ROW_TYPE_PAGE)
|
||||
db_options|= HA_OPTION_PACK_RECORD;
|
||||
db_options= create_info->table_options_with_row_type();
|
||||
|
||||
if (!(file= get_new_handler((TABLE_SHARE*) 0, thd->mem_root,
|
||||
create_info->db_type)))
|
||||
|
Reference in New Issue
Block a user