
|
If you were logged in you would be able to see more operations.
|
|
|
|
Issue Links:
|
Relate
|
|
This issue relate to:
|
|
CORE-3341
Events might not be posted inside the autonomous transaction
|
|
|
|
|
|
This issue is related to:
|
|
|
|
|
|
|
|
| Planning Status: |
Unspecified
|
|
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:
ID
============
1
2
1
COUNT
============
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)
|
|
Description
|
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:
ID
============
1
2
1
COUNT
============
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)
|
Show » |
| Repository |
Revision |
Date |
User |
Message |
| Firebird |
#52322 |
Wed Feb 09 10:47:42 GMT+00:00 2011 |
dimitr |
Simplified fix for CORE-3340 (Error in autonomous transaction with empty exception handler: can insert duplicate values into PK/UK column) and its cousin CORE-3341 (Events might not be posted inside the autonomous transaction). It's actually the same bug with different visible effects.
|
| Files Changed |
MODIFY
/firebird/branches/B2_5_Release/src/jrd/exe.cpp
|
|