Skip to content
Permalink
Browse files
Merge 10.0 into 10.1
  • Loading branch information
dr-m committed Dec 18, 2017
2 parents 682c3bf + 40088bf commit 09c5bbf
Show file tree
Hide file tree
Showing 13 changed files with 147 additions and 213 deletions.
@@ -1348,3 +1348,15 @@ t CREATE TABLE `t` (
KEY `i` (`i`)
) ENGINE=InnoDB AUTO_INCREMENT=401 DEFAULT CHARSET=latin1
DROP TABLE t;
#
# MDEV-14008 Assertion failing: `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())
#
SET sql_mode=STRICT_ALL_TABLES;
CREATE TABLE t1 (
c1 DOUBLE NOT NULL PRIMARY KEY AUTO_INCREMENT
) ENGINE=InnoDB AUTO_INCREMENT=10000000000000000000;
INSERT INTO t1 VALUES ();
SELECT * FROM t1;
c1
1e19
DROP TABLE t1;
@@ -680,3 +680,15 @@ INSERT INTO t VALUES (NULL);
SELECT * FROM t;
SHOW CREATE TABLE t;
DROP TABLE t;

--echo #
--echo # MDEV-14008 Assertion failing: `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())
--echo #

SET sql_mode=STRICT_ALL_TABLES;
CREATE TABLE t1 (
c1 DOUBLE NOT NULL PRIMARY KEY AUTO_INCREMENT
) ENGINE=InnoDB AUTO_INCREMENT=10000000000000000000;
INSERT INTO t1 VALUES ();
SELECT * FROM t1;
DROP TABLE t1;
@@ -0,0 +1,10 @@
CREATE TABLE t1 (i INT) ENGINE=MYISAM
PARTITION BY LIST(i) (
PARTITION p0 VALUES IN (1),
PARTITION p1 VALUES IN (2)
);
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
ALTER TABLE t1 DROP PARTITION p1;
SELECT * FROM t1;
i
DROP TABLE t1;
@@ -0,0 +1,17 @@
#
# MDEV-14641 Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine
#

--source include/have_partition.inc

CREATE TABLE t1 (i INT) ENGINE=MYISAM
PARTITION BY LIST(i) (
PARTITION p0 VALUES IN (1),
PARTITION p1 VALUES IN (2)
);
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
ALTER TABLE t1 DROP PARTITION p1;
SELECT * FROM t1;

# Cleanup
DROP TABLE t1;
@@ -4729,15 +4729,15 @@ 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;
longlong res;
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 @@ class Field: public Value_source
{ 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 @@ class Field_float :public Field_real {


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 @@ class Field_double :public Field_real {
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)))
@@ -8297,7 +8297,7 @@ ha_innobase::write_row(
table->next_number_field);

/* Get the value that MySQL attempted to store in the table.*/
auto_inc = table->next_number_field->val_int();
auto_inc = table->next_number_field->val_uint();

switch (error) {
case DB_DUPLICATE_KEY:
@@ -8891,7 +8891,7 @@ ha_innobase::update_row(
ulonglong auto_inc;
ulonglong col_max_value;

auto_inc = table->next_number_field->val_int();
auto_inc = table->next_number_field->val_uint();

/* We need the upper limit of the col type to check for
whether we update the table autoinc counter or not. */

0 comments on commit 09c5bbf

Please sign in to comment.