Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
8297bfe0
Commit
8297bfe0
authored
Nov 22, 2015
by
Orivej Desh
Committed by
Howard Chu
Nov 23, 2015
Browse files
ITS#8319 mdb_load: explain readline and mdb_cursor_put errors
parent
b0851a13
Changes
1
Show whitespace changes
Inline
Side-by-side
libraries/liblmdb/mdb_load.c
View file @
8297bfe0
...
...
@@ -400,20 +400,22 @@ int main(int argc, char *argv[])
while
(
1
)
{
rc
=
readline
(
&
key
,
&
kbuf
);
if
(
rc
==
EOF
)
if
(
rc
)
/* rc
== EOF
*/
break
;
if
(
rc
)
goto
txn_abort
;
rc
=
readline
(
&
data
,
&
dbuf
);
if
(
rc
)
if
(
rc
)
{
fprintf
(
stderr
,
"%s: line %"
Z
"d: failed to read key value
\n
"
,
prog
,
lineno
);
goto
txn_abort
;
}
rc
=
mdb_cursor_put
(
mc
,
&
key
,
&
data
,
putflags
);
if
(
rc
==
MDB_KEYEXIST
&&
putflags
)
continue
;
if
(
rc
)
if
(
rc
)
{
fprintf
(
stderr
,
"mdb_cursor_put failed, error %d %s
\n
"
,
rc
,
mdb_strerror
(
rc
));
goto
txn_abort
;
}
batch
++
;
if
(
batch
==
100
)
{
rc
=
mdb_txn_commit
(
txn
);
...
...
Write
Preview
Supports
Markdown
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