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
ab301016
Commit
ab301016
authored
Feb 22, 2006
by
vtkachenko@quadxeon.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
myisamdef.h, mi_locking.c, mi_dynrec.c:
Fix insert performance with mmap
parent
32da6487
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
storage/myisam/mi_dynrec.c
storage/myisam/mi_dynrec.c
+1
-0
storage/myisam/mi_locking.c
storage/myisam/mi_locking.c
+3
-1
storage/myisam/myisamdef.h
storage/myisam/myisamdef.h
+3
-0
No files found.
storage/myisam/mi_dynrec.c
View file @
ab301016
...
...
@@ -201,6 +201,7 @@ uint mi_mmap_pwrite(MI_INFO *info, byte *Buffer,
}
else
{
info
->
s
->
nonmmaped_inserts
++
;
if
(
info
->
s
->
concurrent_insert
)
rw_unlock
(
&
info
->
s
->
mmap_lock
);
return
my_pwrite
(
info
->
dfile
,
Buffer
,
Count
,
offset
,
MyFlags
);
...
...
storage/myisam/mi_locking.c
View file @
ab301016
...
...
@@ -85,11 +85,13 @@ int mi_lock_database(MI_INFO *info, int lock_type)
if
(
share
->
changed
&&
!
share
->
w_locks
)
{
#ifdef HAVE_MMAP
if
(
info
->
s
->
mmaped_length
!=
info
->
s
->
state
.
state
.
data_file_length
)
if
((
info
->
s
->
mmaped_length
!=
info
->
s
->
state
.
state
.
data_file_length
)
&&
(
info
->
s
->
nonmmaped_inserts
>
MAX_NONMAPPED_INSERTS
))
{
if
(
info
->
s
->
concurrent_insert
)
rw_wrlock
(
&
info
->
s
->
mmap_lock
);
mi_remap_file
(
info
,
info
->
s
->
state
.
state
.
data_file_length
);
info
->
s
->
nonmmaped_inserts
=
0
;
if
(
info
->
s
->
concurrent_insert
)
rw_unlock
(
&
info
->
s
->
mmap_lock
);
}
...
...
storage/myisam/myisamdef.h
View file @
ab301016
...
...
@@ -152,6 +152,7 @@ typedef struct st_mi_isam_pack {
uchar
version
;
}
MI_PACK
;
#define MAX_NONMAPPED_INSERTS 1000
typedef
struct
st_mi_isam_share
{
/* Shared between opens */
MI_STATE_INFO
state
;
...
...
@@ -211,6 +212,8 @@ typedef struct st_mi_isam_share { /* Shared between opens */
rw_lock_t
*
key_root_lock
;
#endif
my_off_t
mmaped_length
;
uint
nonmmaped_inserts
;
/* counter of writing in non-mmaped
area */
rw_lock_t
mmap_lock
;
}
MYISAM_SHARE
;
...
...
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