thswlsqls opened a new issue, #40066:
URL: https://github.com/apache/shardingsphere/issues/40066

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   master @ 7712a28fffe
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy (Firebird)
   
   ### Expected behavior
   The bound `UpdateStatement` and `DeleteStatement` keep the 
`ReturningSegment` produced by the parser, as `InsertStatementBinder` already 
does for INSERT.
   
   ### Actual behavior
   `UpdateStatementBinder.copy()` and `DeleteStatementBinder.copy()` do not 
pass `returning` to the builder, so `getReturning()` on the bound statement is 
always empty.
   
   ### Reason analyze (If you can)
   `FirebirdPrepareStatementCommandExecutor` reads `getReturning()` from the 
bound statement to classify the statement. Because the segment is lost, 
`UPDATE/DELETE ... RETURNING` is reported as a plain UPDATE/DELETE instead of 
`EXEC_PROCEDURE`, and the RETURNING columns are not described to the client.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   Through Firebird Proxy, prepare `UPDATE t SET c = 1 WHERE id = 1 RETURNING 
id`. The prepare response reports a plain UPDATE and no output columns. The 
same applies to `DELETE FROM t WHERE id = 1 RETURNING id`.
   
   ### Example codes for reproduce this issue (such as a github link).
   N/A
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to