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
9dc10d58
Commit
9dc10d58
authored
Mar 13, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.0 into 10.1
parents
68be011c
032678ad
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
53 additions
and
37 deletions
+53
-37
storage/innobase/buf/buf0flu.cc
storage/innobase/buf/buf0flu.cc
+1
-3
storage/innobase/fil/fil0crypt.cc
storage/innobase/fil/fil0crypt.cc
+3
-0
storage/innobase/log/log0log.cc
storage/innobase/log/log0log.cc
+8
-7
storage/innobase/srv/srv0srv.cc
storage/innobase/srv/srv0srv.cc
+2
-2
storage/innobase/srv/srv0start.cc
storage/innobase/srv/srv0start.cc
+1
-1
storage/innobase/trx/trx0roll.cc
storage/innobase/trx/trx0roll.cc
+12
-8
storage/xtradb/fil/fil0crypt.cc
storage/xtradb/fil/fil0crypt.cc
+3
-0
storage/xtradb/log/log0log.cc
storage/xtradb/log/log0log.cc
+3
-6
storage/xtradb/srv/srv0srv.cc
storage/xtradb/srv/srv0srv.cc
+8
-2
storage/xtradb/trx/trx0roll.cc
storage/xtradb/trx/trx0roll.cc
+12
-8
No files found.
storage/innobase/buf/buf0flu.cc
View file @
9dc10d58
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2013, 2017, MariaDB Corporation.
All Rights Reserved.
Copyright (c) 2013, 2017, MariaDB Corporation.
Copyright (c) 2013, 2014, Fusion-io
This program is free software; you can redistribute it and/or modify it under
...
...
@@ -2398,8 +2398,6 @@ DECLARE_THREAD(buf_flush_page_cleaner_thread)(
thread_exit:
buf_page_cleaner_is_active
=
FALSE
;
os_event_free
(
buf_flush_event
);
/* We count the number of threads in os_thread_exit(). A created
thread should always use that to exit and not use return() to exit. */
os_thread_exit
(
NULL
);
...
...
storage/innobase/fil/fil0crypt.cc
View file @
9dc10d58
...
...
@@ -138,6 +138,7 @@ fil_space_crypt_cleanup()
/*=====================*/
{
os_event_free
(
fil_crypt_throttle_sleep_event
);
fil_crypt_throttle_sleep_event
=
NULL
;
mutex_free
(
&
fil_crypt_key_mutex
);
mutex_free
(
&
crypt_stat_mutex
);
}
...
...
@@ -2543,7 +2544,9 @@ fil_crypt_threads_cleanup()
}
ut_a
(
!
srv_n_fil_crypt_threads_started
);
os_event_free
(
fil_crypt_event
);
fil_crypt_event
=
NULL
;
os_event_free
(
fil_crypt_threads_event
);
fil_crypt_threads_event
=
NULL
;
mutex_free
(
&
fil_crypt_threads_mutex
);
fil_crypt_threads_inited
=
false
;
}
...
...
storage/innobase/log/log0log.cc
View file @
9dc10d58
...
...
@@ -3252,12 +3252,6 @@ logs_empty_and_mark_files_at_shutdown(void)
ib_logf
(
IB_LOG_LEVEL_INFO
,
"Starting shutdown..."
);
while
(
srv_fast_shutdown
==
0
&&
trx_rollback_or_clean_is_active
)
{
/* we should wait until rollback after recovery end
for slow shutdown */
os_thread_sleep
(
100000
);
}
/* Wait until the master thread and all other operations are idle: our
algorithm only works if the server is idle at shutdown */
...
...
@@ -3306,6 +3300,8 @@ logs_empty_and_mark_files_at_shutdown(void)
thread_name
=
"lock_wait_timeout_thread"
;
}
else
if
(
srv_buf_dump_thread_active
)
{
thread_name
=
"buf_dump_thread"
;
}
else
if
(
srv_fast_shutdown
!=
2
&&
trx_rollback_or_clean_is_active
)
{
thread_name
=
"rollback of recovered transactions"
;
}
else
{
thread_name
=
NULL
;
}
...
...
@@ -3360,6 +3356,11 @@ logs_empty_and_mark_files_at_shutdown(void)
}
}
if
(
buf_flush_event
)
{
os_event_free
(
buf_flush_event
);
buf_flush_event
=
NULL
;
}
if
(
log_scrub_thread_active
)
{
ut_ad
(
!
srv_read_only_mode
);
os_event_set
(
log_scrub_event
);
...
...
@@ -3730,11 +3731,11 @@ log_shutdown(void)
if
(
!
srv_read_only_mode
&&
srv_scrub_log
)
{
os_event_free
(
log_scrub_event
);
log_scrub_event
=
NULL
;
}
#ifdef UNIV_LOG_ARCHIVE
rw_lock_free
(
&
log_sys
->
archive_lock
);
os_event_create
();
#endif
/* UNIV_LOG_ARCHIVE */
#ifdef UNIV_LOG_DEBUG
...
...
storage/innobase/srv/srv0srv.cc
View file @
9dc10d58
...
...
@@ -3,7 +3,7 @@
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, 2009 Google Inc.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2013, 2017, MariaDB Corporation
Ab. All Rights Reserved
.
Copyright (c) 2013, 2017, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
...
...
@@ -464,7 +464,7 @@ UNIV_INTERN const char* srv_io_thread_function[SRV_MAX_N_IO_THREADS];
UNIV_INTERN
time_t
srv_last_monitor_time
;
UNIV_INTERN
ib_mutex_t
srv_innodb_monitor_mutex
;
static
ib_mutex_t
srv_innodb_monitor_mutex
;
/* Mutex for locking srv_monitor_file. Not created if srv_read_only_mode */
UNIV_INTERN
ib_mutex_t
srv_monitor_file_mutex
;
...
...
storage/innobase/srv/srv0start.cc
View file @
9dc10d58
...
...
@@ -3185,7 +3185,7 @@ innobase_shutdown_for_mysql(void)
sync_close
();
srv_free
();
/* 4. Free
the os_conc_mutex and
all os_events and os_mutexes */
/* 4. Free all os_events and os_mutexes */
os_sync_free
();
...
...
storage/innobase/trx/trx0roll.cc
View file @
9dc10d58
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2016,
MariaDB Corporation. All Rights Reserved
.
Copyright (c) 2016,
2017, MariaDB Corporation
.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -741,9 +741,9 @@ trx_rollback_or_clean_recovered(
}
if
(
all
)
{
fprintf
(
stderr
,
"
InnoDB:
Starting in background the rollback"
" of
uncommitted transactions
\n
"
);
ib_logf
(
IB_LOG_LEVEL_INFO
,
"Starting in background the rollback"
" of
recovered transactions
"
);
}
/* Note: For XA recovered transactions, we rely on MySQL to
...
...
@@ -763,6 +763,12 @@ trx_rollback_or_clean_recovered(
assert_trx_in_rw_list
(
trx
);
if
(
srv_shutdown_state
!=
SRV_SHUTDOWN_NONE
&&
srv_fast_shutdown
!=
0
)
{
all
=
FALSE
;
break
;
}
/* If this function does a cleanup or rollback
then it will release the trx_sys->mutex, therefore
we need to reacquire it before retrying the loop. */
...
...
@@ -780,10 +786,8 @@ trx_rollback_or_clean_recovered(
}
while
(
trx
!=
NULL
);
if
(
all
)
{
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
" InnoDB: Rollback of non-prepared"
" transactions completed
\n
"
);
ib_logf
(
IB_LOG_LEVEL_INFO
,
"Rollback of non-prepared transactions completed"
);
}
}
...
...
storage/xtradb/fil/fil0crypt.cc
View file @
9dc10d58
...
...
@@ -138,6 +138,7 @@ fil_space_crypt_cleanup()
/*=====================*/
{
os_event_free
(
fil_crypt_throttle_sleep_event
);
fil_crypt_throttle_sleep_event
=
NULL
;
mutex_free
(
&
fil_crypt_key_mutex
);
mutex_free
(
&
crypt_stat_mutex
);
}
...
...
@@ -2542,7 +2543,9 @@ fil_crypt_threads_cleanup()
}
ut_a
(
!
srv_n_fil_crypt_threads_started
);
os_event_free
(
fil_crypt_event
);
fil_crypt_event
=
NULL
;
os_event_free
(
fil_crypt_threads_event
);
fil_crypt_threads_event
=
NULL
;
mutex_free
(
&
fil_crypt_threads_mutex
);
fil_crypt_threads_inited
=
false
;
}
...
...
storage/xtradb/log/log0log.cc
View file @
9dc10d58
...
...
@@ -3570,12 +3570,6 @@ logs_empty_and_mark_files_at_shutdown(void)
if
(
log_disable_checkpoint_active
)
log_enable_checkpoint
();
while
(
srv_fast_shutdown
==
0
&&
trx_rollback_or_clean_is_active
)
{
/* we should wait until rollback after recovery end
for slow shutdown */
os_thread_sleep
(
100000
);
}
/* Wait until the master thread and all other operations are idle: our
algorithm only works if the server is idle at shutdown */
...
...
@@ -3624,6 +3618,8 @@ logs_empty_and_mark_files_at_shutdown(void)
thread_name
=
"lock_wait_timeout_thread"
;
}
else
if
(
srv_buf_dump_thread_active
)
{
thread_name
=
"buf_dump_thread"
;
}
else
if
(
srv_fast_shutdown
!=
2
&&
trx_rollback_or_clean_is_active
)
{
thread_name
=
"rollback of recovered transactions"
;
}
else
{
thread_name
=
NULL
;
}
...
...
@@ -4085,6 +4081,7 @@ log_shutdown(void)
if
(
!
srv_read_only_mode
&&
srv_scrub_log
)
{
os_event_free
(
log_scrub_event
);
log_scrub_event
=
NULL
;
}
#ifdef UNIV_LOG_ARCHIVE
...
...
storage/xtradb/srv/srv0srv.cc
View file @
9dc10d58
...
...
@@ -3,7 +3,7 @@
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, 2009 Google Inc.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2013, 2017, MariaDB Corporation
Ab. All Rights Reserved
.
Copyright (c) 2013, 2017, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
...
...
@@ -604,7 +604,7 @@ UNIV_INTERN const char* srv_io_thread_function[SRV_MAX_N_IO_THREADS];
UNIV_INTERN
time_t
srv_last_monitor_time
;
UNIV_INTERN
ib_mutex_t
srv_innodb_monitor_mutex
;
static
ib_mutex_t
srv_innodb_monitor_mutex
;
/* Mutex for locking srv_monitor_file. Not created if srv_read_only_mode */
UNIV_INTERN
ib_mutex_t
srv_monitor_file_mutex
;
...
...
@@ -1284,16 +1284,22 @@ srv_free(void)
os_event_free
(
srv_sys
->
sys_threads
[
i
].
event
);
os_event_free
(
srv_error_event
);
srv_error_event
=
NULL
;
os_event_free
(
srv_monitor_event
);
srv_monitor_event
=
NULL
;
os_event_free
(
srv_buf_dump_event
);
srv_buf_dump_event
=
NULL
;
os_event_free
(
srv_checkpoint_completed_event
);
srv_checkpoint_completed_event
=
NULL
;
os_event_free
(
srv_redo_log_tracked_event
);
srv_redo_log_tracked_event
=
NULL
;
mutex_free
(
&
srv_sys
->
mutex
);
mutex_free
(
&
srv_sys
->
tasks_mutex
);
}
#ifdef WITH_INNODB_DISALLOW_WRITES
os_event_free
(
srv_allow_writes_event
);
srv_allow_writes_event
=
NULL
;
#endif
/* WITH_INNODB_DISALLOW_WRITES */
#ifndef HAVE_ATOMIC_BUILTINS
...
...
storage/xtradb/trx/trx0roll.cc
View file @
9dc10d58
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2016,
MariaDB Corporation. All Rights Reserved
.
Copyright (c) 2016,
2017, MariaDB Corporation
.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -753,9 +753,9 @@ trx_rollback_or_clean_recovered(
}
if
(
all
)
{
fprintf
(
stderr
,
"
InnoDB:
Starting in background the rollback"
" of
uncommitted transactions
\n
"
);
ib_logf
(
IB_LOG_LEVEL_INFO
,
"Starting in background the rollback"
" of
recovered transactions
"
);
}
/* Note: For XA recovered transactions, we rely on MySQL to
...
...
@@ -775,6 +775,12 @@ trx_rollback_or_clean_recovered(
assert_trx_in_rw_list
(
trx
);
if
(
srv_shutdown_state
!=
SRV_SHUTDOWN_NONE
&&
srv_fast_shutdown
!=
0
)
{
all
=
FALSE
;
break
;
}
/* If this function does a cleanup or rollback
then it will release the trx_sys->mutex, therefore
we need to reacquire it before retrying the loop. */
...
...
@@ -792,10 +798,8 @@ trx_rollback_or_clean_recovered(
}
while
(
trx
!=
NULL
);
if
(
all
)
{
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
" InnoDB: Rollback of non-prepared"
" transactions completed
\n
"
);
ib_logf
(
IB_LOG_LEVEL_INFO
,
"Rollback of non-prepared transactions completed"
);
}
}
...
...
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