Tony Whyman wrote 26.11.2021 15:28:
3. Prior to calling IStatement.Execute, the statement type is checked. The current (IBX) code raises an exception if the sql statement type is isc_info_sql_stmt_select in order to stop the wrong IStatement method being called.

So it is actually the test suite that makes (now wrong) assumption that UPDATE...RETURNING has to be described as isc_info_sql_stmt_exec_procedure is wrong.

3. IBX tries to be general purpose and so prepares a statement, then checks the statement type, and then calls the appropriate IStatement method. Changing the statement type semantics broke the logic used to determine which method to call.

That's why the change. IBX should check the statement type (which now is isc_info_sql_stmt_select) and call appropriate method i.e. openCursor(). What's wrong?

4. With reference to item 1 above, if "Update..Returning" returns a statement type of isc_info_sql_stmt_select then you _do_ have to also parse the statement in IBX so that you know its an UPDATE and IStatement.execute has to be called instead of IStatement.openCursor.

  No, openCursor() must be called here, not execute().

--
  WBR, SD.


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to