fix test_db_optimize