r19423: merge some tdb changes from SAMBA_3_0 to SAMBA_4_0