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
3dac4e9f
Commit
3dac4e9f
authored
Jan 23, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
MDEV-18338 Merge new release of InnoDB 5.7.25 to 10.2
parents
9a7281a7
d283f80e
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
84 additions
and
10 deletions
+84
-10
mysql-test/suite/gcol/r/innodb_virtual_fk_restart.result
mysql-test/suite/gcol/r/innodb_virtual_fk_restart.result
+9
-0
mysql-test/suite/gcol/r/innodb_virtual_index.result
mysql-test/suite/gcol/r/innodb_virtual_index.result
+23
-0
mysql-test/suite/gcol/t/innodb_virtual_fk_restart.test
mysql-test/suite/gcol/t/innodb_virtual_fk_restart.test
+9
-0
mysql-test/suite/gcol/t/innodb_virtual_index.test
mysql-test/suite/gcol/t/innodb_virtual_index.test
+18
-0
mysql-test/suite/sys_vars/r/sysvars_innodb.result
mysql-test/suite/sys_vars/r/sysvars_innodb.result
+1
-1
storage/innobase/include/row0upd.h
storage/innobase/include/row0upd.h
+5
-3
storage/innobase/include/univ.i
storage/innobase/include/univ.i
+1
-1
storage/innobase/row/row0ins.cc
storage/innobase/row/row0ins.cc
+6
-2
storage/innobase/row/row0log.cc
storage/innobase/row/row0log.cc
+4
-1
storage/innobase/row/row0upd.cc
storage/innobase/row/row0upd.cc
+8
-2
No files found.
mysql-test/suite/gcol/r/innodb_virtual_fk_restart.result
View file @
3dac4e9f
...
@@ -7,9 +7,18 @@ CREATE TABLE t1(fld1 INT NOT NULL PRIMARY KEY) engine=innodb;
...
@@ -7,9 +7,18 @@ CREATE TABLE t1(fld1 INT NOT NULL PRIMARY KEY) engine=innodb;
CREATE TABLE t2(fld1 INT NOT NULL, fld2 INT NOT NULL,
CREATE TABLE t2(fld1 INT NOT NULL, fld2 INT NOT NULL,
fld3 INT AS (fld2) VIRTUAL, KEY(fld1),
fld3 INT AS (fld2) VIRTUAL, KEY(fld1),
FOREIGN KEY(fld1) REFERENCES t1(fld1) ON UPDATE CASCADE) engine=innodb;
FOREIGN KEY(fld1) REFERENCES t1(fld1) ON UPDATE CASCADE) engine=innodb;
CREATE TABLE u1(a INT, KEY(a)) ENGINE=InnoDB;
CREATE TABLE u2(b INT, vb INT GENERATED ALWAYS AS(b) VIRTUAL, KEY(vb),
FOREIGN KEY(b) REFERENCES u1(a)ON DELETE CASCADE)ENGINE=InnoDB;
INSERT INTO u1 SET a=1;
INSERT INTO u2 SET b=1;
INSERT INTO t1(fld1) VALUES(1);
INSERT INTO t1(fld1) VALUES(1);
INSERT INTO t2(fld1, fld2) VALUES(1, 2);
INSERT INTO t2(fld1, fld2) VALUES(1, 2);
UPDATE t1 SET fld1= 2;
UPDATE t1 SET fld1= 2;
DELETE FROM u1;
SELECT * FROM u2;
b vb
DROP TABLE u2,u1;
SELECT fld3, fld1 FROM t2;
SELECT fld3, fld1 FROM t2;
fld3 fld1
fld3 fld1
2 2
2 2
...
...
mysql-test/suite/gcol/r/innodb_virtual_index.result
View file @
3dac4e9f
...
@@ -243,3 +243,26 @@ KEY (a(1))
...
@@ -243,3 +243,26 @@ KEY (a(1))
INSERT INTO t1(b) VALUES(REPEAT('b',1000));
INSERT INTO t1(b) VALUES(REPEAT('b',1000));
DELETE FROM t1;
DELETE FROM t1;
DROP TABLE t1;
DROP TABLE t1;
#
# Bug #22990029 GCOLS: INCORRECT BEHAVIOR
# AFTER DATA INSERTED WITH IGNORE KEYWORD
#
CREATE TABLE t1(a INT PRIMARY KEY, b INT, vb DATE AS(b) VIRTUAL, KEY(vb))
ENGINE=InnoDB;
INSERT IGNORE INTO t1 (a,b) VALUES(1,20190132);
Warnings:
Warning 1265 Data truncated for column 'vb' at row 1
BEGIN;
DELETE FROM t1;
INSERT INTO t1 (a,b) VALUES(1,20190123);
ERROR 22007: Incorrect date value: '20190132' for column `test`.`t1`.`vb` at row 1
SELECT * FROM t1;
a b vb
ROLLBACK;
SELECT * FROM t1;
a b vb
1 20190132 0000-00-00
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
mysql-test/suite/gcol/t/innodb_virtual_fk_restart.test
View file @
3dac4e9f
...
@@ -11,10 +11,19 @@ CREATE TABLE t1(fld1 INT NOT NULL PRIMARY KEY) engine=innodb;
...
@@ -11,10 +11,19 @@ CREATE TABLE t1(fld1 INT NOT NULL PRIMARY KEY) engine=innodb;
CREATE
TABLE
t2
(
fld1
INT
NOT
NULL
,
fld2
INT
NOT
NULL
,
CREATE
TABLE
t2
(
fld1
INT
NOT
NULL
,
fld2
INT
NOT
NULL
,
fld3
INT
AS
(
fld2
)
VIRTUAL
,
KEY
(
fld1
),
fld3
INT
AS
(
fld2
)
VIRTUAL
,
KEY
(
fld1
),
FOREIGN
KEY
(
fld1
)
REFERENCES
t1
(
fld1
)
ON
UPDATE
CASCADE
)
engine
=
innodb
;
FOREIGN
KEY
(
fld1
)
REFERENCES
t1
(
fld1
)
ON
UPDATE
CASCADE
)
engine
=
innodb
;
CREATE
TABLE
u1
(
a
INT
,
KEY
(
a
))
ENGINE
=
InnoDB
;
CREATE
TABLE
u2
(
b
INT
,
vb
INT
GENERATED
ALWAYS
AS
(
b
)
VIRTUAL
,
KEY
(
vb
),
FOREIGN
KEY
(
b
)
REFERENCES
u1
(
a
)
ON
DELETE
CASCADE
)
ENGINE
=
InnoDB
;
INSERT
INTO
u1
SET
a
=
1
;
INSERT
INTO
u2
SET
b
=
1
;
INSERT
INTO
t1
(
fld1
)
VALUES
(
1
);
INSERT
INTO
t1
(
fld1
)
VALUES
(
1
);
INSERT
INTO
t2
(
fld1
,
fld2
)
VALUES
(
1
,
2
);
INSERT
INTO
t2
(
fld1
,
fld2
)
VALUES
(
1
,
2
);
--
source
include
/
restart_mysqld
.
inc
--
source
include
/
restart_mysqld
.
inc
UPDATE
t1
SET
fld1
=
2
;
UPDATE
t1
SET
fld1
=
2
;
DELETE
FROM
u1
;
SELECT
*
FROM
u2
;
DROP
TABLE
u2
,
u1
;
SELECT
fld3
,
fld1
FROM
t2
;
SELECT
fld3
,
fld1
FROM
t2
;
alter
TABLE
t2
ADD
INDEX
vk
(
fld3
,
fld1
),
ALGORITHM
=
INPLACE
;
alter
TABLE
t2
ADD
INDEX
vk
(
fld3
,
fld1
),
ALGORITHM
=
INPLACE
;
UPDATE
t1
SET
fld1
=
3
;
UPDATE
t1
SET
fld1
=
3
;
...
...
mysql-test/suite/gcol/t/innodb_virtual_index.test
View file @
3dac4e9f
...
@@ -263,3 +263,21 @@ CREATE TABLE t1(
...
@@ -263,3 +263,21 @@ CREATE TABLE t1(
INSERT
INTO
t1
(
b
)
VALUES
(
REPEAT
(
'b'
,
1000
));
INSERT
INTO
t1
(
b
)
VALUES
(
REPEAT
(
'b'
,
1000
));
DELETE
FROM
t1
;
DELETE
FROM
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug #22990029 GCOLS: INCORRECT BEHAVIOR
--
echo
# AFTER DATA INSERTED WITH IGNORE KEYWORD
--
echo
#
CREATE
TABLE
t1
(
a
INT
PRIMARY
KEY
,
b
INT
,
vb
DATE
AS
(
b
)
VIRTUAL
,
KEY
(
vb
))
ENGINE
=
InnoDB
;
INSERT
IGNORE
INTO
t1
(
a
,
b
)
VALUES
(
1
,
20190132
);
BEGIN
;
DELETE
FROM
t1
;
--
error
ER_TRUNCATED_WRONG_VALUE
INSERT
INTO
t1
(
a
,
b
)
VALUES
(
1
,
20190123
);
SELECT
*
FROM
t1
;
ROLLBACK
;
SELECT
*
FROM
t1
;
CHECK
TABLE
t1
;
DROP
TABLE
t1
;
mysql-test/suite/sys_vars/r/sysvars_innodb.result
View file @
3dac4e9f
...
@@ -3074,7 +3074,7 @@ READ_ONLY NO
...
@@ -3074,7 +3074,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_VERSION
VARIABLE_NAME INNODB_VERSION
SESSION_VALUE NULL
SESSION_VALUE NULL
GLOBAL_VALUE 5.7.2
4
GLOBAL_VALUE 5.7.2
5
GLOBAL_VALUE_ORIGIN COMPILE-TIME
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NULL
DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_SCOPE GLOBAL
...
...
storage/innobase/include/row0upd.h
View file @
3dac4e9f
/*****************************************************************************
/*****************************************************************************
Copyright (c) 1996, 201
6
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1996, 201
8
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2018, MariaDB Corporation.
Copyright (c) 2018, MariaDB Corporation.
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
...
@@ -219,6 +219,7 @@ the equal ordering fields. NOTE: we compare the fields as binary strings!
...
@@ -219,6 +219,7 @@ the equal ordering fields. NOTE: we compare the fields as binary strings!
@param[in] heap memory heap from which allocated
@param[in] heap memory heap from which allocated
@param[in,out] mysql_table NULL, or mysql table object when
@param[in,out] mysql_table NULL, or mysql table object when
user thread invokes dml
user thread invokes dml
@param[out] error error number in case of failure
@return own: update vector of differing fields, excluding roll ptr and
@return own: update vector of differing fields, excluding roll ptr and
trx id */
trx id */
upd_t
*
upd_t
*
...
@@ -230,8 +231,9 @@ row_upd_build_difference_binary(
...
@@ -230,8 +231,9 @@ row_upd_build_difference_binary(
bool
no_sys
,
bool
no_sys
,
trx_t
*
trx
,
trx_t
*
trx
,
mem_heap_t
*
heap
,
mem_heap_t
*
heap
,
TABLE
*
mysql_table
)
TABLE
*
mysql_table
,
MY_ATTRIBUTE
((
nonnull
(
1
,
2
,
3
,
7
),
warn_unused_result
));
dberr_t
*
error
)
MY_ATTRIBUTE
((
nonnull
(
1
,
2
,
3
,
7
,
9
),
warn_unused_result
));
/***********************************************************//**
/***********************************************************//**
Replaces the new column values stored in the update vector to the index entry
Replaces the new column values stored in the update vector to the index entry
given. */
given. */
...
...
storage/innobase/include/univ.i
View file @
3dac4e9f
...
@@ -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
2
4
#
define
INNODB_VERSION_BUGFIX
2
5
/* 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;
...
...
storage/innobase/row/row0ins.cc
View file @
3dac4e9f
...
@@ -326,7 +326,7 @@ row_ins_clust_index_entry_by_modify(
...
@@ -326,7 +326,7 @@ row_ins_clust_index_entry_by_modify(
{
{
const
rec_t
*
rec
;
const
rec_t
*
rec
;
upd_t
*
update
;
upd_t
*
update
;
dberr_t
err
;
dberr_t
err
=
DB_SUCCESS
;
btr_cur_t
*
cursor
=
btr_pcur_get_btr_cur
(
pcur
);
btr_cur_t
*
cursor
=
btr_pcur_get_btr_cur
(
pcur
);
TABLE
*
mysql_table
=
NULL
;
TABLE
*
mysql_table
=
NULL
;
ut_ad
(
dict_index_is_clust
(
cursor
->
index
));
ut_ad
(
dict_index_is_clust
(
cursor
->
index
));
...
@@ -349,7 +349,11 @@ row_ins_clust_index_entry_by_modify(
...
@@ -349,7 +349,11 @@ row_ins_clust_index_entry_by_modify(
update
=
row_upd_build_difference_binary
(
update
=
row_upd_build_difference_binary
(
cursor
->
index
,
entry
,
rec
,
NULL
,
true
,
cursor
->
index
,
entry
,
rec
,
NULL
,
true
,
thr_get_trx
(
thr
),
heap
,
mysql_table
);
thr_get_trx
(
thr
),
heap
,
mysql_table
,
&
err
);
if
(
err
!=
DB_SUCCESS
)
{
return
(
err
);
}
if
(
mode
!=
BTR_MODIFY_TREE
)
{
if
(
mode
!=
BTR_MODIFY_TREE
)
{
ut_ad
((
mode
&
~
BTR_ALREADY_S_LATCHED
)
==
BTR_MODIFY_LEAF
);
ut_ad
((
mode
&
~
BTR_ALREADY_S_LATCHED
)
==
BTR_MODIFY_LEAF
);
...
...
storage/innobase/row/row0log.cc
View file @
3dac4e9f
...
@@ -2042,7 +2042,10 @@ row_log_table_apply_update(
...
@@ -2042,7 +2042,10 @@ row_log_table_apply_update(
row
,
NULL
,
index
,
heap
,
ROW_BUILD_NORMAL
);
row
,
NULL
,
index
,
heap
,
ROW_BUILD_NORMAL
);
upd_t
*
update
=
row_upd_build_difference_binary
(
upd_t
*
update
=
row_upd_build_difference_binary
(
index
,
entry
,
btr_pcur_get_rec
(
&
pcur
),
cur_offsets
,
index
,
entry
,
btr_pcur_get_rec
(
&
pcur
),
cur_offsets
,
false
,
NULL
,
heap
,
dup
->
table
);
false
,
NULL
,
heap
,
dup
->
table
,
&
error
);
if
(
error
!=
DB_SUCCESS
)
{
goto
func_exit
;
}
if
(
!
update
->
n_fields
)
{
if
(
!
update
->
n_fields
)
{
/* Nothing to do. */
/* Nothing to do. */
...
...
storage/innobase/row/row0upd.cc
View file @
3dac4e9f
...
@@ -1036,8 +1036,9 @@ the equal ordering fields. NOTE: we compare the fields as binary strings!
...
@@ -1036,8 +1036,9 @@ the equal ordering fields. NOTE: we compare the fields as binary strings!
@param[in] heap memory heap from which allocated
@param[in] heap memory heap from which allocated
@param[in] mysql_table NULL, or mysql table object when
@param[in] mysql_table NULL, or mysql table object when
user thread invokes dml
user thread invokes dml
@param[out] error error number in case of failure
@return own: update vector of differing fields, excluding roll ptr and
@return own: update vector of differing fields, excluding roll ptr and
trx id */
trx id
,if error is not equal to DB_SUCCESS, return NULL
*/
upd_t
*
upd_t
*
row_upd_build_difference_binary
(
row_upd_build_difference_binary
(
dict_index_t
*
index
,
dict_index_t
*
index
,
...
@@ -1047,7 +1048,8 @@ row_upd_build_difference_binary(
...
@@ -1047,7 +1048,8 @@ row_upd_build_difference_binary(
bool
no_sys
,
bool
no_sys
,
trx_t
*
trx
,
trx_t
*
trx
,
mem_heap_t
*
heap
,
mem_heap_t
*
heap
,
TABLE
*
mysql_table
)
TABLE
*
mysql_table
,
dberr_t
*
error
)
{
{
upd_field_t
*
upd_field
;
upd_field_t
*
upd_field
;
dfield_t
*
dfield
;
dfield_t
*
dfield
;
...
@@ -1159,6 +1161,10 @@ row_upd_build_difference_binary(
...
@@ -1159,6 +1161,10 @@ row_upd_build_difference_binary(
update
->
old_vrow
,
col
,
index
,
update
->
old_vrow
,
col
,
index
,
&
v_heap
,
heap
,
NULL
,
thd
,
mysql_table
,
record
,
&
v_heap
,
heap
,
NULL
,
thd
,
mysql_table
,
record
,
NULL
,
NULL
,
NULL
);
NULL
,
NULL
,
NULL
);
if
(
vfield
==
NULL
)
{
*
error
=
DB_COMPUTE_VALUE_FAILED
;
return
(
NULL
);
}
if
(
!
dfield_data_is_binary_equal
(
if
(
!
dfield_data_is_binary_equal
(
dfield
,
vfield
->
len
,
dfield
,
vfield
->
len
,
...
...
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