s4-ldb: added a TODO about checking the indexlist
authorAndrew Tridgell <tridge@samba.org>
Thu, 22 Oct 2009 01:45:48 +0000 (12:45 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 22 Oct 2009 01:47:55 +0000 (12:47 +1100)
source4/lib/ldb/ldb_tdb/ldb_index.c

index 04c3c7acce69a9130e134ff59a5c863aba9fe81a..0d560fea5eedf1d688c1b815e34973e8e388d387 100644 (file)
@@ -428,6 +428,8 @@ static bool ltdb_is_indexed(const struct ldb_message *index_list, const char *at
        if (el == NULL) {
                return false;
        }
        if (el == NULL) {
                return false;
        }
+
+       /* TODO: this is too expensive! At least use a binary search */
        for (i=0; i<el->num_values; i++) {
                if (ldb_attr_cmp((char *)el->values[i].data, attr) == 0) {
                        return true;
        for (i=0; i<el->num_values; i++) {
                if (ldb_attr_cmp((char *)el->values[i].data, attr) == 0) {
                        return true;