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
371decad
Commit
371decad
authored
Feb 01, 2008
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addresses #126
git-svn-id:
file:///svn/tokudb@2006
c7de825b-a66e-492c-adef-691d508d4ae1
parent
353653f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
newbrt/roll.c
newbrt/roll.c
+5
-5
No files found.
newbrt/roll.c
View file @
371decad
...
@@ -187,7 +187,7 @@ void toku_recover_newbrtnode (struct logtype_newbrtnode *c) {
...
@@ -187,7 +187,7 @@ void toku_recover_newbrtnode (struct logtype_newbrtnode *c) {
n
->
u
.
n
.
n_bytes_in_buffers
=
0
;
n
->
u
.
n
.
n_bytes_in_buffers
=
0
;
int
i
;
int
i
;
for
(
i
=
0
;
i
<
TREE_FANOUT
+
1
;
i
++
)
for
(
i
=
0
;
i
<
TREE_FANOUT
+
1
;
i
++
)
n
->
u
.
n
.
n_bytes_in_buffer
[
i
]
=
0
;
BNC_NBYTESINBUF
(
n
,
i
)
=
0
;
}
}
// Now put it in the cachetable
// Now put it in the cachetable
toku_cachetable_put
(
pair
->
cf
,
c
->
diskoff
,
n
,
toku_serialize_brtnode_size
(
n
),
toku_brtnode_flush_callback
,
toku_brtnode_fetch_callback
,
0
);
toku_cachetable_put
(
pair
->
cf
,
c
->
diskoff
,
n
,
toku_serialize_brtnode_size
(
n
),
toku_brtnode_flush_callback
,
toku_brtnode_fetch_callback
,
0
);
...
@@ -239,7 +239,7 @@ void toku_recover_addchild (struct logtype_addchild *le) {
...
@@ -239,7 +239,7 @@ void toku_recover_addchild (struct logtype_addchild *le) {
unsigned
int
i
;
unsigned
int
i
;
for
(
i
=
node
->
u
.
n
.
n_children
;
i
>
le
->
childnum
;
i
--
)
{
for
(
i
=
node
->
u
.
n
.
n_children
;
i
>
le
->
childnum
;
i
--
)
{
node
->
u
.
n
.
childinfos
[
i
]
=
node
->
u
.
n
.
childinfos
[
i
-
1
];
node
->
u
.
n
.
childinfos
[
i
]
=
node
->
u
.
n
.
childinfos
[
i
-
1
];
node
->
u
.
n
.
n_bytes_in_buffer
[
i
]
=
node
->
u
.
n
.
n_bytes_in_buffer
[
i
-
1
]
;
BNC_NBYTESINBUF
(
node
,
i
)
=
BNC_NBYTESINBUF
(
node
,
i
-
1
)
;
assert
(
i
>=
2
);
assert
(
i
>=
2
);
node
->
u
.
n
.
childkeys
[
i
-
1
]
=
node
->
u
.
n
.
childkeys
[
i
-
2
];
node
->
u
.
n
.
childkeys
[
i
-
1
]
=
node
->
u
.
n
.
childkeys
[
i
-
2
];
}
}
...
@@ -247,7 +247,7 @@ void toku_recover_addchild (struct logtype_addchild *le) {
...
@@ -247,7 +247,7 @@ void toku_recover_addchild (struct logtype_addchild *le) {
BNC_DISKOFF
(
node
,
le
->
childnum
)
=
le
->
child
;
BNC_DISKOFF
(
node
,
le
->
childnum
)
=
le
->
child
;
node
->
u
.
n
.
childkeys
[
le
->
childnum
-
1
]
=
0
;
node
->
u
.
n
.
childkeys
[
le
->
childnum
-
1
]
=
0
;
int
r
=
toku_fifo_create
(
&
BNC_BUFFER
(
node
,
le
->
childnum
));
assert
(
r
==
0
);
int
r
=
toku_fifo_create
(
&
BNC_BUFFER
(
node
,
le
->
childnum
));
assert
(
r
==
0
);
node
->
u
.
n
.
n_bytes_in_buffer
[
le
->
childnum
]
=
0
;
BNC_NBYTESINBUF
(
node
,
le
->
childnum
)
=
0
;
node
->
u
.
n
.
n_children
++
;
node
->
u
.
n
.
n_children
++
;
node
->
log_lsn
=
le
->
lsn
;
node
->
log_lsn
=
le
->
lsn
;
r
=
toku_cachetable_unpin
(
cf
,
le
->
diskoff
,
1
,
toku_serialize_brtnode_size
(
node
));
r
=
toku_cachetable_unpin
(
cf
,
le
->
diskoff
,
1
,
toku_serialize_brtnode_size
(
node
));
...
@@ -271,7 +271,7 @@ void toku_recover_delchild (struct logtype_delchild *le) {
...
@@ -271,7 +271,7 @@ void toku_recover_delchild (struct logtype_delchild *le) {
assert
(
node
->
u
.
n
.
childinfos
[
childnum
].
subtree_fingerprint
==
le
->
childfingerprint
);
assert
(
node
->
u
.
n
.
childinfos
[
childnum
].
subtree_fingerprint
==
le
->
childfingerprint
);
assert
(
BNC_DISKOFF
(
node
,
childnum
)
==
le
->
child
);
assert
(
BNC_DISKOFF
(
node
,
childnum
)
==
le
->
child
);
assert
(
toku_fifo_n_entries
(
BNC_BUFFER
(
node
,
childnum
))
==
0
);
assert
(
toku_fifo_n_entries
(
BNC_BUFFER
(
node
,
childnum
))
==
0
);
assert
(
node
->
u
.
n
.
n_bytes_in_buffer
[
childnum
]
==
0
);
assert
(
BNC_NBYTESINBUF
(
node
,
childnum
)
==
0
);
assert
(
node
->
u
.
n
.
n_children
>
2
);
// Must be at least two children.
assert
(
node
->
u
.
n
.
n_children
>
2
);
// Must be at least two children.
u_int32_t
i
;
u_int32_t
i
;
assert
(
childnum
>
0
);
assert
(
childnum
>
0
);
...
@@ -280,7 +280,7 @@ void toku_recover_delchild (struct logtype_delchild *le) {
...
@@ -280,7 +280,7 @@ void toku_recover_delchild (struct logtype_delchild *le) {
toku_fifo_free
(
&
BNC_BUFFER
(
node
,
childnum
));
toku_fifo_free
(
&
BNC_BUFFER
(
node
,
childnum
));
for
(
i
=
childnum
+
1
;
i
<
(
unsigned
)
node
->
u
.
n
.
n_children
;
i
++
)
{
for
(
i
=
childnum
+
1
;
i
<
(
unsigned
)
node
->
u
.
n
.
n_children
;
i
++
)
{
node
->
u
.
n
.
childinfos
[
i
-
1
]
=
node
->
u
.
n
.
childinfos
[
i
];
node
->
u
.
n
.
childinfos
[
i
-
1
]
=
node
->
u
.
n
.
childinfos
[
i
];
node
->
u
.
n
.
n_bytes_in_buffer
[
i
-
1
]
=
node
->
u
.
n
.
n_bytes_in_buffer
[
i
]
;
BNC_NBYTESINBUF
(
node
,
i
-
1
)
=
BNC_NBYTESINBUF
(
node
,
i
)
;
node
->
u
.
n
.
childkeys
[
i
-
2
]
=
node
->
u
.
n
.
childkeys
[
i
-
1
];
node
->
u
.
n
.
childkeys
[
i
-
2
]
=
node
->
u
.
n
.
childkeys
[
i
-
1
];
}
}
node
->
u
.
n
.
n_children
--
;
node
->
u
.
n
.
n_children
--
;
...
...
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