ldb: unpack function for new pack format
authorAaron Haslett <aaronhaslett@catalyst.net.nz>
Wed, 1 May 2019 01:36:36 +0000 (13:36 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 22 May 2019 04:42:28 +0000 (04:42 +0000)
commit38feff073120ea87c100c05d8c9c3f6f771e5029
tree10ed791e5644424af0a9a2cc70ee310534995c33
parent5bf6f0ae3271cb1a24416523f1132b09d998adf3
ldb: unpack function for new pack format

Unpack function for new pack format with values separated from other
data so that while unpacking, the value section (which is probably large)
doesn't have to be loaded into cache/memory.
Additionally, width of length field can now vary per-element to save space.
The old unpack routine is still present and is called if the old pack
format version number is found.
LDB torture suite is modified to run relevant tests on both old and new
pack format.

NOTE: Configure with --abi-check-disable to build this commit. This
patch is part of a set of LDB ABI changes, and the version update is
done on the last commit.

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
lib/ldb/common/ldb_pack.c
lib/ldb/include/ldb_module.h
source4/torture/ldb/ldb.c