[MDEV-11761] CLIENT_DEPRECATE_EOF : Client must identify a "stored procedure output resultset" Created: 2017-01-10  Updated: 2017-03-29  Resolved: 2017-03-15

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 10.2.3, 10.2.4
Fix Version/s: 10.2.5

Type: Bug Priority: Major
Reporter: Diego Dupin Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
Labels: 10.2-ga

Attachments: Text File MDEV_8931.patch    
Issue Links:
Blocks
blocks CONJ-319 handle Server session state flag in O... Closed
Problem/Incident
is caused by MDEV-8931 (server part of) session state tracking Closed
Sprint: 10.2.4-1, 10.2.4-2, 10.2.6-1

 Description   

MDEV-8931 implement a new capacity CLIENT_DEPRECATE_EOF that deprecate EOF packet.

Store procedure output parameter identification
When calling a store procedure with output parameters - using prepare statement - server send output parameter in a resultset if client has CLIENT_PS_MULTI_RESULTS capacity. Client must identify this resultset as an "output parameter resultset". This was actually done by a flag on the deleted EOF packet.

Example :

DELIMITER //
create procedure prepareStmtWithOutParameter (x int, INOUT y int) 
BEGIN
SELECT 1; 
end;
//
DELIMITER ;
 
prepare test from "call prepareStmtWithOutParameter(?,?)";
set @param1=1;
set @param2=2;
execute test using @param1, @param2;

For this example, if client has CLIENT_PS_MULTI_RESULTS capacity, server will send 2 differents resultset :

  • first one corresponding to "SELECT 1; "
  • second result-set contain the INOUT integer parameter "y"

Before CLIENT_DEPRECATE_EOF capability, client can identify that resultset is an "output parameter resulset" with the EOF packet server status value.
Flag SERVER_PS_OUT_PARAM indicate that resultset is an "output param" resultset.

A resultset has 2 EOF packet. SERVER_PS_OUT_PARAM flag is set only on first EOF.
If CLIENT_DEPRECATE_EOF is set, first EOF is deleted, second has to have the SERVER_PS_OUT_PARAM flag.



 Comments   
Comment by Diego Dupin [ 2017-01-10 ]

Patch is attached (tested with the java connector).

Generated at Thu Feb 08 07:52:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.