Don't memoize collection_name and database_name.

[ fix #2893 ]
[ fix #2857 ]