index 4d800f8a007980dbac1d221d48f0fa8b0e30db66..fa8cecafcbe5b4bef44d12549a35f7e27c838c3c 100644 (file)
numDataPages = Min(numDataPages, numPages - numEntryPages);
}
+ /* In an empty index, numEntries could be zero. Avoid divide-by-zero */
+ if (numEntries < 1)
+ numEntries = 1;
+
/*
* Include predicate in selectivityQuals (should match
* genericcostestimate)