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
928d7c23
Commit
928d7c23
authored
Oct 12, 2007
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
int->my_bool transformation fixed (thanks Guilhem)
Mutex owner checks added.
parent
5eb78c51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
storage/maria/ma_loghandler.c
storage/maria/ma_loghandler.c
+9
-4
No files found.
storage/maria/ma_loghandler.c
View file @
928d7c23
...
@@ -20,9 +20,6 @@
...
@@ -20,9 +20,6 @@
/**
/**
@file
@file
@brief Module which writes and reads to a transaction log
@brief Module which writes and reads to a transaction log
@todo LOG: in functions where the log's lock is required, a
translog_assert_owner() could be added.
*/
*/
#define TRANSLOG_FILLER 0xFF
#define TRANSLOG_FILLER 0xFF
...
@@ -1219,7 +1216,7 @@ static my_bool translog_buffer_lock(struct st_translog_buffer *buffer)
...
@@ -1219,7 +1216,7 @@ static my_bool translog_buffer_lock(struct st_translog_buffer *buffer)
(
uint
)
buffer
->
buffer_no
,
(
ulong
)
buffer
,
(
uint
)
buffer
->
buffer_no
,
(
ulong
)
buffer
,
(
ulong
)
&
buffer
->
mutex
));
(
ulong
)
&
buffer
->
mutex
));
res
=
(
translog_mutex_lock
(
&
buffer
->
mutex
)
!=
0
);
res
=
(
translog_mutex_lock
(
&
buffer
->
mutex
)
!=
0
);
DBUG_RETURN
(
res
);
DBUG_RETURN
(
test
(
res
)
);
}
}
#else
#else
#define translog_buffer_lock(B) \
#define translog_buffer_lock(B) \
...
@@ -1698,7 +1695,10 @@ static my_bool translog_buffer_next(TRANSLOG_ADDRESS *horizon,
...
@@ -1698,7 +1695,10 @@ static my_bool translog_buffer_next(TRANSLOG_ADDRESS *horizon,
if
(
chasing
)
if
(
chasing
)
translog_cursor_init
(
cursor
,
new_buffer
,
new_buffer_no
);
translog_cursor_init
(
cursor
,
new_buffer
,
new_buffer_no
);
else
else
{
translog_lock_assert_owner
();
translog_start_buffer
(
new_buffer
,
cursor
,
new_buffer_no
);
translog_start_buffer
(
new_buffer
,
cursor
,
new_buffer_no
);
}
log_descriptor
.
buffers
[
old_buffer_no
].
next_buffer_offset
=
new_buffer
->
offset
;
log_descriptor
.
buffers
[
old_buffer_no
].
next_buffer_offset
=
new_buffer
->
offset
;
translog_new_page_header
(
horizon
,
cursor
);
translog_new_page_header
(
horizon
,
cursor
);
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
...
@@ -2026,6 +2026,7 @@ static my_bool translog_buffer_flush(struct st_translog_buffer *buffer)
...
@@ -2026,6 +2026,7 @@ static my_bool translog_buffer_flush(struct st_translog_buffer *buffer)
buffer
->
file
,
buffer
->
file
,
LSN_IN_PARTS
(
buffer
->
offset
),
LSN_IN_PARTS
(
buffer
->
offset
),
(
ulong
)
buffer
->
size
));
(
ulong
)
buffer
->
size
));
translog_buffer_lock_assert_owner
(
buffer
);
DBUG_ASSERT
(
buffer
->
file
!=
-
1
);
DBUG_ASSERT
(
buffer
->
file
!=
-
1
);
...
@@ -2505,6 +2506,7 @@ static uchar *translog_get_page(TRANSLOG_VALIDATOR_DATA *data, uchar *buffer,
...
@@ -2505,6 +2506,7 @@ static uchar *translog_get_page(TRANSLOG_VALIDATOR_DATA *data, uchar *buffer,
DBUG_RETURN
(
buffer
);
DBUG_RETURN
(
buffer
);
}
}
/**
/**
@brief free direct log page link
@brief free direct log page link
...
@@ -2524,6 +2526,7 @@ static void translog_free_link(PAGECACHE_BLOCK_LINK *direct_link)
...
@@ -2524,6 +2526,7 @@ static void translog_free_link(PAGECACHE_BLOCK_LINK *direct_link)
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
/*
/*
Finds last page of the given log file
Finds last page of the given log file
...
@@ -3041,7 +3044,9 @@ static void translog_buffer_destroy(struct st_translog_buffer *buffer)
...
@@ -3041,7 +3044,9 @@ static void translog_buffer_destroy(struct st_translog_buffer *buffer)
We ignore errors here, because we can't do something about it
We ignore errors here, because we can't do something about it
(it is shutting down)
(it is shutting down)
*/
*/
translog_buffer_lock
(
buffer
);
translog_buffer_flush
(
buffer
);
translog_buffer_flush
(
buffer
);
translog_buffer_unlock
(
buffer
);
}
}
DBUG_PRINT
(
"info"
,
(
"Destroy mutex: 0x%lx"
,
(
ulong
)
&
buffer
->
mutex
));
DBUG_PRINT
(
"info"
,
(
"Destroy mutex: 0x%lx"
,
(
ulong
)
&
buffer
->
mutex
));
pthread_mutex_destroy
(
&
buffer
->
mutex
);
pthread_mutex_destroy
(
&
buffer
->
mutex
);
...
...
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