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
a8c22dae
Commit
a8c22dae
authored
Jun 16, 2022
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.6 into 10.7
parents
42d3a7b6
5bb90cb2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
25 deletions
+42
-25
extra/mariabackup/xtrabackup.cc
extra/mariabackup/xtrabackup.cc
+19
-19
storage/innobase/buf/buf0buf.cc
storage/innobase/buf/buf0buf.cc
+10
-1
storage/innobase/buf/buf0lru.cc
storage/innobase/buf/buf0lru.cc
+4
-4
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+2
-0
storage/innobase/include/buf0buf.h
storage/innobase/include/buf0buf.h
+1
-1
storage/innobase/include/buf0types.h
storage/innobase/include/buf0types.h
+6
-0
No files found.
extra/mariabackup/xtrabackup.cc
View file @
a8c22dae
...
...
@@ -4616,32 +4616,32 @@ static bool xtrabackup_backup_func()
reread_log_header:
dberr_t
err
=
recv_find_max_checkpoint
(
&
max_cp_field
);
if
(
err
!=
DB_SUCCESS
)
{
if
(
err
!=
DB_SUCCESS
)
msg
(
"Error: cannot read redo log header"
);
unlock_and_fail:
mysql_mutex_unlock
(
&
log_sys
.
mutex
);
}
if
(
log_sys
.
log
.
format
==
0
)
{
else
if
(
log_sys
.
log
.
format
==
0
)
{
msg
(
"Error: cannot process redo log before MariaDB 10.2.2"
);
goto
unlock_and_fail
;
err
=
DB_ERROR
;
}
else
{
byte
*
buf
=
log_sys
.
checkpoint_buf
;
checkpoint_lsn_start
=
log_sys
.
log
.
get_lsn
();
checkpoint_no_start
=
log_sys
.
next_checkpoint_no
;
byte
*
buf
=
log_sys
.
checkpoint_buf
;
checkpoint_lsn_start
=
log_sys
.
log
.
get_lsn
();
checkpoint_no_start
=
log_sys
.
next_checkpoint_no
;
log_sys
.
log
.
read
(
max_cp_field
,
{
buf
,
OS_FILE_LOG_BLOCK_SIZE
});
if
(
checkpoint_no_start
!=
mach_read_from_8
(
buf
+
LOG_CHECKPOINT_NO
)
||
checkpoint_lsn_start
!=
mach_read_from_8
(
buf
+
LOG_CHECKPOINT_LSN
)
||
log_sys
.
log
.
get_lsn_offset
()
!=
mach_read_from_8
(
buf
+
LOG_CHECKPOINT_OFFSET
))
goto
reread_log_header
;
log_sys
.
log
.
read
(
max_cp_field
,
{
buf
,
OS_FILE_LOG_BLOCK_SIZE
});
if
(
checkpoint_no_start
!=
mach_read_from_8
(
buf
+
LOG_CHECKPOINT_NO
)
||
checkpoint_lsn_start
!=
mach_read_from_8
(
buf
+
LOG_CHECKPOINT_LSN
)
||
log_sys
.
log
.
get_lsn_offset
()
!=
mach_read_from_8
(
buf
+
LOG_CHECKPOINT_OFFSET
))
goto
reread_log_header
;
}
mysql_mutex_unlock
(
&
log_sys
.
mutex
);
if
(
err
!=
DB_SUCCESS
)
goto
fail
;
xtrabackup_init_datasinks
();
if
(
!
select_history
())
{
...
...
storage/innobase/buf/buf0buf.cc
View file @
a8c22dae
...
...
@@ -2869,7 +2869,9 @@ buf_page_get_low(
*
err
=
e
;
}
buf_pool
.
corrupted_evict
(
&
block
->
page
,
state
);
if
(
block
->
page
.
id
().
is_corrupted
())
{
buf_pool
.
corrupted_evict
(
&
block
->
page
,
state
);
}
return
nullptr
;
}
...
...
@@ -3207,6 +3209,7 @@ static buf_block_t *buf_page_create_low(page_id_t page_id, ulint zip_size,
free_block
->
initialise
(
page_id
,
zip_size
,
buf_page_t
::
MEMORY
);
buf_pool_t
::
hash_chain
&
chain
=
buf_pool
.
page_hash
.
cell_get
(
page_id
.
fold
());
retry:
mysql_mutex_lock
(
&
buf_pool
.
mutex
);
buf_page_t
*
bpage
=
buf_pool
.
page_hash
.
get
(
page_id
,
chain
);
...
...
@@ -3225,6 +3228,12 @@ static buf_block_t *buf_page_create_low(page_id_t page_id, ulint zip_size,
{
mysql_mutex_unlock
(
&
buf_pool
.
mutex
);
bpage
->
lock
.
x_lock
();
const
page_id_t
id
{
bpage
->
id
()};
if
(
UNIV_UNLIKELY
(
id
!=
page_id
))
{
ut_ad
(
id
.
is_corrupted
());
goto
retry
;
}
mysql_mutex_lock
(
&
buf_pool
.
mutex
);
}
...
...
storage/innobase/buf/buf0lru.cc
View file @
a8c22dae
...
...
@@ -1218,14 +1218,14 @@ void buf_pool_t::corrupted_evict(buf_page_t *bpage, uint32_t state)
ut_ad
(
!
bpage
->
oldest_modification
());
bpage
->
set_corrupt_id
();
auto
unfix
=
state
-
buf_page_t
::
UNFIX
ED
;
auto
unfix
=
state
-
buf_page_t
::
FRE
ED
;
auto
s
=
bpage
->
zip
.
fix
.
fetch_sub
(
unfix
)
-
unfix
;
bpage
->
lock
.
x_unlock
(
true
);
while
(
s
!=
buf_page_t
::
UNFIXED
)
while
(
s
!=
buf_page_t
::
FREED
||
bpage
->
lock
.
is_locked_or_waiting
()
)
{
ut_ad
(
s
>
buf_page_t
::
UNFIX
ED
);
ut_ad
(
s
<
buf_page_t
::
READ_FIX
);
ut_ad
(
s
>
=
buf_page_t
::
FRE
ED
);
ut_ad
(
s
<
buf_page_t
::
UNFIXED
);
/* Wait for other threads to release the fix count
before releasing the bpage from LRU list. */
(
void
)
LF_BACKOFF
();
...
...
storage/innobase/handler/handler0alter.cc
View file @
a8c22dae
...
...
@@ -7614,6 +7614,7 @@ ha_innobase::prepare_inplace_alter_table(
if
(
!
(
ha_alter_info
->
handler_flags
&
~
INNOBASE_INPLACE_IGNORE
))
{
/* Nothing to do */
DBUG_ASSERT
(
!
m_prebuilt
->
trx
->
dict_operation_lock_mode
);
m_prebuilt
->
trx_id
=
0
;
DBUG_RETURN
(
false
);
}
...
...
@@ -10423,6 +10424,7 @@ commit_try_norebuild(
sql_print_error
(
"InnoDB: %s: %s
\n
"
,
op
,
ut_strerr
(
error
));
DBUG_ASSERT
(
error
==
DB_IO_ERROR
||
error
==
DB_LOCK_TABLE_FULL
||
error
==
DB_DECRYPTION_FAILED
||
error
==
DB_PAGE_CORRUPTED
||
error
==
DB_CORRUPTION
);
...
...
storage/innobase/include/buf0buf.h
View file @
a8c22dae
...
...
@@ -2007,7 +2007,7 @@ inline void buf_page_t::set_corrupt_id()
is_write_locked
());
}
#endif
id_
=
page_id_t
(
~
0ULL
);
id_
.
set_corrupted
(
);
}
/** Set oldest_modification when adding to buf_pool.flush_list */
...
...
storage/innobase/include/buf0types.h
View file @
a8c22dae
...
...
@@ -148,6 +148,12 @@ class page_id_t
constexpr
ulonglong
raw
()
const
{
return
m_id
;
}
/** Flag the page identifier as corrupted. */
void
set_corrupted
()
{
m_id
=
~
0ULL
;
}
/** @return whether the page identifier belongs to a corrupted page */
constexpr
bool
is_corrupted
()
const
{
return
m_id
==
~
0ULL
;
}
private:
/** The page identifier */
uint64_t
m_id
;
...
...
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