aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/com/healthmarketscience/jackcess/impl/IndexData.java
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2023-08-28 21:21:54 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2023-08-28 21:21:54 +0000
commitdfaab620c5d44a7682ff392dbc4cf36b8a50164d (patch)
tree542a350df1313295a17af421d2adfbecee1f71de /src/main/java/com/healthmarketscience/jackcess/impl/IndexData.java
parent000d6ad6cf94bf004c4c6089788ecc48b69addf1 (diff)
downloadjackcess-dfaab620c5d44a7682ff392dbc4cf36b8a50164d.tar.gz
jackcess-dfaab620c5d44a7682ff392dbc4cf36b8a50164d.zip
do not increment unique entry count when replacing an existing entry
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@1400 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src/main/java/com/healthmarketscience/jackcess/impl/IndexData.java')
-rw-r--r--src/main/java/com/healthmarketscience/jackcess/impl/IndexData.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/healthmarketscience/jackcess/impl/IndexData.java b/src/main/java/com/healthmarketscience/jackcess/impl/IndexData.java
index 1c430fc..c08e70b 100644
--- a/src/main/java/com/healthmarketscience/jackcess/impl/IndexData.java
+++ b/src/main/java/com/healthmarketscience/jackcess/impl/IndexData.java
@@ -685,7 +685,9 @@ public class IndexData {
{
if(newEntry != null) {
dataPage.addEntry(idx, newEntry);
- if(!isDupeEntry) {
+ // if we are adding a duplicate entry, or replacing an existing entry,
+ // then the unique entry count doesn't change
+ if(!isDupeEntry && (oldEntry == null)) {
++_uniqueEntryCount;
}
++_modCount;