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
ca4224b3
Commit
ca4224b3
authored
Mar 09, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-5.0
into quadita2.mysql.com:/nfstmp1/guilhem/mysql-5.0
parents
43b718bc
9856fc62
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
24 deletions
+32
-24
innobase/log/log0log.c
innobase/log/log0log.c
+25
-24
innobase/srv/srv0start.c
innobase/srv/srv0start.c
+7
-0
No files found.
innobase/log/log0log.c
View file @
ca4224b3
...
@@ -3047,7 +3047,10 @@ logs_empty_and_mark_files_at_shutdown(void)
...
@@ -3047,7 +3047,10 @@ logs_empty_and_mark_files_at_shutdown(void)
mutex_enter
(
&
kernel_mutex
);
mutex_enter
(
&
kernel_mutex
);
/* Check that there are no longer transactions */
/* Check that there are no longer transactions. We need this wait even
for the 'very fast' shutdown, because the InnoDB layer may have
committed or prepared transactions and we don't want to lose them. */
if
(
trx_n_mysql_transactions
>
0
if
(
trx_n_mysql_transactions
>
0
||
UT_LIST_GET_LEN
(
trx_sys
->
trx_list
)
>
0
)
{
||
UT_LIST_GET_LEN
(
trx_sys
->
trx_list
)
>
0
)
{
...
@@ -3056,6 +3059,23 @@ logs_empty_and_mark_files_at_shutdown(void)
...
@@ -3056,6 +3059,23 @@ logs_empty_and_mark_files_at_shutdown(void)
goto
loop
;
goto
loop
;
}
}
if
(
srv_very_fast_shutdown
)
{
/* In a 'very fast' shutdown we do not flush the buffer pool:
it is essentially a 'crash' of the InnoDB server.
Make sure that the log is all flushed to disk, so that
we can recover all committed transactions in a crash
recovery.
In a 'very fast' shutdown we do not flush the buffer pool:
it is essentially a 'crash' of the InnoDB server. Then we must
not write the lsn stamps to the data files, since at a
startup InnoDB deduces from the stamps if the previous
shutdown was clean. */
log_buffer_flush_to_disk
();
return
;
/* We SKIP ALL THE REST !! */
}
/* Check that the master thread is suspended */
/* Check that the master thread is suspended */
if
(
srv_n_threads_active
[
SRV_MASTER
]
!=
0
)
{
if
(
srv_n_threads_active
[
SRV_MASTER
]
!=
0
)
{
...
@@ -3092,24 +3112,13 @@ logs_empty_and_mark_files_at_shutdown(void)
...
@@ -3092,24 +3112,13 @@ logs_empty_and_mark_files_at_shutdown(void)
log_archive_all
();
log_archive_all
();
#endif
/* UNIV_LOG_ARCHIVE */
#endif
/* UNIV_LOG_ARCHIVE */
if
(
!
srv_very_fast_shutdown
)
{
/* In a 'very fast' shutdown we do not flush the buffer pool:
it is essentially a 'crash' of the InnoDB server. */
log_make_checkpoint_at
(
ut_dulint_max
,
TRUE
);
log_make_checkpoint_at
(
ut_dulint_max
,
TRUE
);
}
else
{
/* Make sure that the log is all flushed to disk, so that
we can recover all committed transactions in a crash
recovery */
log_buffer_flush_to_disk
();
}
mutex_enter
(
&
(
log_sys
->
mutex
));
mutex_enter
(
&
(
log_sys
->
mutex
));
lsn
=
log_sys
->
lsn
;
lsn
=
log_sys
->
lsn
;
if
((
ut_dulint_cmp
(
lsn
,
log_sys
->
last_checkpoint_lsn
)
!=
0
if
((
ut_dulint_cmp
(
lsn
,
log_sys
->
last_checkpoint_lsn
)
!=
0
)
&&
!
srv_very_fast_shutdown
)
#ifdef UNIV_LOG_ARCHIVE
#ifdef UNIV_LOG_ARCHIVE
||
(
srv_log_archive_on
||
(
srv_log_archive_on
&&
ut_dulint_cmp
(
lsn
,
&&
ut_dulint_cmp
(
lsn
,
...
@@ -3158,7 +3167,7 @@ logs_empty_and_mark_files_at_shutdown(void)
...
@@ -3158,7 +3167,7 @@ logs_empty_and_mark_files_at_shutdown(void)
completely flushed to disk! (We do not call fil_write... if the
completely flushed to disk! (We do not call fil_write... if the
'very fast' shutdown is enabled.) */
'very fast' shutdown is enabled.) */
if
(
!
srv_very_fast_shutdown
&&
!
buf_all_freed
())
{
if
(
!
buf_all_freed
())
{
goto
loop
;
goto
loop
;
}
}
...
@@ -3181,7 +3190,7 @@ logs_empty_and_mark_files_at_shutdown(void)
...
@@ -3181,7 +3190,7 @@ logs_empty_and_mark_files_at_shutdown(void)
/* Make some checks that the server really is quiet */
/* Make some checks that the server really is quiet */
ut_a
(
srv_n_threads_active
[
SRV_MASTER
]
==
0
);
ut_a
(
srv_n_threads_active
[
SRV_MASTER
]
==
0
);
ut_a
(
srv_very_fast_shutdown
||
buf_all_freed
());
ut_a
(
buf_all_freed
());
ut_a
(
0
==
ut_dulint_cmp
(
lsn
,
log_sys
->
lsn
));
ut_a
(
0
==
ut_dulint_cmp
(
lsn
,
log_sys
->
lsn
));
if
(
ut_dulint_cmp
(
lsn
,
srv_start_lsn
)
<
0
)
{
if
(
ut_dulint_cmp
(
lsn
,
srv_start_lsn
)
<
0
)
{
...
@@ -3196,15 +3205,7 @@ logs_empty_and_mark_files_at_shutdown(void)
...
@@ -3196,15 +3205,7 @@ logs_empty_and_mark_files_at_shutdown(void)
srv_shutdown_lsn
=
lsn
;
srv_shutdown_lsn
=
lsn
;
if
(
!
srv_very_fast_shutdown
)
{
/* In a 'very fast' shutdown we do not flush the buffer pool:
it is essentially a 'crash' of the InnoDB server. Then we must
not write the lsn stamps to the data files, since at a
startup InnoDB deduces from the stamps if the previous
shutdown was clean. */
fil_write_flushed_lsn_to_data_files
(
lsn
,
arch_log_no
);
fil_write_flushed_lsn_to_data_files
(
lsn
,
arch_log_no
);
}
fil_flush_file_spaces
(
FIL_TABLESPACE
);
fil_flush_file_spaces
(
FIL_TABLESPACE
);
...
@@ -3212,7 +3213,7 @@ logs_empty_and_mark_files_at_shutdown(void)
...
@@ -3212,7 +3213,7 @@ logs_empty_and_mark_files_at_shutdown(void)
/* Make some checks that the server really is quiet */
/* Make some checks that the server really is quiet */
ut_a
(
srv_n_threads_active
[
SRV_MASTER
]
==
0
);
ut_a
(
srv_n_threads_active
[
SRV_MASTER
]
==
0
);
ut_a
(
srv_very_fast_shutdown
||
buf_all_freed
());
ut_a
(
buf_all_freed
());
ut_a
(
0
==
ut_dulint_cmp
(
lsn
,
log_sys
->
lsn
));
ut_a
(
0
==
ut_dulint_cmp
(
lsn
,
log_sys
->
lsn
));
}
}
...
...
innobase/srv/srv0start.c
View file @
ca4224b3
...
@@ -1740,6 +1740,13 @@ innobase_shutdown_for_mysql(void)
...
@@ -1740,6 +1740,13 @@ innobase_shutdown_for_mysql(void)
srv_shutdown_state
=
SRV_SHUTDOWN_EXIT_THREADS
;
srv_shutdown_state
=
SRV_SHUTDOWN_EXIT_THREADS
;
/* In a 'very fast' shutdown, we do not need to wait for these threads
to die; all which counts is that we flushed the log; a 'very fast'
shutdown is essentially a crash. */
if
(
srv_fast_shutdown
)
return
((
int
)
DB_SUCCESS
);
/* All threads end up waiting for certain events. Put those events
/* All threads end up waiting for certain events. Put those events
to the signaled state. Then the threads will exit themselves in
to the signaled state. Then the threads will exit themselves in
os_thread_event_wait(). */
os_thread_event_wait(). */
...
...
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