Fix slow upgrade for DB v19.
Merge pull request #384 from LipuFei/db-upgrade-fix

Fix slow upgrade for DB v19.