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
932c00c3
Commit
932c00c3
authored
Sep 03, 2009
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: log_reserve_and_write_fast(): Do not cache the log_sys pointer
in a local variable.
parent
92e8d1b2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
include/log0log.ic
include/log0log.ic
+15
-14
No files found.
include/log0log.ic
View file @
932c00c3
...
...
@@ -311,44 +311,45 @@ log_reserve_and_write_fast(
ulint len, /*!< in: string length */
ib_uint64_t* start_lsn)/*!< out: start lsn of the log record */
{
log_t* log = log_sys;
ulint data_len;
ib_uint64_t lsn;
mutex_enter(&
(log->mutex)
);
mutex_enter(&
log_sys->mutex
);
data_len = len + log->buf_free % OS_FILE_LOG_BLOCK_SIZE;
data_len = len + log
_sys
->buf_free % OS_FILE_LOG_BLOCK_SIZE;
if (data_len >= OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE) {
/* The string does not fit within the current log block
or the log block would become full */
mutex_exit(&
(log->mutex)
);
mutex_exit(&
log_sys->mutex
);
return(0);
}
*start_lsn = log->lsn;
*start_lsn = log
_sys
->lsn;
ut_memcpy(log
->buf + log
->buf_free, str, len);
ut_memcpy(log
_sys->buf + log_sys
->buf_free, str, len);
log_block_set_data_len((byte*) ut_align_down(log->buf + log->buf_free,
log_block_set_data_len((byte*) ut_align_down(log_sys->buf
+ log_sys->buf_free,
OS_FILE_LOG_BLOCK_SIZE),
data_len);
#ifdef UNIV_LOG_DEBUG
log
->old_buf_free = log
->buf_free;
log
->old_lsn = log
->lsn;
log
_sys->old_buf_free = log_sys
->buf_free;
log
_sys->old_lsn = log_sys
->lsn;
#endif
log->buf_free += len;
log
_sys
->buf_free += len;
ut_ad(log
->buf_free <= log
->buf_size);
ut_ad(log
_sys->buf_free <= log_sys
->buf_size);
lsn = log->lsn += len;
lsn = log
_sys
->lsn += len;
#ifdef UNIV_LOG_DEBUG
log_check_log_recs(log->buf + log->old_buf_free,
log->buf_free - log->old_buf_free, log->old_lsn);
log_check_log_recs(log_sys->buf + log_sys->old_buf_free,
log_sys->buf_free - log_sys->old_buf_free,
log_sys->old_lsn);
#endif
return(lsn);
}
...
...
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