MDEV-14008 Assertion failing: `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())
This commit is contained in:
parent
9d76b27498
commit
c1e5fef05d
@ -1348,3 +1348,15 @@ t CREATE TABLE `t` (
|
|||||||
KEY `i` (`i`)
|
KEY `i` (`i`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=401 DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB AUTO_INCREMENT=401 DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t;
|
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;
|
SELECT * FROM t;
|
||||||
SHOW CREATE TABLE t;
|
SHOW CREATE TABLE t;
|
||||||
DROP 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;
|
||||||
|
@ -4390,7 +4390,7 @@ double Field_double::val_real(void)
|
|||||||
return j;
|
return j;
|
||||||
}
|
}
|
||||||
|
|
||||||
longlong Field_double::val_int(void)
|
longlong Field_double::val_int_from_real(bool want_unsigned_result)
|
||||||
{
|
{
|
||||||
ASSERT_COLUMN_MARKED_FOR_READ;
|
ASSERT_COLUMN_MARKED_FOR_READ;
|
||||||
double j;
|
double j;
|
||||||
@ -4398,7 +4398,7 @@ longlong Field_double::val_int(void)
|
|||||||
bool error;
|
bool error;
|
||||||
float8get(j,ptr);
|
float8get(j,ptr);
|
||||||
|
|
||||||
res= double_to_longlong(j, 0, &error);
|
res= double_to_longlong(j, want_unsigned_result, &error);
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
ErrConvDouble err(j);
|
ErrConvDouble err(j);
|
||||||
|
@ -420,6 +420,10 @@ public:
|
|||||||
enum_check_fields check_level);
|
enum_check_fields check_level);
|
||||||
virtual double val_real(void)=0;
|
virtual double val_real(void)=0;
|
||||||
virtual longlong val_int(void)=0;
|
virtual longlong val_int(void)=0;
|
||||||
|
virtual ulonglong val_uint(void)
|
||||||
|
{
|
||||||
|
return (ulonglong) val_int();
|
||||||
|
}
|
||||||
virtual my_decimal *val_decimal(my_decimal *);
|
virtual my_decimal *val_decimal(my_decimal *);
|
||||||
inline String *val_str(String *str) { return val_str(str, str); }
|
inline String *val_str(String *str) { return val_str(str, str); }
|
||||||
/*
|
/*
|
||||||
@ -1554,6 +1558,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
class Field_double :public Field_real {
|
class Field_double :public Field_real {
|
||||||
|
longlong val_int_from_real(bool want_unsigned_result);
|
||||||
public:
|
public:
|
||||||
Field_double(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
|
Field_double(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
|
||||||
uchar null_bit_arg,
|
uchar null_bit_arg,
|
||||||
@ -1580,7 +1585,8 @@ public:
|
|||||||
int store(longlong nr, bool unsigned_val);
|
int store(longlong nr, bool unsigned_val);
|
||||||
int reset(void) { bzero(ptr,sizeof(double)); return 0; }
|
int reset(void) { bzero(ptr,sizeof(double)); return 0; }
|
||||||
double val_real(void);
|
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 *);
|
String *val_str(String*,String *);
|
||||||
bool send_binary(Protocol *protocol);
|
bool send_binary(Protocol *protocol);
|
||||||
int cmp(const uchar *,const uchar *);
|
int cmp(const uchar *,const uchar *);
|
||||||
|
@ -7274,7 +7274,7 @@ no_commit:
|
|||||||
table->next_number_field);
|
table->next_number_field);
|
||||||
|
|
||||||
/* Get the value that MySQL attempted to store in the table.*/
|
/* 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) {
|
switch (error) {
|
||||||
case DB_DUPLICATE_KEY:
|
case DB_DUPLICATE_KEY:
|
||||||
@ -7735,7 +7735,7 @@ ha_innobase::update_row(
|
|||||||
ulonglong auto_inc;
|
ulonglong auto_inc;
|
||||||
ulonglong col_max_value;
|
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
|
/* We need the upper limit of the col type to check for
|
||||||
whether we update the table autoinc counter or not. */
|
whether we update the table autoinc counter or not. */
|
||||||
|
@ -7988,7 +7988,7 @@ no_commit:
|
|||||||
table->next_number_field);
|
table->next_number_field);
|
||||||
|
|
||||||
/* Get the value that MySQL attempted to store in the table.*/
|
/* 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) {
|
switch (error) {
|
||||||
case DB_DUPLICATE_KEY:
|
case DB_DUPLICATE_KEY:
|
||||||
@ -8468,7 +8468,7 @@ ha_innobase::update_row(
|
|||||||
ulonglong auto_inc;
|
ulonglong auto_inc;
|
||||||
ulonglong col_max_value;
|
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
|
/* We need the upper limit of the col type to check for
|
||||||
whether we update the table autoinc counter or not. */
|
whether we update the table autoinc counter or not. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user