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
d9b1f2cf
Commit
d9b1f2cf
authored
Nov 09, 2006
by
msvensson@neptunus.(none)
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
c3a2a93d
c2aca91b
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 @
d9b1f2cf
...
@@ -4252,29 +4252,47 @@ fil_flush_file_spaces(
...
@@ -4252,29 +4252,47 @@ fil_flush_file_spaces(
{
{
fil_system_t
*
system
=
fil_system
;
fil_system_t
*
system
=
fil_system
;
fil_space_t
*
space
;
fil_space_t
*
space
;
ulint
*
space_ids
;
ulint
n_space_ids
;
ulint
i
;
mutex_enter
(
&
(
system
->
mutex
));
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
)
{
mutex_exit
(
&
system
->
mutex
);
if
(
space
->
purpose
==
purpose
&&
!
space
->
is_being_deleted
)
{
return
;
}
space
->
n_pending_flushes
++
;
/* prevent dropping of the
/* Assemble a list of space ids to flush. Previously, we
space while we are
traversed system->unflushed_spaces and called UT_LIST_GET_NEXT()
flushing */
on a space that was just removed from the list by fil_flush().
mutex_exit
(
&
(
system
->
mutex
));
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