[MDEV-32102] Permit to have intermediate EOF in resultset Created: 2023-09-05  Updated: 2024-01-15

Status: Open
Project: MariaDB Server
Component/s: Binary Protocol
Fix Version/s: None

Type: Task Priority: Major
Reporter: Diego Dupin Assignee: Diego Dupin
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-31560 INSERT ... RETURNING missing lastInse... Confirmed
PartOf
includes CONC-665 Permit to have intermediate EOF in re... Open
Problem/Incident
is caused by MDEV-8931 (server part of) session state tracking Closed
Relates
relates to CONC-461 Can mariadb send CLIENT_DEPRECATE_EOF... Closed

 Description   

Since MySQL 5.7 and MDEV-8931 for MariaDB, capability CLIENT_DEPRECATE_EOF is present on server, but design has some flows: connectors don't have intermediate EOF anymore on resultset.
This intermediate did have some interesting pieces of information in status_flags like SERVER_MORE_RESULTS_EXIST, SERVER_PS_OUT_PARAMS.

When using binary protocol, calling a stored procedure, output parameters are sent as a resultset. This resultset was identified with intermediate EOF. This piece of information is now present on ending ok_packet only, AFTER having read the rows.

CLIENT_DEPRECATE_EOF capability cannot be set by connector without creating lots of issues.

This task is to add a new specific capability that will indicate to always have the intermediate EOF packet, even with CLIENT_DEPRECATE_EOF activated.



 Comments   
Comment by Diego Dupin [ 2023-09-05 ]

server PR addition : https://github.com/MariaDB/server/pull/2747

Comment by Georg Richter [ 2023-09-28 ]

Proposal:

If both server and client have extended capability flag MARIADB_CLIENT_EOF_AND_OK set, an OK packet will be sent after last EOF. This will allow session tracking also for select statements (e.g. redirect_url) but also retrieving mandatory information for INSERT .. RETURNING (MDEV-31560).

TBD: if MARIADB_CLIENT_EOF_AND_OK is set the server will not send parameter metadata (binary protocol) to the client, since this information is useless.

Comment by Sergei Golubchik [ 2023-12-07 ]

PR uses MARIADB_CLIENT_SEND_INTERMEDIATE_EOF

Generated at Thu Feb 08 10:28:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.