Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-354

Streaming issue when using procedures in PrepareStatement/Statement

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.5.2
    • 1.5.3
    • Other
    • None

    Description

      Statement calling procedures with fetch size (result streaming) will not finished in a stable state, according to fetch size value and procedure resultset size.

      Example :
      /*
      DELIMITER $$
      Create procedure testCallWithFetchSize ()
      BEGIN
      SELECT 1;
      SELECT 2;
      END$$
      DELIMITER;
      */

      try (Statement statement = sharedConnection.createStatement()) {
      	statement.setFetchSize(1);
      	try (ResultSet resultSet = statement.executeQuery("CALL testCallWithFetchSize()")) {
      		int rowCount = 0;
      		while(resultSet.next()) {
      			rowCount++;
      		}
      	}
      }
      //next query will fail.
      

      Procedure result differ from other query, since can have differents results.

      JDBC indicate that procedures are normally called using CallableStatement , but there is not reason to block that for PrepareStatement/statement.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.