[Date Prev][Date Next]
Fwd: LMDB and text encoding
- To: firstname.lastname@example.org
- Subject: Fwd: LMDB and text encoding
- From: Timur Kristóf <email@example.com>
- Date: Mon, 2 Feb 2015 11:47:13 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=lZ/V4NMEUbqGElR2FMut0bZIIKgzUoR0fChuIQ8foWo=; b=FcE2+d+tDubFMtZoQuqwn9W+lBClmY/8I1qSO2pP1rYqzPvBvogbd3TPXQJLSBQArU 0KyIi/S2ihlWmMFzxZU0n5HGkgw4AUNl5lZAFheQoUHDzhgw6X5rMBtNDMvSBCYAoqV3 a/eo2Cdj3FmCMK7JONxiUU7W2VRd8ff3oT2vEOFpZo2pJpBXKL6ygrVDkL6pc5ZSgbvo wCFoLG7l9Ifjrhq70XXkkn9Wt11Opj7e4AuVtZxdpVdw4dtPJQgGSD4pDi64a76iZYSC mAqm1QIX+ffjIHgIqf7/e08WFy4yguEtZkMmEzHQbtEJ8U31nzygmAkDkir68fclUIyu q90Q==
- In-reply-to: <CAFF-SiWiL_UE32x2=0J1tvkLsTkEPjeTtzOO98URP5KgggXfirstname.lastname@example.org>
- References: <CAFF-SiUrJKGvG_z5vKgn13KX6oSbWQmLDj0VqGXMsuzJT5JBEg@mail.gmail.com> <CAFF-SiWh0Gv4Lo6SYwNcuZUCC2PcUDGZ24V0fP7hXnrx_e9PTw@mail.gmail.com> <CAFF-SiV0Q1xxxQdGKCCFsmR+1Wt1jtSpSNoaGo_2UU_0jzTXLg@mail.gmail.com> <CAFF-SiUPjzqs6RcXQRDL4e9xevu22AHuZqBGv=y_2Uyfagw2DQ@mail.gmail.com> <54CEB975.email@example.com> <54CECC2F.firstname.lastname@example.org> <54CEE2F2.email@example.com> <CAFF-SiWiL_UE32x2=0J1tvkLsTkEPjeTtzOO98URP5KgggXfirstname.lastname@example.org>
On Mon, Feb 2, 2015 at 3:37 AM, Howard Chu <email@example.com> wrote:
> Hallvard Breien Furuseth wrote:
>> On 02/02/15 00:40, Howard Chu wrote:
>>> It looks OK to me. No one raises any concerns I'll commit it in a few
>> Some sudden last thoughts:
>> mdb_dump.c also has a check (memchr(key.mv_data, '\0', key.mv_size)
>> to exclude non-databases, which is no longer valid.
> Good point. As Timur's patch comment notes, we probably need an API call "is
> valid DB" now.
>> Database names with \0 in them can no longer be spelled as strings,
>> everything which gets DB names from the database must use binary blobs.
>> Including mdb_load and mdb_dump; I notice mdb_load uses
>> strdup() for the "database=" name. Come to think of it, I have no
>> idea if the dump format supports DB names with \0 in them.
> No, it doesn't. It's the BDB format, and BDB only accepted C strings.
(Just noticed that I hit "reply" instead of "reply all". Sorry. Now
reposting to the mailing list.)
I think it is an acceptable limitation of mdb_dump and mdb_load. This
is not the only thing they don't support: they also don't work with
user-defined comparison functions. Although I could think about ways
to solve it.
For example, we could add a command line option that would make
mdb_dump output db names as a string of hexadecimal numbers, and
mdb_load interpret them as such.