diff -Nru lmdb-0.9.19/debian/changelog lmdb-0.9.21/debian/changelog --- lmdb-0.9.19/debian/changelog 2017-02-27 20:23:25.000000000 +0000 +++ lmdb-0.9.21/debian/changelog 2017-06-08 06:59:47.000000000 +0000 @@ -1,3 +1,10 @@ +lmdb (0.9.21-1) unstable; urgency=medium + + * Add d/watch file pointing to official github repository + * New upstream version 0.9.21 + + -- Ondřej Surý Thu, 08 Jun 2017 08:59:47 +0200 + lmdb (0.9.19-1) unstable; urgency=medium * New upstream version 0.9.19 diff -Nru lmdb-0.9.19/debian/watch lmdb-0.9.21/debian/watch --- lmdb-0.9.19/debian/watch 1970-01-01 00:00:00.000000000 +0000 +++ lmdb-0.9.21/debian/watch 2017-06-08 06:59:47.000000000 +0000 @@ -0,0 +1,3 @@ +version=3 +opts=filenamemangle=s/.+\/LMDB_(\d\S+)\.tar\.gz/lmdb-$1\.tar\.gz/ \ + https://github.com/LMDB/lmdb/releases .*/LMDB_(\d\S+)\.tar\.gz diff -Nru lmdb-0.9.19/libraries/liblmdb/CHANGES lmdb-0.9.21/libraries/liblmdb/CHANGES --- lmdb-0.9.19/libraries/liblmdb/CHANGES 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/CHANGES 2017-06-01 16:51:10.000000000 +0000 @@ -1,5 +1,12 @@ LMDB 0.9 Change Log +LMDB 0.9.21 Release (2017/06/01) + Fix xcursor after cursor_del (ITS#8622) + +LMDB 0.9.20 (Withdrawn) + Fix mdb_load with escaped plaintext (ITS#8558) + Fix mdb_cursor_last / mdb_put interaction (ITS#8557) + LMDB 0.9.19 Release (2016/12/28) Fix mdb_env_cwalk cursor init (ITS#8424) Fix robust mutexes on Solaris 10/11 (ITS#8339) diff -Nru lmdb-0.9.19/libraries/liblmdb/COPYRIGHT lmdb-0.9.21/libraries/liblmdb/COPYRIGHT --- lmdb-0.9.19/libraries/liblmdb/COPYRIGHT 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/COPYRIGHT 2017-06-01 16:51:10.000000000 +0000 @@ -1,4 +1,4 @@ -Copyright 2011-2016 Howard Chu, Symas Corp. +Copyright 2011-2017 Howard Chu, Symas Corp. All rights reserved. Redistribution and use in source and binary forms, with or without diff -Nru lmdb-0.9.19/libraries/liblmdb/intro.doc lmdb-0.9.21/libraries/liblmdb/intro.doc --- lmdb-0.9.19/libraries/liblmdb/intro.doc 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/intro.doc 2017-06-01 16:51:10.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright 2015-2016 Howard Chu, Symas Corp. + * Copyright 2015-2017 Howard Chu, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru lmdb-0.9.19/libraries/liblmdb/lmdb.h lmdb-0.9.21/libraries/liblmdb/lmdb.h --- lmdb-0.9.19/libraries/liblmdb/lmdb.h 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/lmdb.h 2017-06-01 16:51:10.000000000 +0000 @@ -135,7 +135,7 @@ * * @author Howard Chu, Symas Corporation. * - * @copyright Copyright 2011-2016 Howard Chu, Symas Corp. All rights reserved. + * @copyright Copyright 2011-2017 Howard Chu, Symas Corp. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted only as authorized by the OpenLDAP @@ -200,7 +200,7 @@ /** Library minor version */ #define MDB_VERSION_MINOR 9 /** Library patch version */ -#define MDB_VERSION_PATCH 19 +#define MDB_VERSION_PATCH 21 /** 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 @@ MDB_VERINT(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH) /** The release date of this library version */ -#define MDB_VERSION_DATE "December 28, 2016" +#define MDB_VERSION_DATE "June 1, 2017" /** A stringifier for the version info */ #define MDB_VERSTR(a,b,c,d) "LMDB " #a "." #b "." #c ": (" d ")" diff -Nru lmdb-0.9.19/libraries/liblmdb/mdb.c lmdb-0.9.21/libraries/liblmdb/mdb.c --- lmdb-0.9.19/libraries/liblmdb/mdb.c 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/mdb.c 2017-06-01 16:51:10.000000000 +0000 @@ -5,7 +5,7 @@ * BerkeleyDB API, but much simplified. */ /* - * Copyright 2011-2016 Howard Chu, Symas Corp. + * Copyright 2011-2017 Howard Chu, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -5459,8 +5459,17 @@ if (flags & (MDB_PS_FIRST|MDB_PS_LAST)) { i = 0; - if (flags & MDB_PS_LAST) + if (flags & MDB_PS_LAST) { i = NUMKEYS(mp) - 1; + /* if already init'd, see if we're already in right place */ + if (mc->mc_flags & C_INITIALIZED) { + if (mc->mc_ki[mc->mc_top] == i) { + mc->mc_top = mc->mc_snum++; + mp = mc->mc_pg[mc->mc_top]; + goto ready; + } + } + } } else { int exact; node = mdb_node_search(mc, key, &exact); @@ -5486,6 +5495,7 @@ if ((rc = mdb_cursor_push(mc, mp))) return rc; +ready: if (flags & MDB_PS_MODIFY) { if ((rc = mdb_page_touch(mc)) != 0) return rc; @@ -5811,15 +5821,20 @@ MDB_node *leaf; int rc; - if ((mc->mc_flags & C_EOF) || - ((mc->mc_flags & C_DEL) && op == MDB_NEXT_DUP)) { + if ((mc->mc_flags & C_DEL && op == MDB_NEXT_DUP)) return MDB_NOTFOUND; - } + if (!(mc->mc_flags & C_INITIALIZED)) return mdb_cursor_first(mc, key, data); mp = mc->mc_pg[mc->mc_top]; + if (mc->mc_flags & C_EOF) { + if (mc->mc_ki[mc->mc_top] >= NUMKEYS(mp)-1) + return MDB_NOTFOUND; + mc->mc_flags ^= C_EOF; + } + if (mc->mc_db->md_flags & MDB_DUPSORT) { leaf = NODEPTR(mp, mc->mc_ki[mc->mc_top]); if (F_ISSET(leaf->mn_flags, F_DUPDATA)) { @@ -6224,16 +6239,13 @@ if (mc->mc_xcursor) mc->mc_xcursor->mx_cursor.mc_flags &= ~(C_INITIALIZED|C_EOF); - if (!(mc->mc_flags & C_EOF)) { - - if (!(mc->mc_flags & C_INITIALIZED) || mc->mc_top) { - rc = mdb_page_search(mc, NULL, MDB_PS_LAST); - if (rc != MDB_SUCCESS) - return rc; - } - mdb_cassert(mc, IS_LEAF(mc->mc_pg[mc->mc_top])); - + if (!(mc->mc_flags & C_INITIALIZED) || mc->mc_top) { + rc = mdb_page_search(mc, NULL, MDB_PS_LAST); + if (rc != MDB_SUCCESS) + return rc; } + mdb_cassert(mc, IS_LEAF(mc->mc_pg[mc->mc_top])); + mc->mc_ki[mc->mc_top] = NUMKEYS(mc->mc_pg[mc->mc_top]) - 1; mc->mc_flags |= C_INITIALIZED|C_EOF; leaf = NODEPTR(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top]); @@ -7644,9 +7656,15 @@ if (!(mc->mc_flags & C_INITIALIZED)) return EINVAL; - if (!mc->mc_snum || (mc->mc_flags & C_EOF)) + if (!mc->mc_snum) return MDB_NOTFOUND; + if (mc->mc_flags & C_EOF) { + if (mc->mc_ki[mc->mc_top] >= NUMKEYS(mc->mc_pg[mc->mc_top])) + return MDB_NOTFOUND; + mc->mc_flags ^= C_EOF; + } + leaf = NODEPTR(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top]); if (!F_ISSET(leaf->mn_flags, F_DUPDATA)) { *countp = 1; @@ -8433,14 +8451,17 @@ } if (mc->mc_db->md_flags & MDB_DUPSORT) { MDB_node *node = NODEPTR(m3->mc_pg[m3->mc_top], m3->mc_ki[m3->mc_top]); - /* If this node is a fake page, it needs to be reinited - * because its data has moved. But just reset mc_pg[0] - * if the xcursor is already live. + /* If this node has dupdata, it may need to be reinited + * because its data has moved. + * If the xcursor was not initd it must be reinited. + * Else if node points to a subDB, nothing is needed. + * Else (xcursor was initd, not a subDB) needs mc_pg[0] reset. */ - if ((node->mn_flags & (F_DUPDATA|F_SUBDATA)) == F_DUPDATA) { - if (m3->mc_xcursor->mx_cursor.mc_flags & C_INITIALIZED) - m3->mc_xcursor->mx_cursor.mc_pg[0] = NODEDATA(node); - else + if (node->mn_flags & F_DUPDATA) { + if (m3->mc_xcursor->mx_cursor.mc_flags & C_INITIALIZED) { + if (!(node->mn_flags & F_SUBDATA)) + m3->mc_xcursor->mx_cursor.mc_pg[0] = NODEDATA(node); + } else mdb_xcursor_init1(m3, node); } } diff -Nru lmdb-0.9.19/libraries/liblmdb/mdb_copy.1 lmdb-0.9.21/libraries/liblmdb/mdb_copy.1 --- lmdb-0.9.19/libraries/liblmdb/mdb_copy.1 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/mdb_copy.1 2017-06-01 16:51:10.000000000 +0000 @@ -1,5 +1,5 @@ -.TH MDB_COPY 1 "2014/06/20" "LMDB 0.9.14" -.\" Copyright 2012-2016 Howard Chu, Symas Corp. All Rights Reserved. +.TH MDB_COPY 1 "2014/07/01" "LMDB 0.9.14" +.\" Copyright 2012-2017 Howard Chu, Symas Corp. All Rights Reserved. .\" Copying restrictions apply. See COPYRIGHT/LICENSE. .SH NAME mdb_copy \- LMDB environment copy tool diff -Nru lmdb-0.9.19/libraries/liblmdb/mdb_copy.c lmdb-0.9.21/libraries/liblmdb/mdb_copy.c --- lmdb-0.9.19/libraries/liblmdb/mdb_copy.c 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/mdb_copy.c 2017-06-01 16:51:10.000000000 +0000 @@ -1,6 +1,6 @@ /* mdb_copy.c - memory-mapped database backup tool */ /* - * Copyright 2012-2016 Howard Chu, Symas Corp. + * Copyright 2012-2017 Howard Chu, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru lmdb-0.9.19/libraries/liblmdb/mdb_dump.1 lmdb-0.9.21/libraries/liblmdb/mdb_dump.1 --- lmdb-0.9.19/libraries/liblmdb/mdb_dump.1 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/mdb_dump.1 2017-06-01 16:51:10.000000000 +0000 @@ -1,5 +1,5 @@ -.TH MDB_DUMP 1 "2014/06/20" "LMDB 0.9.14" -.\" Copyright 2014-2016 Howard Chu, Symas Corp. All Rights Reserved. +.TH MDB_DUMP 1 "2015/09/30" "LMDB 0.9.17" +.\" Copyright 2014-2017 Howard Chu, Symas Corp. All Rights Reserved. .\" Copying restrictions apply. See COPYRIGHT/LICENSE. .SH NAME mdb_dump \- LMDB environment export tool diff -Nru lmdb-0.9.19/libraries/liblmdb/mdb_dump.c lmdb-0.9.21/libraries/liblmdb/mdb_dump.c --- lmdb-0.9.19/libraries/liblmdb/mdb_dump.c 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/mdb_dump.c 2017-06-01 16:51:10.000000000 +0000 @@ -1,6 +1,6 @@ /* mdb_dump.c - memory-mapped database dump tool */ /* - * Copyright 2011-2016 Howard Chu, Symas Corp. + * Copyright 2011-2017 Howard Chu, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru lmdb-0.9.19/libraries/liblmdb/mdb_load.1 lmdb-0.9.21/libraries/liblmdb/mdb_load.1 --- lmdb-0.9.19/libraries/liblmdb/mdb_load.1 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/mdb_load.1 2017-06-01 16:51:10.000000000 +0000 @@ -1,5 +1,5 @@ -.TH MDB_LOAD 1 "2014/06/20" "LMDB 0.9.14" -.\" Copyright 2014-2016 Howard Chu, Symas Corp. All Rights Reserved. +.TH MDB_LOAD 1 "2015/09/30" "LMDB 0.9.17" +.\" Copyright 2014-2017 Howard Chu, Symas Corp. All Rights Reserved. .\" Copying restrictions apply. See COPYRIGHT/LICENSE. .SH NAME mdb_load \- LMDB environment import tool diff -Nru lmdb-0.9.19/libraries/liblmdb/mdb_load.c lmdb-0.9.21/libraries/liblmdb/mdb_load.c --- lmdb-0.9.19/libraries/liblmdb/mdb_load.c 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/mdb_load.c 2017-06-01 16:51:10.000000000 +0000 @@ -1,6 +1,6 @@ /* mdb_load.c - memory-mapped database load tool */ /* - * Copyright 2011-2016 Howard Chu, Symas Corp. + * Copyright 2011-2017 Howard Chu, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -248,7 +248,8 @@ c2 += 2; } } else { - c1++; c2++; + /* copies are redundant when no escapes were used */ + *c1++ = *c2++; } } } else { diff -Nru lmdb-0.9.19/libraries/liblmdb/mdb_stat.1 lmdb-0.9.21/libraries/liblmdb/mdb_stat.1 --- lmdb-0.9.19/libraries/liblmdb/mdb_stat.1 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/mdb_stat.1 2017-06-01 16:51:10.000000000 +0000 @@ -1,5 +1,5 @@ -.TH MDB_STAT 1 "2014/06/20" "LMDB 0.9.14" -.\" Copyright 2012-2016 Howard Chu, Symas Corp. All Rights Reserved. +.TH MDB_STAT 1 "2015/09/30" "LMDB 0.9.17" +.\" Copyright 2012-2017 Howard Chu, Symas Corp. All Rights Reserved. .\" Copying restrictions apply. See COPYRIGHT/LICENSE. .SH NAME mdb_stat \- LMDB environment status tool diff -Nru lmdb-0.9.19/libraries/liblmdb/mdb_stat.c lmdb-0.9.21/libraries/liblmdb/mdb_stat.c --- lmdb-0.9.19/libraries/liblmdb/mdb_stat.c 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/mdb_stat.c 2017-06-01 16:51:10.000000000 +0000 @@ -1,6 +1,6 @@ /* mdb_stat.c - memory-mapped database status tool */ /* - * Copyright 2011-2016 Howard Chu, Symas Corp. + * Copyright 2011-2017 Howard Chu, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru lmdb-0.9.19/libraries/liblmdb/midl.c lmdb-0.9.21/libraries/liblmdb/midl.c --- lmdb-0.9.19/libraries/liblmdb/midl.c 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/midl.c 2017-06-01 16:51:10.000000000 +0000 @@ -3,7 +3,8 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2000-2015 The OpenLDAP Foundation. + * Copyright 2000-2016 The OpenLDAP Foundation. + * Portions Copyright 2001-2017 Howard Chu, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru lmdb-0.9.19/libraries/liblmdb/midl.h lmdb-0.9.21/libraries/liblmdb/midl.h --- lmdb-0.9.19/libraries/liblmdb/midl.h 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/midl.h 2017-06-01 16:51:10.000000000 +0000 @@ -11,7 +11,8 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2000-2015 The OpenLDAP Foundation. + * Copyright 2000-2016 The OpenLDAP Foundation. + * Portions Copyright 2001-2017 Howard Chu, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru lmdb-0.9.19/libraries/liblmdb/mtest2.c lmdb-0.9.21/libraries/liblmdb/mtest2.c --- lmdb-0.9.19/libraries/liblmdb/mtest2.c 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/mtest2.c 2017-06-01 16:51:10.000000000 +0000 @@ -1,6 +1,6 @@ /* mtest2.c - memory-mapped database tester/toy */ /* - * Copyright 2011-2016 Howard Chu, Symas Corp. + * Copyright 2011-2017 Howard Chu, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru lmdb-0.9.19/libraries/liblmdb/mtest3.c lmdb-0.9.21/libraries/liblmdb/mtest3.c --- lmdb-0.9.19/libraries/liblmdb/mtest3.c 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/mtest3.c 2017-06-01 16:51:10.000000000 +0000 @@ -1,6 +1,6 @@ /* mtest3.c - memory-mapped database tester/toy */ /* - * Copyright 2011-2016 Howard Chu, Symas Corp. + * Copyright 2011-2017 Howard Chu, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru lmdb-0.9.19/libraries/liblmdb/mtest4.c lmdb-0.9.21/libraries/liblmdb/mtest4.c --- lmdb-0.9.19/libraries/liblmdb/mtest4.c 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/mtest4.c 2017-06-01 16:51:10.000000000 +0000 @@ -1,6 +1,6 @@ /* mtest4.c - memory-mapped database tester/toy */ /* - * Copyright 2011-2016 Howard Chu, Symas Corp. + * Copyright 2011-2017 Howard Chu, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru lmdb-0.9.19/libraries/liblmdb/mtest5.c lmdb-0.9.21/libraries/liblmdb/mtest5.c --- lmdb-0.9.19/libraries/liblmdb/mtest5.c 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/mtest5.c 2017-06-01 16:51:10.000000000 +0000 @@ -1,6 +1,6 @@ /* mtest5.c - memory-mapped database tester/toy */ /* - * Copyright 2011-2016 Howard Chu, Symas Corp. + * Copyright 2011-2017 Howard Chu, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru lmdb-0.9.19/libraries/liblmdb/mtest6.c lmdb-0.9.21/libraries/liblmdb/mtest6.c --- lmdb-0.9.19/libraries/liblmdb/mtest6.c 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/mtest6.c 2017-06-01 16:51:10.000000000 +0000 @@ -1,6 +1,6 @@ /* mtest6.c - memory-mapped database tester/toy */ /* - * Copyright 2011-2016 Howard Chu, Symas Corp. + * Copyright 2011-2017 Howard Chu, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru lmdb-0.9.19/libraries/liblmdb/mtest.c lmdb-0.9.21/libraries/liblmdb/mtest.c --- lmdb-0.9.19/libraries/liblmdb/mtest.c 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/mtest.c 2017-06-01 16:51:10.000000000 +0000 @@ -1,6 +1,6 @@ /* mtest.c - memory-mapped database tester/toy */ /* - * Copyright 2011-2016 Howard Chu, Symas Corp. + * Copyright 2011-2017 Howard Chu, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru lmdb-0.9.19/libraries/liblmdb/sample-bdb.txt lmdb-0.9.21/libraries/liblmdb/sample-bdb.txt --- lmdb-0.9.19/libraries/liblmdb/sample-bdb.txt 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/sample-bdb.txt 2017-06-01 16:51:10.000000000 +0000 @@ -3,7 +3,7 @@ * Do a line-by-line comparison of this and sample-mdb.txt */ /* - * Copyright 2012-2016 Howard Chu, Symas Corp. + * Copyright 2012-2017 Howard Chu, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru lmdb-0.9.19/libraries/liblmdb/sample-mdb.txt lmdb-0.9.21/libraries/liblmdb/sample-mdb.txt --- lmdb-0.9.19/libraries/liblmdb/sample-mdb.txt 2016-12-28 18:36:01.000000000 +0000 +++ lmdb-0.9.21/libraries/liblmdb/sample-mdb.txt 2017-06-01 16:51:10.000000000 +0000 @@ -3,7 +3,7 @@ * Do a line-by-line comparison of this and sample-bdb.txt */ /* - * Copyright 2012-2016 Howard Chu, Symas Corp. + * Copyright 2012-2017 Howard Chu, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without