Skip to content

Commit cb121a0

Browse files
author
Alexander Barkov
committed
An after-fix for MDEV-14008 Assertion failing: `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())
Fixing an additional failure discovered after a merge to 10.2
1 parent f7f5c71 commit cb121a0

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

mysql-test/suite/innodb/r/innodb-autoinc.result

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,3 +1360,9 @@ SELECT * FROM t1;
13601360
c1
13611361
1e19
13621362
DROP TABLE t1;
1363+
CREATE TABLE t1 (a DOUBLE PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
1364+
INSERT INTO t1 VALUES (-1);
1365+
SELECT * FROM t1;
1366+
a
1367+
-1
1368+
DROP TABLE t1;

mysql-test/suite/innodb/t/innodb-autoinc.test

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,3 +692,8 @@ CREATE TABLE t1 (
692692
INSERT INTO t1 VALUES ();
693693
SELECT * FROM t1;
694694
DROP TABLE t1;
695+
696+
CREATE TABLE t1 (a DOUBLE PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
697+
INSERT INTO t1 VALUES (-1);
698+
SELECT * FROM t1;
699+
DROP TABLE t1;

sql/field.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4399,7 +4399,14 @@ longlong Field_double::val_int_from_real(bool want_unsigned_result)
43994399
float8get(j,ptr);
44004400

44014401
res= double_to_longlong(j, want_unsigned_result, &error);
4402-
if (error)
4402+
/*
4403+
Note, val_uint() is currently used for auto_increment purposes only,
4404+
and we want to suppress all warnings in such cases.
4405+
If we ever start using val_uint() for other purposes,
4406+
val_int_from_real() will need a new separate parameter to
4407+
suppress warnings.
4408+
*/
4409+
if (error && !want_unsigned_result)
44034410
{
44044411
ErrConvDouble err(j);
44054412
push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,

0 commit comments

Comments
 (0)