Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-3389

metadata result set throws NPE when closed

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6, 1.7
    • Fix Version/s: 1.7
    • Component/s: clients, jdbc, odbc, sql
    • Labels:

      Description

      Need to handle when ResultSet has no cursor. It happened only with client JDBC. This code throws NPE:

          public void testMetadataResultSetClose() throws Exception {
              try (Connection conn = DriverManager.getConnection(BASE_URL)) {
                  try (ResultSet tables = conn.getMetaData().getTables(null, null, "%", null)) {
                      int columnCount = tables.getMetaData().getColumnCount();
                      while (tables.next())
                          for (int i = 0; i < columnCount; i++)
                              tables.getObject(i + 1);
                  }
              }
          }
      

        Attachments

          Activity

            People

            • Assignee:
              agura Andrey N. Gura
              Reporter:
              aboudnik Alexandre Boudnik
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Time Spent - 20m Remaining Estimate - 1h 40m
                1h 40m
                Logged:
                Time Spent - 20m Remaining Estimate - 1h 40m
                20m