Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 8.12.12.6_4
    • Fix Version/s: 11.0, 10.3.2, 8.12.14.6_4
    • Component/s: None
    • Labels:
      None

      Description

      prepared statements, [1] with both criteria as parameters for the prepared statement, the predicates are not evaluated until after batches are pulled. But for [2] if the SEARCH='FALSE' is in the query and not a param, it is pre-evaluated and we only run the one side of the union.

      [1]
      sql = "select * from " +
      "Inventory_Detail" +
      " WHERE SEARCH = and ITEM_ID in OFFSET 0 ROWS FETCH NEXT 500 ROWS ONLY";
      PreparedStatement preparedStatement = conn.prepareStatement(sql);
      preparedStatement.setString(1,"FALSE");
      preparedStatement.setString(2,"1005014161091");
      ResultSet rs = null;

      [2]
      sql = "select * from " +
      "Inventory_Detail" +
      " WHERE SEARCH = 'FALSE' and ITEM_ID in OFFSET 0 ROWS FETCH NEXT 500 ROWS ONLY";
      PreparedStatement preparedStatement = conn.prepareStatement(sql);
      preparedStatement.setString(1,"1005014161091");
      ResultSet rs = null;

        Gliffy Diagrams

          Attachments

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              • Assignee:
                shawkins Steven Hawkins
                Reporter:
                dsteigne Deborah Steigner
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: