View Issue Details

IDProjectCategoryView StatusLast Update
0001149Database Workbench v5InterBase Modulepublic2015-01-22 13:24
ReporterMartijn Tonies Assigned ToMartijn Tonies  
PriorityhighSeverityblockReproducibilityalways
Status closedResolutionfixed 
PlatformI86 32, VirtualboxOSWindowsOS VersionWindows 7 Pro
Product Version5.0.6 
Fixed in Version5.0.8 
Summary0001149: table editor: Changing computation of a computed field is not correctly completed
DescriptionTake the script below, create that table.
In the table editor, change (id+1) to (id+2)
Save the changes.

This has two unwanted effects:

1. the error message "Can't perform operation on inactive transaction"
2. The field DBW$$TEMP remains.

But because refreshing table list / column list does not work either, I have to disconnect and reconnect the database to see that DBW$$TEMP.

So I must
1. save the change
2. disconnect&reconnect
3. remove DBW$$TEMP
4. save the change
5. hope that everything else is OK which I can actually doubt because:

I wonder if this has to do with that COMMIT in the middle of the DDL modification script, see below. So the dependencies would not be updated either, I did not check that yet.
Steps To ReproduceCREATE TABLE T1
(
  ID BIGINT,
  COMPFIELD COMPUTED BY ( id+1 )
);
Additional Informationdelete from rdb$dependencies
where rdb$dependent_name = (select f.rdb$field_name
from rdb$fields f
join rdb$relation_fields rf on rf.rdb$field_source = f.rdb$field_name
where rf.rdb$relation_name = 'T1' and rf.rdb$field_name = 'COMPFIELD');
ALTER TABLE T1 ADD DBW$$TEMP COMPUTED BY ( id+2 );
UPDATE rdb$fields SET RDB$COMPUTED_BLR = (select RDB$COMPUTED_BLR from rdb$fields where rdb$field_name = (select rdb$field_source from rdb$relation_fields where rdb$field_name = 'DBW$$TEMP' and rdb$relation_name = 'T1')),
    RDB$COMPUTED_SOURCE = (select RDB$COMPUTED_SOURCE from rdb$fields where rdb$field_name = (select rdb$field_source from rdb$relation_fields where rdb$field_name = 'DBW$$TEMP' and rdb$relation_name = 'T1'))
WHERE rdb$field_name = (select rdb$field_source from rdb$relation_fields where rdb$relation_name = 'T1' and rdb$field_name = 'COMPFIELD');
COMMIT;
insert into rdb$dependencies
select * from rdb$dependencies
where rdb$dependent_name = (select f.rdb$field_name
from rdb$fields f
join rdb$relation_fields rf on rf.rdb$field_source = f.rdb$field_name
where rf.rdb$relation_name = 'T1' and rf.rdb$field_name = 'DBW$$TEMP');
ALTER TABLE T1 DROP DBW$$TEMP;
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2015-01-19 17:26 Martijn Tonies New Issue
2015-01-19 17:26 Martijn Tonies Status new => assigned
2015-01-19 17:26 Martijn Tonies Assigned To => Martijn Tonies
2015-01-19 17:26 Martijn Tonies Issue generated from: 0001147
2015-01-19 17:26 Martijn Tonies Status assigned => resolved
2015-01-19 17:26 Martijn Tonies Fixed in Version => 5.0.8
2015-01-19 17:26 Martijn Tonies Resolution open => fixed
2015-01-22 13:24 Martijn Tonies Status resolved => closed