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
7f3f9027
Commit
7f3f9027
authored
Jan 27, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added comments to specify why no much mutex is needed.
parent
79f575a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
sql/ha_heap.cc
sql/ha_heap.cc
+24
-0
No files found.
sql/ha_heap.cc
View file @
7f3f9027
...
...
@@ -142,7 +142,13 @@ int ha_heap::write_row(byte * buf)
res
=
heap_write
(
file
,
buf
);
if
(
!
res
&&
++
records_changed
*
HEAP_STATS_UPDATE_THRESHOLD
>
file
->
s
->
records
)
{
/*
We can perform this safely since only one writer at the time is
allowed on the table.
*/
file
->
s
->
key_stat_version
++
;
}
return
res
;
}
...
...
@@ -155,7 +161,13 @@ int ha_heap::update_row(const byte * old_data, byte * new_data)
res
=
heap_update
(
file
,
old_data
,
new_data
);
if
(
!
res
&&
++
records_changed
*
HEAP_STATS_UPDATE_THRESHOLD
>
file
->
s
->
records
)
{
/*
We can perform this safely since only one writer at the time is
allowed on the table.
*/
file
->
s
->
key_stat_version
++
;
}
return
res
;
}
...
...
@@ -166,7 +178,13 @@ int ha_heap::delete_row(const byte * buf)
res
=
heap_delete
(
file
,
buf
);
if
(
!
res
&&
table
->
tmp_table
==
NO_TMP_TABLE
&&
++
records_changed
*
HEAP_STATS_UPDATE_THRESHOLD
>
file
->
s
->
records
)
{
/*
We can perform this safely since only one writer at the time is
allowed on the table.
*/
file
->
s
->
key_stat_version
++
;
}
return
res
;
}
...
...
@@ -297,7 +315,13 @@ int ha_heap::delete_all_rows()
{
heap_clear
(
file
);
if
(
table
->
tmp_table
==
NO_TMP_TABLE
)
{
/*
We can perform this safely since only one writer at the time is
allowed on the table.
*/
file
->
s
->
key_stat_version
++
;
}
return
0
;
}
...
...
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