When connecting to a MySQL server that has reached too many connections, you'll get a ugly BufferUnderflowException:
java.nio.BufferUnderflowException at java.nio.Buffer.nextGetIndex(Buffer.java:498) at java.nio.HeapByteBuffer.getInt(HeapByteBuffer.java:355) at org.drizzle.jdbc.internal.common.packet.buffer.Reader.readInt(Reader.java:80) at org.drizzle.jdbc.internal.mysql.packet.MySQLGreetingReadPacket.<init>(MySQLGreetingReadPacket.java:54) at org.drizzle.jdbc.internal.mysql.MySQLProtocol.<init>(MySQLProtocol.java:155) at org.drizzle.jdbc.DrizzleDriver.connect(DrizzleDriver.java:89)
Looking at the code, greeting packet reading doesn't handle the case where an error packet is sent by the server in place of the greeting packet
When connecting to a MySQL server that has reached too many connections, you'll get a ugly BufferUnderflowException:
java.nio.BufferUnderflowException at java.nio.Buffer.nextGetIndex(Buffer.java:498) at java.nio.HeapByteBuffer.getInt(HeapByteBuffer.java:355) at org.drizzle.jdbc.internal.common.packet.buffer.Reader.readInt(Reader.java:80) at org.drizzle.jdbc.internal.mysql.packet.MySQLGreetingReadPacket.<init>(MySQLGreetingReadPacket.java:54) at org.drizzle.jdbc.internal.mysql.MySQLProtocol.<init>(MySQLProtocol.java:155) at org.drizzle.jdbc.DrizzleDriver.connect(DrizzleDriver.java:89)
Looking at the code, greeting packet reading doesn't handle the case where an error packet is sent by the server in place of the greeting packet