report from github (https://github.com/MariaDB/mariadb-connector-j/issues/37) created by bbundy
Should this actually be spelled 'getSQLState'? It is causing ruby Sequel to fail here:
If I issue a long-running query via Sequel and set a breakpoint on the line:
super || (cause.respond_to?(:getSQLState) && cause.getSQLState =~ /^08/)
and manually kill the query, I get
Java::OrgMariadbJdbcInternalCommon::QueryException Could not read resultset: unexpected end of stream, read 0bytes from 4
but cause.respond_to?(:getSQLState) is false!
(if I monkeypatch this in Sequel to 'cause.respond_to?(:getSqlState)' in the Sequel source, it all works fine)
this appears to be due to the spelling in
(which is 'getSqlState')
which is correct? I would think for consistency with
it should be 'getSQLState'.
The failure of Sequel to properly identify disconnect errors can cause problems with its threaded connection pool: if the closed connection is mistakenly returned to the pool, the next request that uses it fails unexpectedly.
Thanks for looking into this!