ldb_msg schema aware operations (was Re: [Release Planning 4.8] Samba 4.8.0)
Matthias Dieter Wallnöfer
mdw at samba.org
Sat Jan 13 21:15:29 UTC 2018
Hi Douglas,
sorry for not responding earlier.
You raised a good point - now that you have said it also I guess that
this silly bisection comparison strategy won't work when
case-insensitiveness is introduced.
I had a look at your LDB patch which theoretically seems correct. What
was the reason to have abandoned it?
One observation: in each comparator you call:
> + const struct ldb_schema_attribute *a;
> + a = ldb_schema_attribute_by_name(ldb, el->name);
Are we sure that the impact is negligible? In my patches for instance I
passed the attribute around for not delaying too much.
Thanks for your valuable feedback. Hopefully we find a possibility to
fix this, since this topic is important but has been neglected for years.
Matthias
Douglas Bagnall wrote:
> On 10/01/18 17:23, Douglas Bagnall via samba-technical wrote:
>> My own work in this direction got this far:
>>
>> http://git.catalyst.net.nz/gitweb?p=samba.git;a=commitdiff;h=f04f93872de45625a4e55bb63b13e4c69525b24b
>>
>
> Matthias,
>
> I think you will need to use a schema aware comparison for sorting the
> lists, as I attempt to do in the linked patch. Otherwise the
> bisections and such will fail.
>
> For example, if you are looking for case-insensitive duplicates in
> {A b C c d}, and the list is sorted with ldb_val_cmp(), you would see
> {A C b c d} and the duplicate C-c would be separated and thus missed
> by the optimised algorithm.
>
> Douglas
>
More information about the samba-technical
mailing list