Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4604

Wrong server status when sending out parameters

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.0.2, 5.5.31
    • Fix Version/s: 10.0.4, 5.5.32
    • Component/s: None
    • Labels:
      None
    • Environment:
      all platforms

      Description

      When retrieving a result set from a stored procedure which returns out parameters the eof packet of the result set doesn't contain the SERVER_MORE_RESULTS_EXISTS server_status flag for the following status packet.

      How to fix: see attachment

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            georg Georg Richter added a comment -

            It would be useful to have an additional api function mysql_stmt_more_results, so we would be able to have a workaround on client side:

            my_bool STDCALL mysql_stmt_more_results(MYSQL_STMT *stmt)
            {
            /* MDEV 4604: Server doesn't set MORE_RESULT flag for
            OutParam result set, so we need to check
            for SERVER_MORE_RESULTS_EXIST and for
            SERVER_PS_OUT_PARAMS)
            */
            return (stmt &&
            stmt->mysql &&
            ((stmt->mysql->server_status & SERVER_MORE_RESULTS_EXIST) ||
            (stmt->mysql->server_status & SERVER_PS_OUT_PARAMS)));
            }

            Show
            georg Georg Richter added a comment - It would be useful to have an additional api function mysql_stmt_more_results, so we would be able to have a workaround on client side: my_bool STDCALL mysql_stmt_more_results(MYSQL_STMT *stmt) { /* MDEV 4604: Server doesn't set MORE_RESULT flag for OutParam result set, so we need to check for SERVER_MORE_RESULTS_EXIST and for SERVER_PS_OUT_PARAMS) */ return (stmt && stmt->mysql && ((stmt->mysql->server_status & SERVER_MORE_RESULTS_EXIST) || (stmt->mysql->server_status & SERVER_PS_OUT_PARAMS))); }

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                georg Georg Richter
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m