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
4a1869b1
Commit
4a1869b1
authored
Nov 09, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-4.1-maint
into neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
parents
f11d8839
870b2e0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
13 deletions
+31
-13
innobase/fil/fil0fil.c
innobase/fil/fil0fil.c
+31
-13
No files found.
innobase/fil/fil0fil.c
View file @
4a1869b1
...
...
@@ -4252,29 +4252,47 @@ fil_flush_file_spaces(
{
fil_system_t
*
system
=
fil_system
;
fil_space_t
*
space
;
ulint
*
space_ids
;
ulint
n_space_ids
;
ulint
i
;
mutex_enter
(
&
(
system
->
mutex
));
space
=
UT_LIST_GET_FIRST
(
system
->
unflushed_spaces
);
n_space_ids
=
UT_LIST_GET_LEN
(
system
->
unflushed_spaces
);
if
(
n_space_ids
==
0
)
{
while
(
space
)
{
if
(
space
->
purpose
==
purpose
&&
!
space
->
is_being_deleted
)
{
mutex_exit
(
&
system
->
mutex
);
return
;
}
space
->
n_pending_flushes
++
;
/* prevent dropping of the
space while we are
flushing */
mutex_exit
(
&
(
system
->
mutex
));
/* Assemble a list of space ids to flush. Previously, we
traversed system->unflushed_spaces and called UT_LIST_GET_NEXT()
on a space that was just removed from the list by fil_flush().
Thus, the space could be dropped and the memory overwritten. */
space_ids
=
mem_alloc
(
n_space_ids
*
sizeof
*
space_ids
);
fil_flush
(
space
->
id
)
;
n_space_ids
=
0
;
mutex_enter
(
&
(
system
->
mutex
));
for
(
space
=
UT_LIST_GET_FIRST
(
system
->
unflushed_spaces
);
space
;
space
=
UT_LIST_GET_NEXT
(
unflushed_spaces
,
space
))
{
if
(
space
->
purpose
==
purpose
&&
!
space
->
is_being_deleted
)
{
space
->
n_pending_flushes
--
;
space
_ids
[
n_space_ids
++
]
=
space
->
id
;
}
space
=
UT_LIST_GET_NEXT
(
unflushed_spaces
,
space
);
}
mutex_exit
(
&
(
system
->
mutex
));
mutex_exit
(
&
system
->
mutex
);
/* Flush the spaces. It will not hurt to call fil_flush() on
a non-existing space id. */
for
(
i
=
0
;
i
<
n_space_ids
;
i
++
)
{
fil_flush
(
space_ids
[
i
]);
}
mem_free
(
space_ids
);
}
/**********************************************************************
...
...
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