add exactly maxRecords to db

Change-Id: If20a18c55c7ad0c5404aa1d18aad8c354089f951