filterindex.c 14.7 KB
Newer Older
1
2
3
4
/* OpenLDAP WiredTiger backend */
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
 *
Quanah Gibson-Mount's avatar
Quanah Gibson-Mount committed
5
 * Copyright 2002-2020 The OpenLDAP Foundation.
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted only as authorized by the OpenLDAP
 * Public License.
 *
 * A copy of this license is available in the file LICENSE in the
 * top-level directory of the distribution or, alternatively, at
 * <http://www.OpenLDAP.org/license.html>.
 */
/* ACKNOWLEDGEMENTS:
 * This work was developed by HAMANO Tsukasa <hamano@osstech.co.jp>
 * based on back-bdb for inclusion in OpenLDAP Software.
 * WiredTiger is a product of MongoDB Inc.
 */

#include "portable.h"

#include <stdio.h>
#include <ac/string.h>
#include "back-wt.h"
#include "idl.h"

static int
presence_candidates(
	Operation *op,
	wt_ctx *wc,
	AttributeDescription *desc,
	ID *ids )
{
	struct wt_info *wi = (struct wt_info *) op->o_bd->be_private;
	slap_mask_t mask;
	struct berval prefix = {0, NULL};
	int rc;
	WT_CURSOR *cursor = NULL;

	Debug( LDAP_DEBUG_TRACE, "=> wt_presence_candidates (%s)\n",
43
		   desc->ad_cname.bv_val );
44
45
46
47
48
49
50
51
52
53
54
55

	WT_IDL_ALL( wi, ids );

	if( desc == slap_schema.si_ad_objectClass ) {
		return 0;
	}

	rc = wt_index_param( op->o_bd, desc, LDAP_FILTER_PRESENT,
						 &mask, &prefix );

	if( rc == LDAP_INAPPROPRIATE_MATCHING ) {
		/* not indexed */
56
		Debug( LDAP_DEBUG_FILTER,
57
			   "<= wt_presence_candidates: (%s) not indexed\n",
58
			   desc->ad_cname.bv_val );
59
60
61
62
63
64
65
		return 0;
	}

	if( rc != LDAP_SUCCESS ) {
		Debug( LDAP_DEBUG_TRACE,
			   "<= wt_presence_candidates: (%s) index_param "
			   "returned=%d\n",
66
			   desc->ad_cname.bv_val, rc );
67
68
69
70
71
72
		return 0;
	}

	if( prefix.bv_val == NULL ) {
		Debug( LDAP_DEBUG_TRACE,
			   "<= wt_presence_candidates: (%s) no prefix\n",
73
			   desc->ad_cname.bv_val );
74
75
76
77
78
79
80
81
		return -1;
	}

	/* open index cursor */
	cursor = wt_ctx_index_cursor(wc, &desc->ad_type->sat_cname, 0);
	if( !cursor ) {
		Debug( LDAP_DEBUG_ANY,
			   "<= wt_presence_candidates: open index cursor failed: %s\n",
82
			   desc->ad_type->sat_cname.bv_val );
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
		return 0;
	}

	rc = wt_key_read( op->o_bd, cursor, &prefix, ids, NULL, 0 );

	if(cursor){
		cursor->close(cursor);
	}
	Debug(LDAP_DEBUG_TRACE,
		  "<= wt_presence_candidates: id=%ld first=%ld last=%ld\n",
		  (long) ids[0],
		  (long) WT_IDL_FIRST(ids),
		  (long) WT_IDL_LAST(ids) );

	return 0;
}

