Skip to content

Driver badly react to "too many connections" error #44

Description

@gilius38

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions