FB 3.0 craches when 1) TRACE is launched *and* 2) run EB with "select ... from
T where <C> for update with lock", and it's <C> containing RDB$DBKEY as search
criteria
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: CORE-4498
URL: http://tracker.firebirdsql.org/browse/CORE-4498
Project: Firebird Core
Issue Type: Bug
Affects Versions: 3.0 Alpha 2
Reporter: Pavel Zotov
Attachments: gdb-firebird.140724_145654.2.zip
On empty database:
1) launch TRACE (this is mandatory) via tbtracemgr, with config like this:
---
enabled = true
time_threshold = 0
log_statement_finish = true
print_plan = true
explain_plan = true
print_perf = true
max_sql_length = 16384
max_log_size = 9999999999
---
2) run the following script:
recreate table t (id bigint not null);
commit;
----------------------------------------------------------
set term ^;
execute block returns( locked_rows int ) as
declare v_qdbkey char(8) character set octets collate octets;
declare v_id bigint;
declare v_stt varchar(30);
begin
locked_rows = 0;
v_stt = 'select rdb$db_key,id from t';
for
execute statement(v_stt)
into v_qdbkey, v_id
do begin
select id from t where rdb$db_key = :v_qdbkey for update with lock into
v_id; -- leads to crach
-- ok, no crash: select id from t where id = :v_id for update with lock
into v_id;
locked_rows = locked_rows + 1;
end
suspend;
end
^ set term ;^
commit;
If this script will be run on LI-T3.0.0.31228, FB will crashes. Stack trace see
in attach.
PS. Note:
1) no crash if we replace
select id from t where rdb$db_key = :v_qdbkey for update with lock into
v_id;
with:
select id from t where id = :v_id for update with lock into v_id;
2) no crash in FB 2.5 for any case;
3) loop of implicit for-cursor should *NOT* iterate even once since tab;e `t`
is EMPTY. Result of script always must be 0, so I can`t understand why any
statement inside for-loop can lead to different behaviour (and *only* when
trace is ON)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel