Skip to content

SQLLine 1.12.0: !tables no longer works due to JDBCThinResultSet#isClosed() reporting metadata ResultSet as closed #13549

Description

@khrysto

After the upgrade to SQLLine 1.12.0 introduced by commit 25ab915 @zstan , SQLLine commands that rely on JDBC metadata result sets, such as !tables, no longer work correctly with the Ignite thin JDBC driver.

Root Cause

Starting with SQLLine 1.12.0, SQLLine performs an explicit ResultSet.isClosed() check before reading from the result set.
For metadata queries, Ignite creates a JdbcThinResultSet with a null statement reference (stmt == null).
However, JdbcThinResultSet.isClosed() currently returns:

@Override public boolean isClosed() throws SQLException {
    return closed || stmt == null || stmt.connection().isClosed();
}

As a result, any metadata ResultSet created without an associated statement is immediately reported as closed, even though it is perfectly usable.

Consequently, SQLLine 1.12.0 refuses to process the metadata result set and commands such as: !tables returns empty result

and this is the change in sqlline that introduced the check on the ResultSet isClosed
julianhyde/sqlline@e0f9e9a

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions