[MDEV-4604] Wrong server status when sending out parameters Created: 2013-05-31  Updated: 2016-04-06  Resolved: 2013-06-13

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.2, 5.5.31
Fix Version/s: 10.0.4, 5.5.32

Type: Bug Priority: Major
Reporter: Georg Richter Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

all platforms


Attachments: File fix_sp_out_params.diff    

 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



 Comments   
Comment by Georg Richter [ 2013-06-01 ]

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))); 
}

Generated at Thu Feb 08 06:57:41 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.