[db stress] Don't drop column families if there's only 1

main
Igor Canadi 11 years ago
parent ee6b35e55a
commit 591c2a3b4b
  1. 2
      tools/db_stress.cc

@ -1202,7 +1202,7 @@ class StressTest {
} }
if (!FLAGS_test_batches_snapshots && if (!FLAGS_test_batches_snapshots &&
FLAGS_clear_column_family_one_in != 0) { FLAGS_clear_column_family_one_in != 0 && FLAGS_column_families > 1) {
if (thread->rand.OneIn(FLAGS_clear_column_family_one_in)) { if (thread->rand.OneIn(FLAGS_clear_column_family_one_in)) {
// drop column family and then create it again (can't drop default) // drop column family and then create it again (can't drop default)
int cf = thread->rand.Next() % (FLAGS_column_families - 1) + 1; int cf = thread->rand.Next() % (FLAGS_column_families - 1) + 1;

Loading…
Cancel
Save