27.08.2018 20:10, Adriano dos Santos Fernandes wrote:
All,
Please. If nobody else sees the magnitude of this problem, I'll shut up.
What we talk here is something that is being said to fix read committed,
but completely destroys it.
Wrong statement which mixed *read consistency* and *side effects*
Vlad want to make that code:
create procedure proc2
as
declare file_handle integer;
begin
file_handle = some_udf_open_file('x');
some_udf_write_file(file_handle, '...');
some_udf_close_file(file_handle);
execute procedure proc2;
Really ? Recursion ? ;)
end!
create procedure proc1
as
begin
execute procedure proc2;
end!
execute block
as
begin
execute procedure proc1;
select something from something ...;
end!
And when the user executes that EXECUTE BLOCK, all the whole thing may
execute repeated times.
Nope. There is no statement in your sample which could raise
isc_update_conflict.
So we cannot use any external routines with side effects anymore in
Firebird. Not even internal functions with side effects.
Not true. You may:
a) not use read-committed
b) not use read-committed read consistency (it is still possible)
c) add exception handler into execute block and catch isc_update_conflict
Please, take a break and think again...
Regards,
Vlad
PS how ORACLE handle case when function with side-effect called by
ON UPDATE trigger and UPDATE statement conflicts with another one ?
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel