mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Merge remote-tracking branch 'origin/mdb.RE/0.9'
This commit is contained in:
commit
a4af93f16b
@ -1,6 +1,10 @@
|
|||||||
LMDB 0.9 Change Log
|
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#8969 Tweak mdb_page_split
|
||||||
ITS#8975 WIN32 fix writemap set_mapsize crash
|
ITS#8975 WIN32 fix writemap set_mapsize crash
|
||||||
ITS#9007 Fix loose pages in WRITEMAP
|
ITS#9007 Fix loose pages in WRITEMAP
|
||||||
|
@ -200,7 +200,7 @@ typedef int mdb_filehandle_t;
|
|||||||
/** Library minor version */
|
/** Library minor version */
|
||||||
#define MDB_VERSION_MINOR 9
|
#define MDB_VERSION_MINOR 9
|
||||||
/** Library patch version */
|
/** 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 */
|
/** Combine args a,b,c into a single integer for easy version comparisons */
|
||||||
#define MDB_VERINT(a,b,c) (((a) << 24) | ((b) << 16) | (c))
|
#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)
|
MDB_VERINT(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH)
|
||||||
|
|
||||||
/** The release date of this library version */
|
/** 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 */
|
/** A stringifier for the version info */
|
||||||
#define MDB_VERSTR(a,b,c,d) "LMDB " #a "." #b "." #c ": (" d ")"
|
#define MDB_VERSTR(a,b,c,d) "LMDB " #a "." #b "." #c ": (" d ")"
|
||||||
|
@ -4010,13 +4010,18 @@ mdb_env_map(MDB_env *env, void *addr)
|
|||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
#else
|
#else
|
||||||
|
int mmap_flags = MAP_SHARED;
|
||||||
int prot = PROT_READ;
|
int prot = PROT_READ;
|
||||||
|
#ifdef MAP_NOSYNC /* Used on FreeBSD */
|
||||||
|
if (flags & MDB_NOSYNC)
|
||||||
|
mmap_flags |= MAP_NOSYNC;
|
||||||
|
#endif
|
||||||
if (flags & MDB_WRITEMAP) {
|
if (flags & MDB_WRITEMAP) {
|
||||||
prot |= PROT_WRITE;
|
prot |= PROT_WRITE;
|
||||||
if (ftruncate(env->me_fd, env->me_mapsize) < 0)
|
if (ftruncate(env->me_fd, env->me_mapsize) < 0)
|
||||||
return ErrCode();
|
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);
|
env->me_fd, 0);
|
||||||
if (env->me_map == MAP_FAILED) {
|
if (env->me_map == MAP_FAILED) {
|
||||||
env->me_map = NULL;
|
env->me_map = NULL;
|
||||||
|
@ -68,6 +68,8 @@ static void text(MDB_val *v)
|
|||||||
end = c + v->mv_size;
|
end = c + v->mv_size;
|
||||||
while (c < end) {
|
while (c < end) {
|
||||||
if (isprint(*c)) {
|
if (isprint(*c)) {
|
||||||
|
if (*c == '\\')
|
||||||
|
putchar('\\');
|
||||||
putchar(*c);
|
putchar(*c);
|
||||||
} else {
|
} else {
|
||||||
putchar('\\');
|
putchar('\\');
|
||||||
|
@ -238,7 +238,7 @@ badend:
|
|||||||
while (c2 < end) {
|
while (c2 < end) {
|
||||||
if (*c2 == '\\') {
|
if (*c2 == '\\') {
|
||||||
if (c2[1] == '\\') {
|
if (c2[1] == '\\') {
|
||||||
c1++; c2 += 2;
|
*c1++ = *c2;
|
||||||
} else {
|
} else {
|
||||||
if (c2+3 > end || !isxdigit(c2[1]) || !isxdigit(c2[2])) {
|
if (c2+3 > end || !isxdigit(c2[1]) || !isxdigit(c2[2])) {
|
||||||
Eof = 1;
|
Eof = 1;
|
||||||
@ -246,8 +246,8 @@ badend:
|
|||||||
return EOF;
|
return EOF;
|
||||||
}
|
}
|
||||||
*c1++ = unhex(++c2);
|
*c1++ = unhex(++c2);
|
||||||
c2 += 2;
|
|
||||||
}
|
}
|
||||||
|
c2 += 2;
|
||||||
} else {
|
} else {
|
||||||
/* copies are redundant when no escapes were used */
|
/* copies are redundant when no escapes were used */
|
||||||
*c1++ = *c2++;
|
*c1++ = *c2++;
|
||||||
|
Loading…
Reference in New Issue
Block a user