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
863cfb3f
Commit
863cfb3f
authored
Jan 31, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small cleanup, remove a useless function
parent
b050354f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
26 deletions
+4
-26
sql/handler.cc
sql/handler.cc
+1
-3
sql/log.cc
sql/log.cc
+0
-12
sql/log.h
sql/log.h
+0
-5
sql/sql_repl.cc
sql/sql_repl.cc
+1
-1
sql/transaction.cc
sql/transaction.cc
+2
-5
No files found.
sql/handler.cc
View file @
863cfb3f
...
...
@@ -32,7 +32,6 @@
#include "sql_acl.h" // SUPER_ACL
#include "sql_base.h" // free_io_cache
#include "discover.h" // extension_based_table_discovery, etc
#include "log.h" // for assert_LOCK_log_owner
#include "log_event.h" // *_rows_log_event
#include "create_options.h"
#include "rpl_filter.h"
...
...
@@ -1479,9 +1478,8 @@ int ha_commit_trans(THD *thd, bool all)
done:
DBUG_EXECUTE_IF
(
"crash_commit_after"
,
DBUG_SUICIDE
(););
/* documentation of which mutexes are (not) owned */
mysql_mutex_assert_not_owner
(
&
LOCK_prepare_ordered
);
assert_LOCK_log_owner
(
false
);
mysql_mutex_assert_not_owner
(
mysql_bin_log
.
get_log_lock
()
);
mysql_mutex_assert_not_owner
(
&
LOCK_after_binlog_sync
);
mysql_mutex_assert_not_owner
(
&
LOCK_commit_ordered
);
RUN_HOOK
(
transaction
,
after_commit
,
(
thd
,
FALSE
));
...
...
sql/log.cc
View file @
863cfb3f
...
...
@@ -6042,7 +6042,6 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info, my_bool *with_annotate)
}
else
{
/* documentation of which mutexes are (not) owned */
mysql_mutex_assert_not_owner
(
&
LOCK_prepare_ordered
);
mysql_mutex_assert_owner
(
&
LOCK_log
);
mysql_mutex_assert_not_owner
(
&
LOCK_after_binlog_sync
);
...
...
@@ -6079,7 +6078,6 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info, my_bool *with_annotate)
mysql_mutex_lock
(
&
LOCK_after_binlog_sync
);
mysql_mutex_unlock
(
&
LOCK_log
);
/* documentation of which mutexes are (not) owned */
mysql_mutex_assert_not_owner
(
&
LOCK_prepare_ordered
);
mysql_mutex_assert_not_owner
(
&
LOCK_log
);
mysql_mutex_assert_owner
(
&
LOCK_after_binlog_sync
);
...
...
@@ -7410,7 +7408,6 @@ MYSQL_BIN_LOG::trx_group_commit_leader(group_commit_entry *leader)
bool
any_error
=
false
;
bool
all_error
=
true
;
/* documentation of which mutexes are (not) owned */
mysql_mutex_assert_not_owner
(
&
LOCK_prepare_ordered
);
mysql_mutex_assert_owner
(
&
LOCK_log
);
mysql_mutex_assert_not_owner
(
&
LOCK_after_binlog_sync
);
...
...
@@ -7498,7 +7495,6 @@ MYSQL_BIN_LOG::trx_group_commit_leader(group_commit_entry *leader)
Loop through threads and run the binlog_sync hook
*/
{
/* documentation of which mutexes are (not) owned */
mysql_mutex_assert_not_owner
(
&
LOCK_prepare_ordered
);
mysql_mutex_assert_not_owner
(
&
LOCK_log
);
mysql_mutex_assert_owner
(
&
LOCK_after_binlog_sync
);
...
...
@@ -9853,14 +9849,6 @@ TC_LOG_BINLOG::set_status_variables(THD *thd)
}
}
void
assert_LOCK_log_owner
(
bool
owner
)
{
if
(
owner
)
mysql_mutex_assert_owner
(
mysql_bin_log
.
get_log_lock
());
else
mysql_mutex_assert_not_owner
(
mysql_bin_log
.
get_log_lock
());
}
struct
st_mysql_storage_engine
binlog_storage_engine
=
{
MYSQL_HANDLERTON_INTERFACE_VERSION
};
...
...
sql/log.h
View file @
863cfb3f
...
...
@@ -343,7 +343,6 @@ class MYSQL_LOG
PSI_file_key
m_log_file_key
;
#endif
/* for documentation of mutexes held in various places in code */
friend
void
assert_LOCK_log_owner
(
bool
owner
);
};
class
MYSQL_QUERY_LOG
:
public
MYSQL_LOG
...
...
@@ -1153,8 +1152,4 @@ static inline TC_LOG *get_tc_log_implementation()
return
&
tc_log_mmap
;
}
void
assert_LOCK_log_owner
(
bool
owner
);
void
assert_LOCK_log_owner
(
bool
owner
);
#endif
/* LOG_H */
sql/sql_repl.cc
View file @
863cfb3f
...
...
@@ -2655,7 +2655,7 @@ static int send_one_binlog_file(binlog_send_info *info,
LOG_INFO
*
linfo
,
my_off_t
start_pos
)
{
assert_LOCK_log_owner
(
false
);
// we don't have LOCK_log
mysql_mutex_assert_not_owner
(
mysql_bin_log
.
get_log_lock
());
/* seek to the requested position, to start the requested dump */
if
(
start_pos
!=
BIN_LOG_HEADER_SIZE
)
...
...
sql/transaction.cc
View file @
863cfb3f
...
...
@@ -24,7 +24,6 @@
#include "rpl_handler.h"
#include "debug_sync.h" // DEBUG_SYNC
#include "sql_acl.h"
#include "log.h" // for assert_LOCK_log_owner
/* Conditions under which the transaction state must not change. */
static
bool
trans_check
(
THD
*
thd
)
...
...
@@ -234,9 +233,8 @@ bool trans_commit(THD *thd)
DBUG_PRINT
(
"info"
,
(
"clearing SERVER_STATUS_IN_TRANS"
));
res
=
ha_commit_trans
(
thd
,
TRUE
);
/* documentation of which mutexes are (not) owned */
mysql_mutex_assert_not_owner
(
&
LOCK_prepare_ordered
);
assert_LOCK_log_owner
(
false
);
mysql_mutex_assert_not_owner
(
mysql_bin_log
.
get_log_lock
()
);
mysql_mutex_assert_not_owner
(
&
LOCK_after_binlog_sync
);
mysql_mutex_assert_not_owner
(
&
LOCK_commit_ordered
);
...
...
@@ -441,9 +439,8 @@ bool trans_commit_stmt(THD *thd)
}
}
/* documentation of which mutexes are (not) owned */
mysql_mutex_assert_not_owner
(
&
LOCK_prepare_ordered
);
assert_LOCK_log_owner
(
false
);
mysql_mutex_assert_not_owner
(
mysql_bin_log
.
get_log_lock
()
);
mysql_mutex_assert_not_owner
(
&
LOCK_after_binlog_sync
);
mysql_mutex_assert_not_owner
(
&
LOCK_commit_ordered
);
...
...
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