static int
equality_candidates(
	Operation *op,
	wt_ctx *wc,
	AttributeAssertion *ava,
	ID *ids,
	ID *tmp)
{
	struct wt_info *wi = (struct wt_info *) op->o_bd->be_private;
	slap_mask_t mask;
	struct berval prefix = {0, NULL};
	struct berval *keys = NULL;
	int i;
	int rc;
	MatchingRule *mr;
	WT_CURSOR *cursor = NULL;

	Debug( LDAP_DEBUG_TRACE, "=> wt_equality_candidates (%s)\n",
118
		   ava->aa_desc->ad_cname.bv_val );
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137

	if ( ava->aa_desc == slap_schema.si_ad_entryDN ) {
		ID id = NOID;
		rc = wt_dn2id(op, wc->session, &ava->aa_value, &id);
		if( rc == 0 ){
			wt_idl_append_one(ids, id);
		}else if ( rc == WT_NOTFOUND ) {
			WT_IDL_ZERO( ids );
			rc = 0;
		}
		return rc;
	}

	WT_IDL_ALL( wi, ids );

	rc = wt_index_param( op->o_bd, ava->aa_desc, LDAP_FILTER_EQUALITY,
						 &mask, &prefix );

	if ( rc == LDAP_INAPPROPRIATE_MATCHING ) {
138
		Debug( LDAP_DEBUG_FILTER,
139
			   "<= wt_equality_candidates: (%s) not indexed\n",
140
			   ava->aa_desc->ad_cname.bv_val );
141
142
143
144
145
146
		return 0;
	}

	if( rc != LDAP_SUCCESS ) {
		Debug( LDAP_DEBUG_ANY,
			   "<= wt_equality_candidates: (%s) index_param failed (%d)\n",
147
			   ava->aa_desc->ad_cname.bv_val, rc );
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
		return 0;
	}

	mr = ava->aa_desc->ad_type->sat_equality;
	if( !mr ) {
		return 0;
	}

	if( !mr->smr_filter ) {
		return 0;
	}

	rc = (mr->smr_filter)(
		LDAP_FILTER_EQUALITY,
		mask,
		ava->aa_desc->ad_type->sat_syntax,
		mr,
		&prefix,
		&ava->aa_value,
		&keys, op->o_tmpmemctx );

	if( rc != LDAP_SUCCESS ) {
		Debug( LDAP_DEBUG_TRACE,
			   "<= wt_equality_candidates: (%s, %s) "
			   "MR filter failed (%d)\n",
			   prefix.bv_val, ava->aa_desc->ad_cname.bv_val, rc );
		return 0;
	}

	if( keys == NULL ) {
		Debug( LDAP_DEBUG_TRACE,
			   "<= wt_equality_candidates: (%s) no keys\n",
180
			   ava->aa_desc->ad_cname.bv_val );
181
182
183
184
185
186
187
188
		return 0;
	}

	/* open index cursor */
	cursor = wt_ctx_index_cursor(wc, &ava->aa_desc->ad_type->sat_cname, 0);
	if( !cursor ) {
		Debug( LDAP_DEBUG_ANY,
			   "<= wt_equality_candidates: open index cursor failed: %s\n",
189
			   ava->aa_desc->ad_type->sat_cname.bv_val );
190
191
192
193
194
195
196
197
198
199
200
201
202
		return 0;
	}

	for ( i= 0; keys[i].bv_val != NULL; i++ ) {
		rc = wt_key_read( op->o_bd, cursor, &keys[i], tmp, NULL, 0 );
		if( rc == WT_NOTFOUND ) {
			WT_IDL_ZERO( ids );
			rc = 0;
			break;
		} else if( rc != LDAP_SUCCESS ) {
			Debug( LDAP_DEBUG_TRACE,
				   "<= wt_equality_candidates: (%s) "
				   "key read failed (%d)\n",
203
				   ava->aa_desc->ad_cname.bv_val, rc );
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
			break;
		}
		if ( i == 0 ) {
			WT_IDL_CPY( ids, tmp );
		} else {
			wt_idl_intersection( ids, tmp );
		}

		if( WT_IDL_IS_ZERO( ids ) )
			break;
	}

	ber_bvarray_free_x( keys, op->o_tmpmemctx );

	if(cursor){
		cursor->close(cursor);
	}

	Debug( LDAP_DEBUG_TRACE,
		   "<= wt_equality_candidates: id=%ld, first=%ld, last=%ld\n",
		   (long) ids[0],
		   (long) WT_IDL_FIRST(ids),
		   (long) WT_IDL_LAST(ids) );

	return rc;
}

