diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2023-08-28 21:21:54 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2023-08-28 21:21:54 +0000 |
commit | dfaab620c5d44a7682ff392dbc4cf36b8a50164d (patch) | |
tree | 542a350df1313295a17af421d2adfbecee1f71de | |
parent | 000d6ad6cf94bf004c4c6089788ecc48b69addf1 (diff) | |
download | jackcess-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
-rw-r--r-- | src/main/java/com/healthmarketscience/jackcess/impl/IndexData.java | 4 |
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; |