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
c711abd1
Commit
c711abd1
authored
Apr 27, 2022
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
MDEV-28417 Merge new release of InnoDB 5.7.38 to 10.2
parents
39990135
44a27a26
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
105 additions
and
34 deletions
+105
-34
mysql-test/suite/innodb/r/innodb-autoinc-part.result
mysql-test/suite/innodb/r/innodb-autoinc-part.result
+34
-0
mysql-test/suite/innodb/r/innodb-autoinc.result
mysql-test/suite/innodb/r/innodb-autoinc.result
+24
-1
mysql-test/suite/innodb/t/innodb-autoinc-part.test
mysql-test/suite/innodb/t/innodb-autoinc-part.test
+24
-0
mysql-test/suite/innodb/t/innodb-autoinc.test
mysql-test/suite/innodb/t/innodb-autoinc.test
+17
-6
storage/innobase/buf/buf0flu.cc
storage/innobase/buf/buf0flu.cc
+3
-24
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+2
-2
storage/innobase/include/univ.i
storage/innobase/include/univ.i
+1
-1
No files found.
mysql-test/suite/innodb/r/innodb-autoinc-part.result
0 → 100644
View file @
c711abd1
#
# MDEV-28416 Incorrect AUTO_INCREMENT may be issued
#
SET @aii=@@auto_increment_increment;
SET auto_increment_increment=300;
CREATE TABLE t1 (a SERIAL) ENGINE=innodb
PARTITION BY RANGE (a) (
PARTITION p0 VALUES LESS THAN (6),
PARTITION p1 VALUES LESS THAN MAXVALUE
);
INSERT INTO t1 VALUES (18446744073709551613);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
UNIQUE KEY `a` (`a`)
) ENGINE=InnoDB AUTO_INCREMENT=18446744073709551614 DEFAULT CHARSET=latin1
PARTITION BY RANGE (`a`)
(PARTITION `p0` VALUES LESS THAN (6) ENGINE = InnoDB,
PARTITION `p1` VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
INSERT INTO t1 VALUES (NULL);
ERROR 22003: Out of range value for column 'a' at row 1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
UNIQUE KEY `a` (`a`)
) ENGINE=InnoDB AUTO_INCREMENT=298 DEFAULT CHARSET=latin1
PARTITION BY RANGE (`a`)
(PARTITION `p0` VALUES LESS THAN (6) ENGINE = InnoDB,
PARTITION `p1` VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
DROP TABLE t1;
SET auto_increment_increment=@aii;
# End of 10.2 tests
mysql-test/suite/innodb/r/innodb-autoinc.result
View file @
c711abd1
drop table if exists t1;
CREATE TABLE t1 (c1 BIGINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
CREATE TABLE t1 (c1 BIGINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (9223372036854775807, null);
INSERT INTO t1 VALUES (9223372036854775807, null);
INSERT INTO t1 (c2) VALUES ('innodb');
INSERT INTO t1 (c2) VALUES ('innodb');
...
@@ -1619,3 +1618,27 @@ id name
...
@@ -1619,3 +1618,27 @@ id name
-1 dog
-1 dog
2 cat
2 cat
DROP PROCEDURE autoinc_mdev15353_one;
DROP PROCEDURE autoinc_mdev15353_one;
#
# MDEV-28416 Incorrect AUTO_INCREMENT may be issued
#
SET @aii=@@auto_increment_increment;
SET auto_increment_increment=300;
CREATE TABLE t1 (a SERIAL) ENGINE=innodb;
INSERT INTO t1 VALUES (18446744073709551613);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
UNIQUE KEY `a` (`a`)
) ENGINE=InnoDB AUTO_INCREMENT=18446744073709551614 DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (NULL);
ERROR 22003: Out of range value for column 'a' at row 1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
UNIQUE KEY `a` (`a`)
) ENGINE=InnoDB AUTO_INCREMENT=18446744073709551615 DEFAULT CHARSET=latin1
DROP TABLE t1;
SET auto_increment_increment=@aii;
# End of 10.2 tests
mysql-test/suite/innodb/t/innodb-autoinc-part.test
0 → 100644
View file @
c711abd1
--
source
include
/
have_partition
.
inc
--
source
include
/
have_innodb
.
inc
--
echo
#
--
echo
# MDEV-28416 Incorrect AUTO_INCREMENT may be issued
--
echo
#
SET
@
aii
=@@
auto_increment_increment
;
SET
auto_increment_increment
=
300
;
CREATE
TABLE
t1
(
a
SERIAL
)
ENGINE
=
innodb
PARTITION
BY
RANGE
(
a
)
(
PARTITION
p0
VALUES
LESS
THAN
(
6
),
PARTITION
p1
VALUES
LESS
THAN
MAXVALUE
);
INSERT
INTO
t1
VALUES
(
18446744073709551613
);
SHOW
CREATE
TABLE
t1
;
--
error
HA_ERR_AUTOINC_ERANGE
INSERT
INTO
t1
VALUES
(
NULL
);
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
SET
auto_increment_increment
=@
aii
;
--
echo
# End of 10.2 tests
mysql-test/suite/innodb/t/innodb-autoinc.test
View file @
c711abd1
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_innodb
.
inc
# embedded server ignores 'delayed', so skip this
--
source
include
/
not_embedded
.
inc
--
disable_warnings
drop
table
if
exists
t1
;
--
enable_warnings
#
#
# Bug #34335
# Bug #34335
...
@@ -770,3 +764,20 @@ DROP TABLE t1;
...
@@ -770,3 +764,20 @@ DROP TABLE t1;
SET
@
engine
=
'INNODB'
;
SET
@
engine
=
'INNODB'
;
--
source
include
/
autoinc_mdev15353
.
inc
--
source
include
/
autoinc_mdev15353
.
inc
--
echo
#
--
echo
# MDEV-28416 Incorrect AUTO_INCREMENT may be issued
--
echo
#
SET
@
aii
=@@
auto_increment_increment
;
SET
auto_increment_increment
=
300
;
CREATE
TABLE
t1
(
a
SERIAL
)
ENGINE
=
innodb
;
INSERT
INTO
t1
VALUES
(
18446744073709551613
);
SHOW
CREATE
TABLE
t1
;
--
error
HA_ERR_AUTOINC_ERANGE
INSERT
INTO
t1
VALUES
(
NULL
);
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
SET
auto_increment_increment
=@
aii
;
--
echo
# End of 10.2 tests
storage/innobase/buf/buf0flu.cc
View file @
c711abd1
/*****************************************************************************
/*****************************************************************************
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2013, 202
0
, MariaDB Corporation.
Copyright (c) 2013, 202
2
, MariaDB Corporation.
Copyright (c) 2013, 2014, Fusion-io
Copyright (c) 2013, 2014, Fusion-io
This program is free software; you can redistribute it and/or modify it under
This program is free software; you can redistribute it and/or modify it under
...
@@ -1160,15 +1160,10 @@ buf_flush_page(
...
@@ -1160,15 +1160,10 @@ buf_flush_page(
/* For table residing in temporary tablespace sync is done
/* For table residing in temporary tablespace sync is done
using IO_FIX and so before scheduling for flush ensure that
using IO_FIX and so before scheduling for flush ensure that
page is not fixed. */
page is not fixed. */
flush
=
FALSE
;
return
FALSE
;
}
else
{
}
else
{
rw_lock
=
&
reinterpret_cast
<
buf_block_t
*>
(
bpage
)
->
lock
;
rw_lock
=
&
reinterpret_cast
<
buf_block_t
*>
(
bpage
)
->
lock
;
if
(
flush_type
!=
BUF_FLUSH_LIST
)
{
flush
=
rw_lock_sx_lock_nowait
(
rw_lock
,
BUF_IO_WRITE
);
flush
=
rw_lock_sx_lock_nowait
(
rw_lock
,
BUF_IO_WRITE
);
}
else
{
/* Will SX lock later */
flush
=
TRUE
;
}
}
}
if
(
flush
)
{
if
(
flush
)
{
...
@@ -1190,22 +1185,6 @@ buf_flush_page(
...
@@ -1190,22 +1185,6 @@ buf_flush_page(
buf_pool_mutex_exit
(
buf_pool
);
buf_pool_mutex_exit
(
buf_pool
);
if
(
flush_type
==
BUF_FLUSH_LIST
&&
is_uncompressed
&&
!
rw_lock_sx_lock_nowait
(
rw_lock
,
BUF_IO_WRITE
))
{
if
(
!
fsp_is_system_temporary
(
bpage
->
id
.
space
()))
{
/* avoiding deadlock possibility involves
doublewrite buffer, should flush it, because
it might hold the another block->lock. */
buf_dblwr_flush_buffered_writes
();
}
else
{
buf_dblwr_sync_datafiles
();
}
rw_lock_sx_lock_gen
(
rw_lock
,
BUF_IO_WRITE
);
}
/* If there is an observer that want to know if the asynchronous
/* If there is an observer that want to know if the asynchronous
flushing was sent then notify it.
flushing was sent then notify it.
Note: we set flush observer to a page with x-latch, so we can
Note: we set flush observer to a page with x-latch, so we can
...
...
storage/innobase/handler/ha_innodb.cc
View file @
c711abd1
...
@@ -16970,8 +16970,8 @@ ha_innobase::get_auto_increment(
...
@@ -16970,8 +16970,8 @@ ha_innobase::get_auto_increment(
(3) It is restricted only for insert operations. */
(3) It is restricted only for insert operations. */
if
(
increment
>
1
&&
thd_sql_command
(
m_user_thd
)
!=
SQLCOM_ALTER_TABLE
if
(
increment
>
1
&&
increment
<=
~
autoinc
&&
autoinc
<
col_max_value
&&
autoinc
<
col_max_value
)
{
&&
thd_sql_command
(
m_user_thd
)
!=
SQLCOM_ALTER_TABLE
)
{
ulonglong
prev_auto_inc
=
autoinc
;
ulonglong
prev_auto_inc
=
autoinc
;
...
...
storage/innobase/include/univ.i
View file @
c711abd1
...
@@ -41,7 +41,7 @@ Created 1/20/1994 Heikki Tuuri
...
@@ -41,7 +41,7 @@ Created 1/20/1994 Heikki Tuuri
#
define
INNODB_VERSION_MAJOR
5
#
define
INNODB_VERSION_MAJOR
5
#
define
INNODB_VERSION_MINOR
7
#
define
INNODB_VERSION_MINOR
7
#
define
INNODB_VERSION_BUGFIX
3
7
#
define
INNODB_VERSION_BUGFIX
3
8
/* The following is the InnoDB version as shown in
/* The following is the InnoDB version as shown in
SELECT plugin_version FROM information_schema.plugins;
SELECT plugin_version FROM information_schema.plugins;
...
...
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