static int
approx_candidates(
	Operation *op,
	wt_ctx *wc,
	AttributeAssertion *ava,
	ID *ids,
	ID *tmp )
{
	struct wt_info *wi = (struct wt_info *) op->o_bd->be_private;
	int i;
	int rc;
    slap_mask_t mask;
	struct berval prefix = {0, NULL};
	struct berval *keys = NULL;
	MatchingRule *mr;
	WT_CURSOR *cursor = NULL;

	Debug( LDAP_DEBUG_TRACE, "=> wt_approx_candidates (%s)\n",
249
		   ava->aa_desc->ad_cname.bv_val );
250
251
252
253
254
255
256

	WT_IDL_ALL( wi, ids );

	rc = wt_index_param( op->o_bd, ava->aa_desc, LDAP_FILTER_APPROX,
						 &mask, &prefix );

	if ( rc == LDAP_INAPPROPRIATE_MATCHING ) {
257
		Debug( LDAP_DEBUG_FILTER,
258
			   "<= wt_approx_candidates: (%s) not indexed\n",
259
			   ava->aa_desc->ad_cname.bv_val );
260
261
262
263
264
265
		return 0;
	}

	if( rc != LDAP_SUCCESS ) {
		Debug( LDAP_DEBUG_ANY,
			   "<= wt_approx_candidates: (%s) index_param failed (%d)\n",
266
			   ava->aa_desc->ad_cname.bv_val, rc );
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
		return 0;
	}

	mr = ava->aa_desc->ad_type->sat_approx;
	if( !mr ) {
		/* no approx matching rule, try equality matching rule */
		mr = ava->aa_desc->ad_type->sat_equality;
	}

	if( !mr ) {
		return 0;
	}

	if( !mr->smr_filter ) {
		return 0;
	}

	rc = (mr->smr_filter)(
		LDAP_FILTER_APPROX,
		mask,
		ava->aa_desc->ad_type->sat_syntax,
		mr,
		&prefix,
		&ava->aa_value,
		&keys, op->o_tmpmemctx );

	if( rc != LDAP_SUCCESS ) {
		Debug( LDAP_DEBUG_TRACE,
			   "<= wt_approx_candidates: (%s, %s) MR filter failed (%d)\n",
			   prefix.bv_val, ava->aa_desc->ad_cname.bv_val, rc );
		return 0;
	}

	if( keys == NULL ) {
		Debug( LDAP_DEBUG_TRACE,
			   "<= wt_approx_candidates: (%s) no keys (%s)\n",
303
			   prefix.bv_val, ava->aa_desc->ad_cname.bv_val );
304
305
306
307
308
309
310
311
		return 0;
	}

	/* open index cursor */
	cursor = wt_ctx_index_cursor(wc, &ava->aa_desc->ad_type->sat_cname, 0);
	if( !cursor ) {
		Debug( LDAP_DEBUG_ANY,
			   "<= wt_approx_candidates: open index cursor failed: %s\n",
312
			   ava->aa_desc->ad_type->sat_cname.bv_val );
313
314
315
316
317
318
319
320
321
322
323
324
		return 0;
	}

	for ( i= 0; keys[i].bv_val != NULL; i++ ) {
		rc = wt_key_read( op->o_bd, cursor, &keys[i], tmp, NULL, 0 );
		if( rc == WT_NOTFOUND ) {
			WT_IDL_ZERO( ids );
			rc = 0;
			break;
		} else if( rc != LDAP_SUCCESS ) {
			Debug( LDAP_DEBUG_TRACE,
				   "<= wt_approx_candidates: (%s) key read failed (%d)\n",
325
				   ava->aa_desc->ad_cname.bv_val, rc );
326
327
328
329
330
331
			break;
		}

		if( WT_IDL_IS_ZERO( tmp ) ) {
			Debug( LDAP_DEBUG_TRACE,
				   "<= wt_approx_candidates: (%s) NULL\n",
332
				   ava->aa_desc->ad_cname.bv_val );
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
			WT_IDL_ZERO( ids );
			break;
		}

		if ( i == 0 ) {
			WT_IDL_CPY( ids, tmp );
		} else {
			wt_idl_intersection( ids, tmp );
		}

		if( WT_IDL_IS_ZERO( ids ) )
			break;
	}

	ber_bvarray_free_x( keys, op->o_tmpmemctx );

	if(cursor){
		cursor->close(cursor);
	}

	Debug( LDAP_DEBUG_TRACE,
		   "<= wt_approx_candidates %ld, first=%ld, last=%ld\n",
		   (long) ids[0],
		   (long) WT_IDL_FIRST(ids),
		   (long) WT_IDL_LAST(ids) );

	return rc;
}

