rzo1 opened a new pull request, #262: URL: https://github.com/apache/openjpa/pull/262
https://issues.apache.org/jira/browse/OPENJPA-3061 Writing a `Reader` into a CLOB field failed on MariaDB with `ArrayIndexOutOfBoundsException: arraycopy: last destination index 8193 out of bounds for byte[8192]` in `MariaDbBlob$BlobOutputStream.write`, called from `DBDictionary.updateClob`. This is a bug in MariaDB Connector/J: `MariaDbClob.setCharacterStream` adds the Clob's internal offset twice, so for a Clob read from a result set the writer starts past the end of its buffer. 3.5.11 is the latest release and master still has the same code. - `MariaDBDictionary` overrides `updateClob` and writes the reader with `ResultSet.updateCharacterStream` instead of `Clob.setCharacterStream`. The reader is still streamed. Other dictionaries are unchanged. - `AbstractLobTest` now runs on MariaDB too, so the LOB tests run in the MariaDB CI jobs. - New tests in `TestReaderLob`: multi-byte content over 8 KB then updated, and an empty reader. Without the fix `TestReaderLob` has 13 errors out of 15 on MariaDB; with it all LOB tests pass on MariaDB 10.11 and 12.3. Full suites pass on Derby and H2. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
