Skip to content

Commit

Permalink
An after-fix for MDEV-14008 Assertion failing: `!is_set() || (m_statu…
Browse files Browse the repository at this point in the history
…s == DA_OK_BULK && is_bulk_op())

Fixing an additional failure discovered after a merge to 10.2
  • Loading branch information
Alexander Barkov committed Dec 20, 2017
1 parent f7f5c71 commit cb121a0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
6 changes: 6 additions & 0 deletions mysql-test/suite/innodb/r/innodb-autoinc.result
Original file line number Diff line number Diff line change
Expand Up @@ -1360,3 +1360,9 @@ SELECT * FROM t1;
c1
1e19
DROP TABLE t1;
CREATE TABLE t1 (a DOUBLE PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (-1);
SELECT * FROM t1;
a
-1
DROP TABLE t1;
5 changes: 5 additions & 0 deletions mysql-test/suite/innodb/t/innodb-autoinc.test
Original file line number Diff line number Diff line change
Expand Up @@ -692,3 +692,8 @@ CREATE TABLE t1 (
INSERT INTO t1 VALUES ();
SELECT * FROM t1;
DROP TABLE t1;

CREATE TABLE t1 (a DOUBLE PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (-1);
SELECT * FROM t1;
DROP TABLE t1;
9 changes: 8 additions & 1 deletion sql/field.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4399,7 +4399,14 @@ longlong Field_double::val_int_from_real(bool want_unsigned_result)
float8get(j,ptr);

res= double_to_longlong(j, want_unsigned_result, &error);
if (error)
/*
Note, val_uint() is currently used for auto_increment purposes only,
and we want to suppress all warnings in such cases.
If we ever start using val_uint() for other purposes,
val_int_from_real() will need a new separate parameter to
suppress warnings.
*/
if (error && !want_unsigned_result)
{
ErrConvDouble err(j);
push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
Expand Down

0 comments on commit cb121a0

Please sign in to comment.