1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-07 03:22:57 +03:00

Forgot another small thing. I'm a dummy.

This commit is contained in:
Patrick LeBlanc
2019-01-22 10:17:18 -06:00
parent 259060fb29
commit 2e5d6db0c7
2 changed files with 14 additions and 2 deletions

View File

@@ -381,6 +381,11 @@ public:
*/ */
inline void rewind(); inline void rewind();
/**
* Get the allocated size of the buffer.
*/
inline uint32_t getBufferSize() const;
/** /**
* Serializeable interface * Serializeable interface
*/ */
@@ -529,6 +534,11 @@ inline ByteStream& ByteStream::operator=(const SBS& rhs)
return *this; return *this;
} }
inline uint32_t ByteStream::getBufferSize() const
{
return fMaxLen;
}
/** /**
* stream a ByteStream out to any ostream * stream a ByteStream out to any ostream
*/ */

View File

@@ -73,9 +73,11 @@ void ByteStreamPool::returnByteStream(ByteStream *bs)
boost::mutex::scoped_lock s(mutex); boost::mutex::scoped_lock s(mutex);
if (freeByteStream.size() > maxFreeBuffers) if (freeByteStream.size() > maxFreeBuffers)
delete bs; delete bs;
else else {
bs->restart();
freeByteStreams.push_back(bs); freeByteStreams.push_back(bs);
} }
} }
}
} }