ITS#10168 back-mdb: cleanup index setup

Nop index setup when index config resulted in no configured indices
This commit is contained in:
Howard Chu 2025-04-01 16:54:10 +01:00 committed by Quanah Gibson-Mount
parent 10456f5850
commit 015f2937ba
2 changed files with 6 additions and 0 deletions

View file

@ -98,6 +98,9 @@ mdb_attr_dbs_open(
int i, flags;
int rc;
if ( !mdb->mi_nattrs )
return 0;
txn = tx0;
if ( txn == NULL ) {
rc = mdb_txn_begin( mdb->mi_dbenv, NULL, 0, &txn );

View file

@ -390,6 +390,9 @@ mdb_setup_indexer( struct mdb_info *mdb )
int i, rc, changed = 0;
unsigned short s;
if ( !mdb->mi_nattrs )
return 0;
rc = mdb_txn_begin( mdb->mi_dbenv, NULL, 0, &txn );
if ( rc )
return rc;