Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c1e5fef0
Commit
c1e5fef0
authored
Dec 18, 2017
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-14008 Assertion failing: `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())
parent
9d76b274
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
7 deletions
+37
-7
mysql-test/suite/innodb/r/innodb-autoinc.result
mysql-test/suite/innodb/r/innodb-autoinc.result
+12
-0
mysql-test/suite/innodb/t/innodb-autoinc.test
mysql-test/suite/innodb/t/innodb-autoinc.test
+12
-0
sql/field.cc
sql/field.cc
+2
-2
sql/field.h
sql/field.h
+7
-1
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+2
-2
storage/xtradb/handler/ha_innodb.cc
storage/xtradb/handler/ha_innodb.cc
+2
-2
No files found.
mysql-test/suite/innodb/r/innodb-autoinc.result
View file @
c1e5fef0
...
...
@@ -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;
mysql-test/suite/innodb/t/innodb-autoinc.test
View file @
c1e5fef0
...
...
@@ -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
;
sql/field.cc
View file @
c1e5fef0
...
...
@@ -4390,7 +4390,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
;
...
...
@@ -4398,7 +4398,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
)
{
ErrConvDouble
err
(
j
);
...
...
sql/field.h
View file @
c1e5fef0
...
...
@@ -420,6 +420,10 @@ class Field
enum_check_fields
check_level
);
virtual
double
val_real
(
void
)
=
0
;
virtual
longlong
val_int
(
void
)
=
0
;
virtual
ulonglong
val_uint
(
void
)
{
return
(
ulonglong
)
val_int
();
}
virtual
my_decimal
*
val_decimal
(
my_decimal
*
);
inline
String
*
val_str
(
String
*
str
)
{
return
val_str
(
str
,
str
);
}
/*
...
...
@@ -1554,6 +1558,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
,
...
...
@@ -1580,7 +1585,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
*
);
...
...
storage/innobase/handler/ha_innodb.cc
View file @
c1e5fef0
...
...
@@ -7274,7 +7274,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_
u
int
();
switch
(
error
)
{
case
DB_DUPLICATE_KEY
:
...
...
@@ -7735,7 +7735,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_
u
int
();
/* We need the upper limit of the col type to check for
whether we update the table autoinc counter or not. */
...
...
storage/xtradb/handler/ha_innodb.cc
View file @
c1e5fef0
...
...
@@ -7988,7 +7988,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_
u
int
();
switch
(
error
)
{
case
DB_DUPLICATE_KEY
:
...
...
@@ -8468,7 +8468,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_
u
int
();
/* We need the upper limit of the col type to check for
whether we update the table autoinc counter or not. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment