Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
When using hibernate with MariaDB Connector/J and retrieving a blob from the database, the entier blob is loaded into memory in MariaDbBlob.class, which is undesirable when streaming the blob to an OutputStream.
blob.getBinaryStream() // entire byte[] is already loaded into memory |
Inserting a large Blob into the database works good with streaming using hibernate session, without loading the entier file into memory:
blob = session.getLobHelper().createBlob(multipart.getInputStream(), multipartFile.getSize());
|
PostgreSQL for example does not have this property and it is possible to retrieve a "blob-stream" without having to load the entier byte array into memory. I really like MariaDB and it would be great if it is possible to implement a driver that can deliver a more memory optimized handling of blobs when streaming data.
Versions used: MariaDB 10.6 and MariaDB Connector/J 3.2
Attachments
Issue Links
- relates to
-
CONJ-651 org.mariadb.jdbc.internal.com.read.resultset.getCharacterStream() loads everything into RAM before returns stream and as result - OutOfMemoryError
- Open