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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
2300edb0
Commit
2300edb0
authored
Jan 27, 2009
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: buf_LRU_invalidate_tablespace(): Fix a race condition:
read zip_size while still holding block_mutex.
parent
b20b32d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
ChangeLog
ChangeLog
+9
-0
buf/buf0lru.c
buf/buf0lru.c
+7
-5
No files found.
ChangeLog
View file @
2300edb0
2009-01-27 The InnoDB Team
* buf/buf0lru.c:
Fix a race condition in buf_LRU_invalidate_tablespace():
The compressed page size (zip_size) was read while the block
descriptor was no longer protected by a mutex. This could lead to
corruption when a table is dropped on a busy system that contains
compressed tables.
2009-01-26 The InnoDB Team
* include/buf0buf.h, include/buf0buf.ic, buf/buf0buf.c,
...
...
buf/buf0lru.c
View file @
2300edb0
...
...
@@ -300,7 +300,6 @@ buf_LRU_invalidate_tablespace(
ulint
id
)
/* in: space id */
{
buf_page_t
*
bpage
;
ulint
page_no
;
ibool
all_freed
;
/* Before we attempt to drop pages one by one we first
...
...
@@ -351,18 +350,21 @@ scan_again:
#endif
if
(
buf_page_get_state
(
bpage
)
==
BUF_BLOCK_FILE_PAGE
&&
((
buf_block_t
*
)
bpage
)
->
is_hashed
)
{
page_no
=
buf_page_get_page_no
(
bpage
);
ulint
page_no
;
ulint
zip_size
;
buf_pool_mutex_exit
();
zip_size
=
buf_page_get_zip_size
(
bpage
);
page_no
=
buf_page_get_page_no
(
bpage
);
mutex_exit
(
block_mutex
);
/* Note that the following call will acquire
an S-latch on the page */
btr_search_drop_page_hash_when_freed
(
id
,
buf_page_get_zip_size
(
bpage
),
page_no
);
id
,
zip_size
,
page_no
);
goto
scan_again
;
}
...
...
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