goto done;
        }
 
+       if ( f->f_choice & SLAPD_FILTER_UNDEFINED ) {
+               backsql_strfcat_x( &bsi->bsi_flt_where,
+                       bsi->bsi_op->o_tmpmemctx,
+                       "l",
+                       (ber_len_t)STRLENOF( "1=0" ), "1=0" );
+               done = 1;
+               rc = 1;
+               goto done;
+       }
+
        switch( f->f_choice ) {
        case LDAP_FILTER_OR:
                rc = backsql_process_filter_list( bsi, f->f_or, 
                                &at->bam_join_where );
        }
 
+       if ( f->f_choice & SLAPD_FILTER_UNDEFINED ) {
+               backsql_strfcat_x( &bsi->bsi_flt_where,
+                       bsi->bsi_op->o_tmpmemctx,
+                       "l",
+                       (ber_len_t)STRLENOF( "1=0" ), "1=0" );
+               return 1;
+       }
+
        switch ( f->f_choice ) {
        case LDAP_FILTER_EQUALITY:
                filter_value = &f->f_av_value;