Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
1.5.3
-
None
-
CentOS Linux release 7.2.1511 (Core)
infobright-iee_mysql-4.8.3p1
Description
Running four queries in parallel fetching one row from each query at the time the jdbc driver will throw an exception:
java.sql.SQLException: java.io.EOFException: unexpected end of stream, read 0 bytes from 6
at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.next(MariaSelectResultSet.java:547)
at fetch.fetchRow(fetch.java:90)
at fetch.main(fetch.java:77)
Caused by: java.io.EOFException: unexpected end of stream, read 0 bytes from 6
at org.mariadb.jdbc.internal.packet.read.ReadPacketFetcher.getReusableBuffer(ReadPacketFetcher.java:155)
at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.readNextValue(MariaSelectResultSet.java:407)
at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.nextStreamingValue(MariaSelectResultSet.java:378)
at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.next(MariaSelectResultSet.java:545)
... 2 more
The code works fine with mysql jdbc mysql-connector-java-5.1.20.jar.
How to reproduce:
You need a lot of data to reproduce this problem, ~50Gb.
1) Create 2 databases EOF_MYISAM_1 and EOF_MYISAM_2
2) Run the tab_cre.sql script in both db to create tables.
3) Run the java pgm GenData to produce table data:
java GenData 10000000 > data.txt
The 10000000 is number of rows, might need adjustment due to machine speed
If you are low on disk you can redirect to a named pipe and do the load data infile
from that to avoid needing space for the data.txt file.
4) Do:
LOAD DATA INFILE 'data.txt' INTO TABLE EOF_big_t1
FIELDS TERMINATED BY ',';
in both databases for both EOF_big_t1 and EOF_big_t2.
5) Run:
java -cp <classpath> fetch
The exception is thrown with mariadb jdbc, but not if you run same thing with mysql. To use mysql you need to change driver string at the start of the fetch class body.