Merge remote-tracking branch 'origin/mdb.RE/0.9'

This commit is contained in:
Quanah Gibson-Mount 2019-11-23 15:31:12 +00:00
commit a4af93f16b
5 changed files with 17 additions and 6 deletions

View File

@ -1,6 +1,10 @@
LMDB 0.9 Change Log
LMDB 0.9.24 Engineering
LMDB 0.9.25 Engineering
ITS#9068 fix mdb_dump/load backslashes in printable content
ITS#9118 add MAP_NOSYNC for FreeBSD
LMDB 0.9.24 Release (2019/07/24)
ITS#8969 Tweak mdb_page_split
ITS#8975 WIN32 fix writemap set_mapsize crash
ITS#9007 Fix loose pages in WRITEMAP

View File

@ -200,7 +200,7 @@ typedef int mdb_filehandle_t;
/** Library minor version */
#define MDB_VERSION_MINOR 9
/** Library patch version */
#define MDB_VERSION_PATCH 23
#define MDB_VERSION_PATCH 24
/** Combine args a,b,c into a single integer for easy version comparisons */
#define MDB_VERINT(a,b,c) (((a) << 24) | ((b) << 16) | (c))
@ -210,7 +210,7 @@ typedef int mdb_filehandle_t;
MDB_VERINT(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH)
/** The release date of this library version */
#define MDB_VERSION_DATE "December 19, 2018"
#define MDB_VERSION_DATE "July 24, 2019"
/** A stringifier for the version info */
#define MDB_VERSTR(a,b,c,d) "LMDB " #a "." #b "." #c ": (" d ")"

View File

@ -4010,13 +4010,18 @@ mdb_env_map(MDB_env *env, void *addr)
if (rc)
return rc;
#else
int mmap_flags = MAP_SHARED;
int prot = PROT_READ;
#ifdef MAP_NOSYNC /* Used on FreeBSD */
if (flags & MDB_NOSYNC)
mmap_flags |= MAP_NOSYNC;
#endif
if (flags & MDB_WRITEMAP) {
prot |= PROT_WRITE;
if (ftruncate(env->me_fd, env->me_mapsize) < 0)
return ErrCode();
}
env->me_map = mmap(addr, env->me_mapsize, prot, MAP_SHARED,
env->me_map = mmap(addr, env->me_mapsize, prot, mmap_flags,
env->me_fd, 0);
if (env->me_map == MAP_FAILED) {
env->me_map = NULL;

View File

@ -68,6 +68,8 @@ static void text(MDB_val *v)
end = c + v->mv_size;
while (c < end) {
if (isprint(*c)) {
if (*c == '\\')
putchar('\\');
putchar(*c);
} else {
putchar('\\');

View File

@ -238,7 +238,7 @@ badend:
while (c2 < end) {
if (*c2 == '\\') {
if (c2[1] == '\\') {
c1++; c2 += 2;
*c1++ = *c2;
} else {
if (c2+3 > end || !isxdigit(c2[1]) || !isxdigit(c2[2])) {
Eof = 1;
@ -246,8 +246,8 @@ badend:
return EOF;
}
*c1++ = unhex(++c2);
c2 += 2;
}
c2 += 2;
} else {
/* copies are redundant when no escapes were used */
*c1++ = *c2++;