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
4d5d1ae2
Commit
4d5d1ae2
authored
Nov 28, 2001
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added read log caching and fixed a possible bug in write cacheing.
This should cause fewer seeks when using replication.
parent
41afc03a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
6 deletions
+25
-6
Docs/manual.texi
Docs/manual.texi
+4
-0
mysys/mf_iocache2.c
mysys/mf_iocache2.c
+21
-6
No files found.
Docs/manual.texi
View file @
4d5d1ae2
...
...
@@ -46851,6 +46851,10 @@ Fixed bug when joining with caching (unlikely to happen).
Fixed race condition when using the binary log and @code{INSERT DELAYED}
which could cause the binary log to have rows that was not yet written
to MyISAM tables.
@item
Changed caching of binary log to make replication slightly faster.
@item
Fixed bug in replication on Mac OS X.
@end itemize
@node News-3.23.45, News-3.23.44, News-3.23.46, News-3.23.x
mysys/mf_iocache2.c
View file @
4d5d1ae2
...
...
@@ -32,20 +32,35 @@
void
my_b_seek
(
IO_CACHE
*
info
,
my_off_t
pos
)
{
my_off_t
offset
=
(
pos
-
info
->
pos_in_file
);
DBUG_ENTER
(
"my_b_seek"
);
DBUG_PRINT
(
"enter"
,(
"pos: %lu"
,
(
ulong
)
pos
));
if
(
info
->
type
==
READ_CACHE
)
{
info
->
rc_pos
=
info
->
rc_end
=
info
->
buffer
;
if
((
ulonglong
)
offset
<
(
ulonglong
)
(
info
->
rc_end
-
info
->
buffer
))
{
/* The read is in the current buffer; Reuse it */
info
->
rc_pos
=
info
->
buffer
+
offset
;
DBUG_VOID_RETURN
;
}
else
{
/* Force a new read on next my_b_read */
info
->
rc_pos
=
info
->
rc_end
=
info
->
buffer
;
}
}
else
if
(
info
->
type
==
WRITE_CACHE
)
{
byte
*
try_rc_pos
;
try_rc_pos
=
info
->
rc_pos
+
(
pos
-
info
->
pos_in_file
);
if
(
try_rc_pos
>=
info
->
buffer
&&
try_rc_pos
<=
info
->
rc_end
)
/* If write is in current buffer, reuse it */
if
((
ulonglong
)
offset
<
(
ulonglong
)
(
info
->
rc_end
-
info
->
buffer
)
)
{
info
->
rc_pos
=
try_rc_pos
;
return
;
info
->
rc_pos
=
info
->
buffer
+
offset
;
DBUG_VOID_RETURN
;
}
flush_io_cache
(
info
);
info
->
rc_end
=
(
info
->
buffer
+
info
->
buffer_length
-
(
pos
&
(
IO_SIZE
-
1
)));
}
info
->
pos_in_file
=
pos
;
info
->
seek_not_done
=
1
;
...
...
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