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
8c029d42
Commit
8c029d42
authored
Jul 02, 2021
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.4 into 10.5
parents
15dcb8bd
a635588b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
95 additions
and
13 deletions
+95
-13
cmake/submodules.cmake
cmake/submodules.cmake
+1
-1
mysql-test/suite/funcs_1/r/is_tables_is_embedded.result
mysql-test/suite/funcs_1/r/is_tables_is_embedded.result
+8
-0
mysql-test/suite/innodb/r/instant_alter_debug,redundant.rdiff
...l-test/suite/innodb/r/instant_alter_debug,redundant.rdiff
+6
-0
mysql-test/suite/innodb/r/instant_alter_debug.result
mysql-test/suite/innodb/r/instant_alter_debug.result
+21
-0
mysql-test/suite/innodb/t/instant_alter_debug.test
mysql-test/suite/innodb/t/instant_alter_debug.test
+26
-0
storage/innobase/rem/rem0rec.cc
storage/innobase/rem/rem0rec.cc
+33
-12
No files found.
cmake/submodules.cmake
View file @
8c029d42
...
...
@@ -28,7 +28,7 @@ IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
RESULT_VARIABLE update_result
)
ELSE
()
MESSAGE
(
STATUS
"Updating submodules"
)
EXECUTE_PROCESS
(
COMMAND
"
${
GIT_EXECUTABLE
}
"
submodule update --init --recursive
EXECUTE_PROCESS
(
COMMAND
"
${
GIT_EXECUTABLE
}
"
submodule update --init --recursive
--depth=1
WORKING_DIRECTORY
"
${
CMAKE_SOURCE_DIR
}
"
RESULT_VARIABLE update_result
)
ENDIF
()
...
...
mysql-test/suite/funcs_1/r/is_tables_is_embedded.result
View file @
8c029d42
...
...
@@ -458,6 +458,8 @@ TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY Y
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
...
...
@@ -831,6 +833,8 @@ TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY Y
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
...
...
@@ -1570,6 +1574,8 @@ TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY Y
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
...
...
@@ -1943,6 +1949,8 @@ TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
TEMPORARY Y
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
...
...
mysql-test/suite/innodb/r/instant_alter_debug,redundant.rdiff
0 → 100644
View file @
8c029d42
@@ -509,4 +509,4 @@
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
instants
-35
+36
mysql-test/suite/innodb/r/instant_alter_debug.result
View file @
8c029d42
...
...
@@ -443,6 +443,27 @@ SET GLOBAL innodb_limit_optimistic_insert_debug=@save_limit;
SELECT * FROM t1;
c2 c
DROP TABLE t1;
#
# MDEV-25236 Online log apply fails for ROW_FORMAT=REDUNDANT tables
#
CREATE TABLE t1
(a INT NOT NULL, b INT, c INT, d INT, e INT, f INT, g INT, h INT, i TEXT)
ENGINE=InnoDB;
ALTER TABLE t1 MODIFY a INT NULL;
SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL alter WAIT_FOR go';
ALTER TABLE t1 ADD PRIMARY KEY (a);
connect con1,localhost,root,,;
set DEBUG_SYNC='now WAIT_FOR alter';
BEGIN;
INSERT INTO t1 SET a=0, i=REPEAT('1', 10000);
ROLLBACK;
set DEBUG_SYNC='now SIGNAL go';
connection default;
disconnect con1;
SELECT * FROM t1;
a b c d e f g h i
DROP TABLE t1;
SET DEBUG_SYNC=RESET;
# End of 10.4 tests
#
# MDEV-22867 Assertion instant.n_core_fields == n_core_fields
...
...
mysql-test/suite/innodb/t/instant_alter_debug.test
View file @
8c029d42
...
...
@@ -512,6 +512,32 @@ SET GLOBAL innodb_limit_optimistic_insert_debug=@save_limit;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-25236 Online log apply fails for ROW_FORMAT=REDUNDANT tables
--
echo
#
CREATE
TABLE
t1
(
a
INT
NOT
NULL
,
b
INT
,
c
INT
,
d
INT
,
e
INT
,
f
INT
,
g
INT
,
h
INT
,
i
TEXT
)
ENGINE
=
InnoDB
;
ALTER
TABLE
t1
MODIFY
a
INT
NULL
;
SET
DEBUG_SYNC
=
'innodb_inplace_alter_table_enter SIGNAL alter WAIT_FOR go'
;
send
ALTER
TABLE
t1
ADD
PRIMARY
KEY
(
a
);
connect
(
con1
,
localhost
,
root
,,);
set
DEBUG_SYNC
=
'now WAIT_FOR alter'
;
BEGIN
;
INSERT
INTO
t1
SET
a
=
0
,
i
=
REPEAT
(
'1'
,
10000
);
ROLLBACK
;
set
DEBUG_SYNC
=
'now SIGNAL go'
;
connection
default
;
reap
;
disconnect
con1
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
SET
DEBUG_SYNC
=
RESET
;
--
echo
# End of 10.4 tests
--
echo
#
...
...
storage/innobase/rem/rem0rec.cc
View file @
8c029d42
...
...
@@ -248,6 +248,8 @@ enum rec_leaf_format {
in ROW_FORMAT=COMPACT,DYNAMIC,COMPRESSED.
This is a special case of rec_init_offsets() and rec_get_offsets_func().
@tparam mblob whether the record includes a metadata BLOB
@tparam redundant_temp whether the record belongs to a temporary file
of a ROW_FORMAT=REDUNDANT table
@param[in] rec leaf-page record
@param[in] index the index that the record belongs in
@param[in] n_core number of core fields (index->n_core_fields)
...
...
@@ -255,7 +257,7 @@ This is a special case of rec_init_offsets() and rec_get_offsets_func().
NULL to refer to index->fields[].col->def_val
@param[in,out] offsets offsets, with valid rec_offs_n_fields(offsets)
@param[in] format record format */
template
<
bool
mblob
=
false
>
template
<
bool
mblob
=
false
,
bool
redundant_temp
=
false
>
static
inline
void
rec_init_offsets_comp_ordinary
(
...
...
@@ -286,7 +288,9 @@ rec_init_offsets_comp_ordinary(
const
unsigned
n_core_null_bytes
=
UNIV_UNLIKELY
(
index
->
n_core_fields
!=
n_core
)
?
UT_BITS_IN_BYTES
(
unsigned
(
index
->
get_n_nullable
(
n_core
)))
:
index
->
n_core_null_bytes
;
:
(
redundant_temp
?
UT_BITS_IN_BYTES
(
index
->
n_nullable
)
:
index
->
n_core_null_bytes
);
if
(
mblob
)
{
ut_ad
(
index
->
table
->
instant
);
...
...
@@ -1121,8 +1125,8 @@ rec_get_nth_field_offs_old(
}
/** Determine the size of a data tuple prefix in ROW_FORMAT=COMPACT.
@tparam mblob
whether the record includes a metadata BLOB
@tparam redundant_temp
whether to use the ROW_FORMAT=REDUNDANT format
@tparam mblob
whether the record includes a metadata BLOB
@tparam redundant_temp
whether to use the ROW_FORMAT=REDUNDANT format
@param[in] index record descriptor; dict_table_is_comp()
is assumed to hold, even if it doesn't
@param[in] dfield array of data fields
...
...
@@ -1169,7 +1173,9 @@ rec_get_converted_size_comp_prefix_low(
-
n_core_fields
);
}
else
{
ut_ad
(
n_fields
<=
n_core_fields
);
extra_size
+=
index
->
n_core_null_bytes
;
extra_size
+=
redundant_temp
?
UT_BITS_IN_BYTES
(
index
->
n_nullable
)
:
index
->
n_core_null_bytes
;
}
ulint
data_size
=
0
;
...
...
@@ -1811,10 +1817,19 @@ rec_init_offsets_temp(
if it was emptied during an ALTER TABLE operation. */
ut_ad
(
index
->
n_core_fields
==
n_core
||
!
index
->
is_instant
());
ut_ad
(
index
->
n_core_fields
>=
n_core
);
rec_init_offsets_comp_ordinary
(
rec
,
index
,
offsets
,
n_core
,
def_val
,
status
==
REC_STATUS_INSTANT
?
REC_LEAF_TEMP_INSTANT
:
REC_LEAF_TEMP
);
if
(
index
->
table
->
not_redundant
())
{
rec_init_offsets_comp_ordinary
(
rec
,
index
,
offsets
,
n_core
,
def_val
,
status
==
REC_STATUS_INSTANT
?
REC_LEAF_TEMP_INSTANT
:
REC_LEAF_TEMP
);
}
else
{
rec_init_offsets_comp_ordinary
<
false
,
true
>
(
rec
,
index
,
offsets
,
n_core
,
def_val
,
status
==
REC_STATUS_INSTANT
?
REC_LEAF_TEMP_INSTANT
:
REC_LEAF_TEMP
);
}
}
/** Determine the offset to each field in temporary file.
...
...
@@ -1829,9 +1844,15 @@ rec_init_offsets_temp(
rec_offs
*
offsets
)
{
ut_ad
(
!
index
->
is_instant
());
rec_init_offsets_comp_ordinary
(
rec
,
index
,
offsets
,
index
->
n_core_fields
,
NULL
,
REC_LEAF_TEMP
);
if
(
index
->
table
->
not_redundant
())
{
rec_init_offsets_comp_ordinary
(
rec
,
index
,
offsets
,
index
->
n_core_fields
,
NULL
,
REC_LEAF_TEMP
);
}
else
{
rec_init_offsets_comp_ordinary
<
false
,
true
>
(
rec
,
index
,
offsets
,
index
->
n_core_fields
,
NULL
,
REC_LEAF_TEMP
);
}
}
/** Convert a data tuple prefix to the temporary file format.
...
...
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