Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Not a Bug
-
1.3.7, 1.4.6, 1.5.2
-
None
-
Client: OS X 10.11.6 with Oracle Java 1.8.0_102
Server: Oracle Linux 6.8 (x64) running MariaDB 10.1.16
Description
Observed behavior:
The attached UnexpectedEndOfStreamError class fails with following:
Exception in thread "main" java.sql.SQLNonTransientConnectionException: Could not read resultset: unexpected end of stream, read 0 bytes from 4
Query is: SELECT a.AID FROM A a WHERE EXISTS (SELECT 1 FROM V v WHERE a.AID = v.AID)
at org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:123)
at org.mariadb.jdbc.internal.util.ExceptionMapper.throwException(ExceptionMapper.java:69)
at org.mariadb.jdbc.MariaDbStatement.executeQueryEpilog(MariaDbStatement.java:226)
at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeInternal(MariaDbServerPreparedStatement.java:376)
at org.mariadb.jdbc.MariaDbServerPreparedStatement.execute(MariaDbServerPreparedStatement.java:323)
at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeQuery(MariaDbServerPreparedStatement.java:304)
at UnexpectedEndOfStreamError.executeTestQuery(UnexpectedEndOfStreamError.java:56)
at UnexpectedEndOfStreamError.runTest(UnexpectedEndOfStreamError.java:49)
at UnexpectedEndOfStreamError.main(UnexpectedEndOfStreamError.java:28)
Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: Could not read resultset: unexpected end of stream, read 0 bytes from 4
Query is: SELECT a.AID FROM A a WHERE EXISTS (SELECT 1 FROM V v WHERE a.AID = v.AID)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1054)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.prepareAndExecute(AbstractQueryProtocol.java:544)
at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeInternal(MariaDbServerPreparedStatement.java:365)
... 5 more
Caused by: java.io.EOFException: unexpected end of stream, read 0 bytes from 4
at org.mariadb.jdbc.internal.packet.read.ReadPacketFetcher.getReusableBuffer(ReadPacketFetcher.java:164)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1045)
... 7 more
The code runs without issues when using MySQL Connector/J 5.1.39 and MariaDB Connector/J version 1.2.3 and 1.1.9.
Attachments
Issue Links
- is blocked by
-
MDEV-11935 Queries in stored procedures with and EXISTS(SELECT * FROM VIEW) crashes and closes hte conneciton.
- Closed
- is caused by
-
MDEV-7691 Assertion `outer_context || !*from_field || *from_field == not_found_field' failed on 2nd execution of PS with nested subqueries
- Closed