static int
substring_candidates(
	Operation *op,
	wt_ctx *wc,
	SubstringsAssertion *sub,
	ID *ids,
	ID *tmp )
{
	struct wt_info *wi = (struct wt_info *) op->o_bd->be_private;
	int i;
	int rc;
    slap_mask_t mask;
	struct berval prefix = {0, NULL};
	struct berval *keys = NULL;
	MatchingRule *mr;
	WT_CURSOR *cursor = NULL;

	Debug( LDAP_DEBUG_TRACE, "=> wt_substring_candidates (%s)\n",
380
		   sub->sa_desc->ad_cname.bv_val );
381
382
383
384
385
386
387

	WT_IDL_ALL( wi, ids );

	rc = wt_index_param( op->o_bd, sub->sa_desc, LDAP_FILTER_SUBSTRINGS,
						 &mask, &prefix );

	if ( rc == LDAP_INAPPROPRIATE_MATCHING ) {
388
		Debug( LDAP_DEBUG_FILTER,
389
			   "<= wt_substring_candidates: (%s) not indexed\n",
390
			   sub->sa_desc->ad_cname.bv_val );
391
392
393
394
395
396
397
		return 0;
	}

	if( rc != LDAP_SUCCESS ) {
		Debug( LDAP_DEBUG_ANY,
			   "<= wt_substring_candidates: (%s) "
			   "index_param failed (%d)\n",
398
			   sub->sa_desc->ad_cname.bv_val, rc );
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
		return 0;
	}

	mr = sub->sa_desc->ad_type->sat_substr;

	if( !mr ) {
		return 0;
	}

	if( !mr->smr_filter ) {
		return 0;
	}

	rc = (mr->smr_filter)(
		LDAP_FILTER_SUBSTRINGS,
		mask,
		sub->sa_desc->ad_type->sat_syntax,
		mr,
		&prefix,
		sub,
		&keys, op->o_tmpmemctx );

	if( rc != LDAP_SUCCESS ) {
		Debug( LDAP_DEBUG_TRACE,
			   "<= wt_substring_candidates: (%s) MR filter failed (%d)\n",
424
			   sub->sa_desc->ad_cname.bv_val, rc );
425
426
427
428
429
430
		return 0;
	}

	if( keys == NULL ) {
		Debug( LDAP_DEBUG_TRACE,
			   "<= wt_substring_candidates: (0x%04lx) no keys (%s)\n",
431
			   mask, sub->sa_desc->ad_cname.bv_val );
432
433
434
435
436
437
438
439
		return 0;
	}

	/* open index cursor */
	cursor = wt_ctx_index_cursor(wc, &sub->sa_desc->ad_cname, 0);
	if( !cursor ) {
		Debug( LDAP_DEBUG_ANY,
			   "<= wt_substring_candidates: open index cursor failed: %s\n",
440
			   sub->sa_desc->ad_cname.bv_val );
441
442
443
444
445
446
447
448
449
450
451
452
453
		return 0;
	}

	for ( i= 0; keys[i].bv_val != NULL; i++ ) {
		rc = wt_key_read( op->o_bd, cursor, &keys[i], tmp, NULL, 0 );

		if( rc == WT_NOTFOUND ) {
			WT_IDL_ZERO( ids );
			rc = 0;
			break;
		} else if( rc != LDAP_SUCCESS ) {
			Debug( LDAP_DEBUG_TRACE,
				   "<= wt_substring_candidates: (%s) key read failed (%d)\n",
454
				   sub->sa_desc->ad_cname.bv_val, rc );
455
456
457
458
459
460
			break;
		}

		if( WT_IDL_IS_ZERO( tmp ) ) {
			Debug( LDAP_DEBUG_TRACE,
				   "<= wt_substring_candidates: (%s) NULL\n",
461
				   sub->sa_desc->ad_cname.bv_val );
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
			WT_IDL_ZERO( ids );
			break;
		}

		if ( i == 0 ) {
			WT_IDL_CPY( ids, tmp );
		} else {
			wt_idl_intersection( ids, tmp );
		}

		if( WT_IDL_IS_ZERO( ids ) )
			break;
	}

	ber_bvarray_free_x( keys, op->o_tmpmemctx );

	if(cursor){
		cursor->close(cursor);
	}

	Debug( LDAP_DEBUG_TRACE,
		   "<= wt_substring_candidates: %ld, first=%ld, last=%ld\n",
		   (long) ids[0],
		   (long) WT_IDL_FIRST(ids),
		   (long) WT_IDL_LAST(ids));
	return rc;
}


