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
b357fca4
Commit
b357fca4
authored
Oct 26, 2010
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MWL#116: better name for pthread_cond + add missing pthread_cond_destroy().
parent
aa23fe7d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
sql/log.cc
sql/log.cc
+5
-4
No files found.
sql/log.cc
View file @
b357fca4
...
@@ -160,12 +160,13 @@ public:
...
@@ -160,12 +160,13 @@ public:
trans_log
.
end_of_file
=
max_binlog_cache_size
;
trans_log
.
end_of_file
=
max_binlog_cache_size
;
(
void
)
my_pthread_mutex_init
(
&
LOCK_binlog_participant
,
MY_MUTEX_INIT_SLOW
,
(
void
)
my_pthread_mutex_init
(
&
LOCK_binlog_participant
,
MY_MUTEX_INIT_SLOW
,
"LOCK_binlog_participant"
,
MYF
(
0
));
"LOCK_binlog_participant"
,
MYF
(
0
));
(
void
)
pthread_cond_init
(
&
COND_
group_commi
t
,
0
);
(
void
)
pthread_cond_init
(
&
COND_
binlog_participan
t
,
0
);
}
}
~
binlog_trx_data
()
~
binlog_trx_data
()
{
{
DBUG_ASSERT
(
pending
()
==
NULL
);
DBUG_ASSERT
(
pending
()
==
NULL
);
(
void
)
pthread_cond_destroy
(
&
COND_binlog_participant
);
(
void
)
pthread_mutex_destroy
(
&
LOCK_binlog_participant
);
(
void
)
pthread_mutex_destroy
(
&
LOCK_binlog_participant
);
close_cached_file
(
&
trans_log
);
close_cached_file
(
&
trans_log
);
}
}
...
@@ -298,7 +299,7 @@ public:
...
@@ -298,7 +299,7 @@ public:
Log_event
*
incident_event
;
Log_event
*
incident_event
;
/* Mutex and condition for wakeup after group commit. */
/* Mutex and condition for wakeup after group commit. */
pthread_mutex_t
LOCK_binlog_participant
;
pthread_mutex_t
LOCK_binlog_participant
;
pthread_cond_t
COND_
group_commi
t
;
pthread_cond_t
COND_
binlog_participan
t
;
/*
/*
Binlog position after current commit, available to storage engines during
Binlog position after current commit, available to storage engines during
commit() and commit_ordered().
commit() and commit_ordered().
...
@@ -5035,7 +5036,7 @@ MYSQL_BIN_LOG::trx_group_commit_participant(binlog_trx_data *trx_data)
...
@@ -5035,7 +5036,7 @@ MYSQL_BIN_LOG::trx_group_commit_participant(binlog_trx_data *trx_data)
/* Wait until trx_data.done == true and woken up by the leader. */
/* Wait until trx_data.done == true and woken up by the leader. */
while
(
!
trx_data
->
done
)
while
(
!
trx_data
->
done
)
pthread_cond_wait
(
&
trx_data
->
COND_
group_commi
t
,
pthread_cond_wait
(
&
trx_data
->
COND_
binlog_participan
t
,
&
trx_data
->
LOCK_binlog_participant
);
&
trx_data
->
LOCK_binlog_participant
);
pthread_mutex_unlock
(
&
trx_data
->
LOCK_binlog_participant
);
pthread_mutex_unlock
(
&
trx_data
->
LOCK_binlog_participant
);
}
}
...
@@ -5248,7 +5249,7 @@ MYSQL_BIN_LOG::trx_group_commit_leader(TC_group_commit_entry *first)
...
@@ -5248,7 +5249,7 @@ MYSQL_BIN_LOG::trx_group_commit_leader(TC_group_commit_entry *first)
if
(
!
current
->
group_commit_leader
)
if
(
!
current
->
group_commit_leader
)
{
{
current
->
done
=
true
;
current
->
done
=
true
;
pthread_cond_signal
(
&
current
->
COND_
group_commi
t
);
pthread_cond_signal
(
&
current
->
COND_
binlog_participan
t
);
}
}
pthread_mutex_unlock
(
&
current
->
LOCK_binlog_participant
);
pthread_mutex_unlock
(
&
current
->
LOCK_binlog_participant
);
}
}
...
...
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