# title: AV in engine when StatementTimeout is active for user statement and some internal DSQL statement was executed as part of overall execution process
# decription:
# Confirmed crash on 4.0.0.2387.
# Checked on 4.0.0.2394 SS/CS - works OK.
#
# tracker_id: CORE-6526
# min_versions: ['4.0']
# versions: 4.0
# qmid:
importpytest
fromfirebird.qaimportdb_factory,isql_act,Action
# version: 4.0
# resources: None
substitutions_1=[]
init_script_1=""""""
db_1=db_factory(sql_dialect=3,init=init_script_1)
test_script_1="""
setbailon;
setheadingoff;
setterm^;
executeblockasbegin
inautonomoustransactiondo
executestatement'set statistics index rdb$index_0';
end
^
setstatementtimeout60
^
executeblockasbegin
inautonomoustransactiondo
executestatement'set statistics index rdb$index_0';