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
14a46479
Commit
14a46479
authored
Jan 17, 2011
by
Mikael Ronstrom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#59549, fix compiler error on Windows
parent
1ce30b73
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
sql/log.cc
sql/log.cc
+7
-7
sql/log.h
sql/log.h
+3
-3
No files found.
sql/log.cc
View file @
14a46479
...
...
@@ -5995,7 +5995,7 @@ int TC_LOG_MMAP::open(const char *opt_name)
{
pg
->
next
=
pg
+
1
;
pg
->
waiters
=
0
;
pg
->
state
=
POOL
;
pg
->
state
=
P
S_P
OOL
;
mysql_mutex_init
(
key_PAGE_lock
,
&
pg
->
lock
,
MY_MUTEX_INIT_FAST
);
mysql_cond_init
(
key_PAGE_cond
,
&
pg
->
cond
,
0
);
pg
->
start
=
(
my_xid
*
)(
data
+
i
*
tc_log_page_size
);
...
...
@@ -6169,7 +6169,7 @@ int TC_LOG_MMAP::log_xid(THD *thd, my_xid xid)
cookie
=
(
ulong
)((
uchar
*
)
p
->
ptr
-
data
);
// can never be zero
*
p
->
ptr
++=
xid
;
p
->
free
--
;
p
->
state
=
DIRTY
;
p
->
state
=
PS_
DIRTY
;
/* to sync or not to sync - this is the question */
mysql_mutex_unlock
(
&
LOCK_active
);
...
...
@@ -6181,13 +6181,13 @@ int TC_LOG_MMAP::log_xid(THD *thd, my_xid xid)
p
->
waiters
++
;
/*
note - it must be while (), not do ... while () here
as p->state may be not DIRTY when we come here
as p->state may be not
PS_
DIRTY when we come here
*/
while
(
p
->
state
==
DIRTY
&&
syncing
)
while
(
p
->
state
==
PS_
DIRTY
&&
syncing
)
mysql_cond_wait
(
&
p
->
cond
,
&
LOCK_sync
);
p
->
waiters
--
;
err
=
p
->
state
==
ERROR
;
if
(
p
->
state
!=
DIRTY
)
// page was synced
err
=
p
->
state
==
PS_
ERROR
;
if
(
p
->
state
!=
PS_
DIRTY
)
// page was synced
{
if
(
p
->
waiters
==
0
)
mysql_cond_signal
(
&
COND_pool
);
// in case somebody's waiting
...
...
@@ -6225,7 +6225,7 @@ int TC_LOG_MMAP::sync()
pool_last
->
next
=
syncing
;
pool_last
=
syncing
;
syncing
->
next
=
0
;
syncing
->
state
=
err
?
ERROR
:
POOL
;
syncing
->
state
=
err
?
PS_ERROR
:
PS_
POOL
;
mysql_cond_broadcast
(
&
syncing
->
cond
);
// signal "sync done"
mysql_cond_signal
(
&
COND_pool
);
// in case somebody's waiting
mysql_mutex_unlock
(
&
LOCK_pool
);
...
...
sql/log.h
View file @
14a46479
...
...
@@ -63,9 +63,9 @@ class TC_LOG_MMAP: public TC_LOG
{
public:
// only to keep Sun Forte on sol9x86 happy
typedef
enum
{
POOL
,
// page is in pool
ERROR
,
// last sync failed
DIRTY
// new xids added since last sync
P
S_P
OOL
,
// page is in pool
PS_
ERROR
,
// last sync failed
PS_
DIRTY
// new xids added since last sync
}
PAGE_STATE
;
private:
...
...
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