From: Andrew Tridgell Date: Thu, 22 Oct 2009 01:45:48 +0000 (+1100) Subject: s4-ldb: added a TODO about checking the indexlist X-Git-Tag: tdb-1.2.0~518 X-Git-Url: http://git.samba.org/samba.git/?p=ira%2Fwip.git;a=commitdiff_plain;h=a109ee71fb9b8fa25f9ca739caaba5a1399b7864;hp=f2988f5cad156da54e7ad41c2c2d8bd7a0ee29b8 s4-ldb: added a TODO about checking the indexlist --- diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c index 04c3c7acce6..0d560fea5ee 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_index.c +++ b/source4/lib/ldb/ldb_tdb/ldb_index.c @@ -428,6 +428,8 @@ static bool ltdb_is_indexed(const struct ldb_message *index_list, const char *at if (el == NULL) { return false; } + + /* TODO: this is too expensive! At least use a binary search */ for (i=0; inum_values; i++) { if (ldb_attr_cmp((char *)el->values[i].data, attr) == 0) { return true;