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
cac6f0a8
Commit
cac6f0a8
authored
Jun 29, 2022
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.6 into 10.7
parents
ac0af4ec
c1e3fc0e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
24 deletions
+47
-24
mysql-test/main/backup_locks.result
mysql-test/main/backup_locks.result
+1
-1
mysql-test/main/backup_locks.test
mysql-test/main/backup_locks.test
+1
-1
mysql-test/suite/encryption/r/innodb-redo-nokeys.result
mysql-test/suite/encryption/r/innodb-redo-nokeys.result
+3
-0
mysql-test/suite/encryption/t/innodb-redo-nokeys.test
mysql-test/suite/encryption/t/innodb-redo-nokeys.test
+3
-0
sql/sql_base.cc
sql/sql_base.cc
+34
-15
storage/innobase/log/log0recv.cc
storage/innobase/log/log0recv.cc
+5
-7
No files found.
mysql-test/main/backup_locks.result
View file @
cac6f0a8
...
...
@@ -32,7 +32,7 @@ a
connection con1;
drop table t1;
connection default;
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info
where table_name not like "innodb_%"
;
LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
MDL_SHARED_HIGH_PRIO Table metadata lock test t1
MDL_INTENTION_EXCLUSIVE Schema metadata lock test
...
...
mysql-test/main/backup_locks.test
View file @
cac6f0a8
...
...
@@ -39,7 +39,7 @@ let $wait_condition=
select
count
(
*
)
=
1
from
information_schema
.
processlist
where
state
=
"Waiting for table metadata lock"
;
--
source
include
/
wait_condition
.
inc
SELECT
LOCK_MODE
,
LOCK_TYPE
,
TABLE_SCHEMA
,
TABLE_NAME
FROM
information_schema
.
metadata_lock_info
;
SELECT
LOCK_MODE
,
LOCK_TYPE
,
TABLE_SCHEMA
,
TABLE_NAME
FROM
information_schema
.
metadata_lock_info
where
table_name
not
like
"innodb_%"
;
--
error
ER_LOCK_DEADLOCK
select
*
from
t1
;
backup
unlock
;
...
...
mysql-test/suite/encryption/r/innodb-redo-nokeys.result
View file @
cac6f0a8
...
...
@@ -5,6 +5,9 @@ call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error\\.");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
call mtr.add_suppression("InnoDB: Cannot apply log to \\[page id: space=[1-9][0-9]*, page number=0\\] of corrupted file '.*test.t[1-5]\\.ibd'");
call mtr.add_suppression("InnoDB: Failed to read page .* from file '.*'");
call mtr.add_suppression("InnoDB: OPT_PAGE_CHECKSUM mismatch");
call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore corruption");
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SET GLOBAL innodb_file_per_table = ON;
create table t1(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=20;
...
...
mysql-test/suite/encryption/t/innodb-redo-nokeys.test
View file @
cac6f0a8
...
...
@@ -10,6 +10,9 @@ call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call
mtr
.
add_suppression
(
"Plugin 'InnoDB' init function returned error
\\
."
);
call
mtr
.
add_suppression
(
"Plugin 'InnoDB' registration as a STORAGE ENGINE failed."
);
call
mtr
.
add_suppression
(
"InnoDB: Cannot apply log to
\\
[page id: space=[1-9][0-9]*, page number=0
\\
] of corrupted file '.*test.t[1-5]
\\
.ibd'"
);
call
mtr
.
add_suppression
(
"InnoDB: Failed to read page .* from file '.*'"
);
call
mtr
.
add_suppression
(
"InnoDB: OPT_PAGE_CHECKSUM mismatch"
);
call
mtr
.
add_suppression
(
"InnoDB: Set innodb_force_recovery=1 to ignore corruption"
);
--
let
$restart_parameters
=--
file
-
key
-
management
-
filename
=
$MYSQL_TEST_DIR
/
std_data
/
keys2
.
txt
--
source
include
/
restart_mysqld
.
inc
...
...
sql/sql_base.cc
View file @
cac6f0a8
...
...
@@ -515,7 +515,7 @@ class flush_tables_error_handler : public Internal_error_handler
Sql_condition
**
cond_hdl
)
{
*
cond_hdl
=
NULL
;
if
(
sql_errno
==
ER_OPEN_AS_READONLY
)
if
(
sql_errno
==
ER_OPEN_AS_READONLY
||
sql_errno
==
ER_LOCK_WAIT_TIMEOUT
)
{
handled_errors
++
;
return
TRUE
;
...
...
@@ -600,24 +600,43 @@ bool flush_tables(THD *thd, flush_tables_type flag)
else
{
/*
HA_OPEN_FOR_FLUSH is used to allow us to open the table even if
TABLE_SHARE::incompatible_version is set. It also will tell
SEQUENCE engine that we don't have to read the sequence information
(which may cause deadlocks with concurrently running ALTER TABLE or
ALTER SEQUENCE) as we will close the table at once.
No free TABLE instances available. We have to open a new one.
Try to take a MDL lock to ensure we can open a new table instance.
If the lock fails, it means that some DDL operation or flush tables
with read lock is ongoing.
In this case we cannot sending the HA_EXTRA_FLUSH signal.
*/
if
(
!
open_table_from_share
(
thd
,
share
,
&
empty_clex_str
,
HA_OPEN_KEYFILE
,
0
,
HA_OPEN_FOR_ALTER
|
HA_OPEN_FOR_FLUSH
,
tmp_table
,
FALSE
,
NULL
))
MDL_request
mdl_request
;
MDL_REQUEST_INIT
(
&
mdl_request
,
MDL_key
::
TABLE
,
share
->
db
.
str
,
share
->
table_name
.
str
,
MDL_SHARED
,
MDL_EXPLICIT
);
if
(
!
thd
->
mdl_context
.
acquire_lock
(
&
mdl_request
,
0
))
{
(
void
)
tmp_table
->
file
->
extra
(
HA_EXTRA_FLUSH
);
/*
We don't put the table into the TDC as the table was not fully
opened (we didn't open triggers)
HA_OPEN_FOR_FLUSH is used to allow us to open the table even if
TABLE_SHARE::incompatible_version is set. It also will tell
SEQUENCE engine that we don't have to read the sequence information
(which may cause deadlocks with concurrently running ALTER TABLE or
ALTER SEQUENCE) as we will close the table at once.
*/
closefrm
(
tmp_table
);
if
(
!
open_table_from_share
(
thd
,
share
,
&
empty_clex_str
,
HA_OPEN_KEYFILE
,
0
,
HA_OPEN_FOR_ALTER
|
HA_OPEN_FOR_FLUSH
,
tmp_table
,
FALSE
,
NULL
))
{
(
void
)
tmp_table
->
file
->
extra
(
HA_EXTRA_FLUSH
);
/*
We don't put the table into the TDC as the table was not fully
opened (we didn't open triggers)
*/
closefrm
(
tmp_table
);
}
thd
->
mdl_context
.
release_lock
(
mdl_request
.
ticket
);
}
}
tdc_release_share
(
share
);
...
...
storage/innobase/log/log0recv.cc
View file @
cac6f0a8
...
...
@@ -946,17 +946,13 @@ bool recv_sys_t::recover_deferred(recv_sys_t::map::iterator &p,
(
fil_space_t
::
zip_size
(
flags
),
page
),
size
);
if
(
!
space
)
{
block
->
page
.
lock
.
x_unlock
();
goto
fail
;
}
goto
release_and_fail
;
space
->
free_limit
=
fsp_header_get_field
(
page
,
FSP_FREE_LIMIT
);
space
->
free_len
=
flst_get_len
(
FSP_HEADER_OFFSET
+
FSP_FREE
+
page
);
block
->
page
.
lock
.
x_unlock
();
fil_node_t
*
node
=
UT_LIST_GET_FIRST
(
space
->
chain
);
node
->
deferred
=
true
;
if
(
!
space
->
acquire
())
goto
fail
;
goto
release_and_
fail
;
fil_names_dirty
(
space
);
const
bool
is_compressed
=
fil_space_t
::
is_compressed
(
flags
);
#ifdef _WIN32
...
...
@@ -973,14 +969,16 @@ bool recv_sys_t::recover_deferred(recv_sys_t::map::iterator &p,
~
4095ULL
,
is_sparse
))
{
space
->
release
();
goto
fail
;
goto
release_and_
fail
;
}
node
->
deferred
=
false
;
space
->
release
();
it
->
second
.
space
=
space
;
block
->
page
.
lock
.
x_unlock
();
return
false
;
}
release_and_fail:
block
->
page
.
lock
.
x_unlock
();
}
...
...
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