static int
list_candidates(
	Operation *op,
	wt_ctx *wc,
	Filter *flist,
	int ftype,
	ID *ids,
	ID *tmp,
	ID *save )
{
	int rc = 0;
	Filter  *f;

504
	Debug( LDAP_DEBUG_FILTER, "=> wt_list_candidates 0x%x\n", ftype );
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
	for ( f = flist; f != NULL; f = f->f_next ) {
		/* ignore precomputed scopes */
		if ( f->f_choice == SLAPD_FILTER_COMPUTED &&
			 f->f_result == LDAP_SUCCESS ) {
			continue;
		}
		WT_IDL_ZERO( save );
		rc = wt_filter_candidates( op, wc, f, save, tmp,
								   save+WT_IDL_UM_SIZE );

		if ( rc != 0 ) {
			/* TODO: error handling */
			/*
			if ( rc == DB_LOCK_DEADLOCK )
				return rc;
			*/
			if ( ftype == LDAP_FILTER_AND ) {
				rc = 0;
				continue;
			}
			break;
		}


		if ( ftype == LDAP_FILTER_AND ) {
			if ( f == flist ) {
				WT_IDL_CPY( ids, save );
			} else {
				wt_idl_intersection( ids, save );
			}
			if( WT_IDL_IS_ZERO( ids ) )
				break;
		} else {
			if ( f == flist ) {
				WT_IDL_CPY( ids, save );
			} else {
				wt_idl_union( ids, save );
			}
		}
	}

	if( rc == LDAP_SUCCESS ) {
		Debug( LDAP_DEBUG_FILTER,
			   "<= wt_list_candidates: id=%ld first=%ld last=%ld\n",
			   (long) ids[0],
			   (long) WT_IDL_FIRST(ids),
			   (long) WT_IDL_LAST(ids) );

	} else {
		Debug( LDAP_DEBUG_FILTER,
			   "<= wt_list_candidates: undefined rc=%d\n",
556
			   rc );
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
	}

	return 0;
}

