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
8b2f33f8
Commit
8b2f33f8
authored
Apr 20, 2010
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement UNIV_BTR_AVOID_COPY, an optimization of page splits.
parent
e67b5257
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletion
+29
-1
storage/innodb_plugin/ChangeLog
storage/innodb_plugin/ChangeLog
+6
-0
storage/innodb_plugin/btr/btr0btr.c
storage/innodb_plugin/btr/btr0btr.c
+19
-1
storage/innodb_plugin/include/univ.i
storage/innodb_plugin/include/univ.i
+4
-0
No files found.
storage/innodb_plugin/ChangeLog
View file @
8b2f33f8
2010-04-20 The InnoDB Team
* btr/btr0btr.c, include/univ.i:
Implement UNIV_BTR_AVOID_COPY, for avoiding writes when a B-tree
node is split at the first or last record.
2010-04-15 The InnoDB Team
* trx/trx0rec.c:
...
...
storage/innodb_plugin/btr/btr0btr.c
View file @
8b2f33f8
...
...
@@ -2015,7 +2015,17 @@ btr_page_split_and_insert(
}
/* 5. Move then the records to the new page */
if
(
direction
==
FSP_DOWN
)
{
if
(
direction
==
FSP_DOWN
#ifdef UNIV_BTR_AVOID_COPY
&&
page_rec_is_supremum
(
move_limit
))
{
/* Instead of moving all records, make the new page
the empty page. */
left_block
=
block
;
right_block
=
new_block
;
}
else
if
(
direction
==
FSP_DOWN
#endif
/* UNIV_BTR_AVOID_COPY */
)
{
/* fputs("Split left\n", stderr); */
if
(
0
...
...
@@ -2058,6 +2068,14 @@ btr_page_split_and_insert(
right_block
=
block
;
lock_update_split_left
(
right_block
,
left_block
);
#ifdef UNIV_BTR_AVOID_COPY
}
else
if
(
!
split_rec
)
{
/* Instead of moving all records, make the new page
the empty page. */
left_block
=
new_block
;
right_block
=
block
;
#endif
/* UNIV_BTR_AVOID_COPY */
}
else
{
/* fputs("Split right\n", stderr); */
...
...
storage/innodb_plugin/include/univ.i
View file @
8b2f33f8
...
...
@@ -205,6 +205,10 @@ operations (very slow); also UNIV_DEBUG must be defined */
adaptive hash index */
#
define
UNIV_SRV_PRINT_LATCH_WAITS
/* enable diagnostic output
in sync0sync.c */
#
define
UNIV_BTR_AVOID_COPY
/* when splitting B-tree nodes,
do not move any records when
all the records would
be moved */
#
define
UNIV_BTR_PRINT
/* enable functions for
printing B-trees */
#
define
UNIV_ZIP_DEBUG
/* extensive consistency checks
...
...
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