[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
(ITS#7652) LMDB: mdb_copy fails on files > 2GB
Full_Name: Dimitrij Denissenko
Version:
OS: Ubuntu 12.04 (64bit)
URL:
Submission from: (NULL) (62.30.100.0)
Hi,
The latest mdb.master (acf20f7) fails on files that are larger than 2G, even on
64bit systems.
I could narrow it down to:
--- a/mdb/libraries/liblmdb/mdb.c
+++ b/mdb/libraries/liblmdb/mdb.c
@@ -4070,7 +4070,7 @@
else
w2 = wsize;
wres = write(fd, ptr, w2);
- rc = wres == (ssize_t)w2 ? MDB_SUCCESS : wres < 0 ? ErrCode() : EIO;
+ rc = wres > 0 ? MDB_SUCCESS : ErrCode();
if (rc) break;
wsize -= wres;
ptr += wres;
After this change the environment was copied correctly.