int
wt_filter_candidates(
	Operation *op,
	wt_ctx *wc,
	Filter *f,
	ID *ids,
	ID *tmp,
	ID *stack )
{
	struct wt_info *wi = (struct wt_info *)op->o_bd->be_private;
	int rc = 0;
573
	Debug( LDAP_DEBUG_FILTER, "=> wt_filter_candidates\n" );
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600

	if ( f->f_choice & SLAPD_FILTER_UNDEFINED ) {
		WT_IDL_ZERO( ids );
		goto done;
	}

	switch ( f->f_choice ) {
	case SLAPD_FILTER_COMPUTED:
		switch( f->f_result ) {
		case SLAPD_COMPARE_UNDEFINED:
			/* This technically is not the same as FALSE, but it
			 * certainly will produce no matches.
			 */
			/* FALL THRU */
		case LDAP_COMPARE_FALSE:
			WT_IDL_ZERO( ids );
			break;
		case LDAP_COMPARE_TRUE: {

			WT_IDL_ALL( wi, ids );
		} break;
		case LDAP_SUCCESS:
			/* this is a pre-computed scope, leave it alone */
			break;
		}
		break;
	case LDAP_FILTER_PRESENT:
601
		Debug( LDAP_DEBUG_FILTER, "\tPRESENT\n" );
602
603
604
605
		rc = presence_candidates( op, wc, f->f_desc, ids );
		break;

	case LDAP_FILTER_EQUALITY:
606
		Debug( LDAP_DEBUG_FILTER, "\tEQUALITY\n" );
607
608
609
610
		rc = equality_candidates( op, wc, f->f_ava, ids, tmp );
		break;

	case LDAP_FILTER_APPROX:
611
		Debug( LDAP_DEBUG_FILTER, "\tAPPROX\n" );
612
613
614
615
		rc = approx_candidates( op, wc, f->f_ava, ids, tmp );
		break;

	case LDAP_FILTER_SUBSTRINGS:
616
		Debug( LDAP_DEBUG_FILTER, "\tSUBSTRINGS\n" );
617
618
619
620
621
622
623
624
625
626
627
628
		rc = substring_candidates( op, wc, f->f_sub, ids, tmp );
		break;

	case LDAP_FILTER_GE:
		/* if no GE index, use pres */
		/* TODO: not implement yet */
		rc = presence_candidates( op, wc, f->f_ava->aa_desc, ids );
		break;

    case LDAP_FILTER_LE:
		/* if no LE index, use pres */
		/* TODO: not implement yet */
629
		Debug( LDAP_DEBUG_FILTER, "\tLE\n" );
630
631
632
633
634
		rc = presence_candidates( op, wc, f->f_ava->aa_desc, ids );
		break;

	case LDAP_FILTER_NOT:
		/* no indexing to support NOT filters */
635
		Debug( LDAP_DEBUG_FILTER, "\tNOT\n" );
636
637
638
639
		WT_IDL_ALL( wi, ids );
		break;

	case LDAP_FILTER_AND:
640
		Debug( LDAP_DEBUG_FILTER, "\tAND\n" );
641
642
643
644
645
		rc = list_candidates( op, wc,
							  f->f_and, LDAP_FILTER_AND, ids, tmp, stack );
		break;

	case LDAP_FILTER_OR:
646
		Debug( LDAP_DEBUG_FILTER, "\tOR\n" );
647
648
649
650
651
652
		rc = list_candidates( op, wc,
							  f->f_or, LDAP_FILTER_OR, ids, tmp, stack );
		break;

	case LDAP_FILTER_EXT:
		/* TODO: not implement yet */
653
		Debug( LDAP_DEBUG_FILTER, "\tEXT\n" );
654
655
656
657
658
		rc = presence_candidates( op, wc, f->f_ava->aa_desc, ids );
		break;

	default:
		Debug( LDAP_DEBUG_FILTER, "\tUNKNOWN %lu\n",
659
			   (unsigned long) f->f_choice );
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
		/* Must not return NULL, otherwise extended filters break */
		WT_IDL_ALL( wi, ids );
	}

done:
	Debug( LDAP_DEBUG_FILTER,
		   "<= wt_filter_candidates: id=%ld first=%ld last=%ld\n",
		   (long) ids[0],
		   (long) WT_IDL_FIRST( ids ),
		   (long) WT_IDL_LAST( ids ) );
	return 0;
}

/*
 * Local variables:
 * indent-tabs-mode: t
 * tab-width: 4
 * c-basic-offset: 4
 * End:
 */