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
ae00985a
Commit
ae00985a
authored
Jan 12, 2008
by
Bradley C. Kuszmaul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_abort1.tdb runs. Addresses #253.
git-svn-id:
file:///svn/tokudb@1621
c7de825b-a66e-492c-adef-691d508d4ae1
parent
4e3af7f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
newbrt/pma.c
newbrt/pma.c
+1
-1
newbrt/roll.c
newbrt/roll.c
+29
-3
No files found.
newbrt/pma.c
View file @
ae00985a
...
...
@@ -1582,7 +1582,7 @@ int toku_pma_clear_at_index (PMA pma, unsigned int idx) {
if
(
!
kv_pair_inuse
(
pma
->
pairs
[
idx
]))
return
-
1
;
pma_mfree_kv_pair
(
pma
,
pma
->
pairs
[
idx
]);
pma
->
pairs
[
idx
]
=
0
;
pma
->
n_pairs_present
++
;
pma
->
n_pairs_present
--
;
return
0
;
}
...
...
newbrt/roll.c
View file @
ae00985a
...
...
@@ -109,6 +109,20 @@ void toku_recover_fcreate (struct logtype_fcreate *c) {
toku_free
(
c
->
fname
.
data
);
}
int
toku_rollback_fcreate
(
struct
logtype_fcreate
*
le
,
TOKUTXN
txn
__attribute__
((
__unused__
)))
{
char
*
fname
=
fixup_fname
(
&
le
->
fname
);
char
*
directory
=
txn
->
logger
->
directory
;
int
full_len
=
strlen
(
fname
)
+
strlen
(
directory
)
+
2
;
char
full_fname
[
full_len
];
int
l
=
snprintf
(
full_fname
,
full_len
,
"%s/%s"
,
directory
,
fname
);
assert
(
l
<=
full_len
);
int
r
=
unlink
(
full_fname
);
assert
(
r
==
0
);
toku_free
(
fname
);
return
0
;
}
void
toku_recover_fheader
(
struct
logtype_fheader
*
c
)
{
struct
cf_pair
*
pair
;
int
r
=
find_cachefile
(
c
->
filenum
,
&
pair
);
...
...
@@ -178,6 +192,16 @@ void toku_recover_newbrtnode (struct logtype_newbrtnode *c) {
assert
(
r
==
0
);
}
int
toku_rollback_newbrtnode
(
struct
logtype_newbrtnode
*
le
,
TOKUTXN
txn
)
{
// All that must be done is to put the node on the freelist.
// Since we don't have a freelist right now, we don't have anything to do.
// We'll fix this later (See #264)
le
=
le
;
txn
=
txn
;
return
0
;
}
void
toku_recover_fopen
(
struct
logtype_fopen
*
c
)
{
char
*
fname
=
fixup_fname
(
&
c
->
fname
);
CACHEFILE
cf
;
...
...
@@ -190,6 +214,11 @@ void toku_recover_fopen (struct logtype_fopen *c) {
toku_free
(
c
->
fname
.
data
);
}
int
toku_rollback_fopen
(
struct
logtype_fopen
*
le
__attribute__
((
__unused__
)),
TOKUTXN
txn
__attribute__
((
__unused__
)))
{
// Nothing needs to be done to undo an fopen.
return
0
;
}
void
toku_recover_insertinleaf
(
struct
logtype_insertinleaf
*
c
)
{
struct
cf_pair
*
pair
;
int
r
=
find_cachefile
(
c
->
filenum
,
&
pair
);
...
...
@@ -282,9 +311,6 @@ void toku_recover_pmadistribute (struct logtype_pmadistribute *c) {
toku_free
(
c
->
fromto
.
array
);
}
int
toku_rollback_fcreate
(
struct
logtype_fcreate
*
le
,
TOKUTXN
txn
)
ABORTIT
int
toku_rollback_fheader
(
struct
logtype_fheader
*
le
,
TOKUTXN
txn
)
ABORTIT
int
toku_rollback_newbrtnode
(
struct
logtype_newbrtnode
*
le
,
TOKUTXN
txn
)
ABORTIT
int
toku_rollback_fopen
(
struct
logtype_fopen
*
le
,
TOKUTXN
txn
)
ABORTIT
int
toku_rollback_resizepma
(
struct
logtype_resizepma
*
le
,
TOKUTXN
txn
)
ABORTIT
int
toku_rollback_pmadistribute
(
struct
logtype_pmadistribute
*
le
,
TOKUTXN
txn
)
ABORTIT
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