FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.19k stars 205 forks source link

AV when both function and dependent table are dropped in the same transaction #8020

Closed hvlad closed 3 months ago

hvlad commented 3 months ago
  1. create metadata and disconnect
    
    set autoddl off;
    set term ^;

create function f(x int) returns int as begin return x; end ^ create table t_fn (x int, fx computed by (f(x))) ^ commit ^ set term ;^ exit;


2. connect and drop objects

set autoddl off; drop function f; drop table t_fn; commit;

pavel-zotov commented 3 months ago

Script shows on 6.0.0.269:

SQLSTATE = 39000 / unsuccessful metadata update / -DROP TABLE T_FN failed / -invalid request BLR at offset 1 / -function F is not defined

Is it expected ?

hvlad commented 3 months ago

Script shows on 6.0.0.269:

SQLSTATE = 39000 / unsuccessful metadata update / -DROP TABLE T_FN failed / -invalid request BLR at offset 1 / -function F is not defined

Is it expected ?

See #8021. This (#8020) issue was about AV.

pavel-zotov commented 2 months ago

QA issue: test need to be adjusted after #8021 will be fixed (DROP statements must be in DSQL form rather than be 'enclosed' in EB and begin/end with suppressing exceptions). See notes.