New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in autonomous transaction with empty exception handler: can insert duplicate values into PK/UK column (leads to unrestorable backup) [CORE3340] #3706
Comments
Modified by: @dyemanovsummary: Error in autonom. transaction WITHOUT exception handling: can insert duplicate values in table with PK (UK) ==> unrecoverable backup. => Error in autonomous transaction with empty exception handler: can insert duplicate values into PK/UK column (leads to unrestorable backup) |
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Modified by: @dyemanovstatus: Open [ 1 ] => In Progress [ 3 ] |
Modified by: @dyemanovstatus: In Progress [ 3 ] => Open [ 1 ] |
Modified by: @dyemanovstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5.1 [ 10333 ] Fix Version: 3.0 Alpha 1 [ 10331 ] |
Modified by: @pmakowskistatus: Resolved [ 5 ] => Closed [ 6 ] Fix Version: 3.0 Alpha 1 [ 10331 ] => |
Submitted by: @pavel-zotov
Relate to CORE3341
Is related to QA455
Let the file 'AAA' contains the following script:
recreate table tmp(id int not null primary key using index tmp_id_pk);
commit;
set transaction no wait isolation level read committed;
set term ^;
execute block as
begin
insert into tmp values(1);
insert into tmp values(2);
in autonomous transaction do begin
insert into tmp values(1);
when any do begin
--exception; -- <<<<<<<<<<<<<< ATTENTION: **NO** handle exception here
end
end
end^
set term ;^
commit;
select id from tmp;
select count(*) from tmp;
commit;
Create NEW EMPTY database, connect to it via ISQL -n and then:
SQL> IN AAA;
Result:
============
1
2
1
============
3
So, we have duplicate in PK. The same result will be if PK replaced by UK.
--------------------------------------
Moreover,
1) GFIX -V -FULL will *NOT* alert that table TMP has some problem in it's PK;
2) gbak -b will create UNRECOERABLE .fbk.
If then we'll try gbak -c test.fbk test_new.fdb then following messages will fills the screen:
...
...
gbak: The unique index has duplicate values or NULLs.
gbak: Delete or Update duplicate values or NULLs, and activate index with
gbak: ALTER INDEX "TMP_ID_PK" ACTIVE;
gbak:Index "TMP_ID_PK" failed to activate because:
gbak: The unique index has duplicate values or NULLs.
gbak: Delete or Update duplicate values or NULLs, and activate index with
gbak: ALTER INDEX "TMP_ID_PK" ACTIVE;
gbak:Index "TMP_ID_PK" failed to activate because:
gbak: The unique index has duplicate values or NULLs.
gbak: Delete or Update duplicate values or NULLs, and activate index with
gbak: ALTER INDEX "TMP_ID_PK" ACTIVE;
... etc ... (these messages repeats infinitely)
Commits: 8f517dc 0017fbc 305b989 5eec5f5 1933d37 FirebirdSQL/fbt-repository@b26094e
The text was updated successfully, but these errors were encountered: