[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [Akonadi] 36e1563: Include only payload parts in partSizes calculatio
From: Tobias Koenig <tokoe () kde ! org>
Date: 2010-12-21 10:20:46
Message-ID: 20101221102046.18BD7A608F () git ! kde ! org
[Download RAW message or body]
commit 36e15632fa7ee1c26a7b1fcd777fb341d49fabd9
branch master
Author: Tobias Koenig <tokoe@kde.org>
Date: Tue Dec 21 11:22:49 2010 +0100
Include only payload parts in partSizes calculation
This will fix the bug that item size is changed
if an ItemModifyJob is executed with setIgnorePayload( true )
and an attribute to change.
BUG: 260791
diff --git a/server/src/handler/store.cpp b/server/src/handler/store.cpp
index 7b10a0b..2021850 100644
--- a/server/src/handler/store.cpp
+++ b/server/src/handler/store.cpp
@@ -265,7 +265,8 @@ bool Store::parseStream()
QByteArray value;
if ( m_streamParser->hasLiteral() ) {
const qint64 dataSize = m_streamParser->remainingLiteralSize();
- partSizes += dataSize;
+ if ( partName.startsWith( "PLD:" ) )
+ partSizes += dataSize;
const bool storeInFile = ( \
DbConfig::configuredDatabase()->useExternalPayloadFile() && dataSize > \
DbConfig::configuredDatabase()->sizeThreshold() );
//actual case when streaming storage is used: external payload is enabled, \
data is big enough in a literal if ( storeInFile ) {
@@ -310,7 +311,8 @@ bool Store::parseStream()
}
} else { //not a literal
value = m_streamParser->readString();
- partSizes += value.size();
+ if ( partName.startsWith( "PLD:" ) )
+ partSizes += value.size();
}
// only relevant for non-literals or non-external literals
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic