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
Wrong transaction can be passed to external engine [CORE5645] #5911
Comments
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: @asfernandes Would you please review/test the fixed code in master? |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 4.0 Beta 1 [ 10750 ] |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Deferred Test Details: No idea how it can eb implemented uising fbtest. Any suggestions will be appreciated. |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] Test Details: No idea how it can eb implemented uising fbtest. Any suggestions will be appreciated. => No idea how it can be implemented using fbtest. Any suggestions will be appreciated. |
Commented by: @artyom-smirnov In some cases I've got NULL in newTransaction, shouldn't getInterface called with 'true'? |
Commented by: @asfernandes Pavel, a way to test external engine code: ------------- create database '/tmp/master.fdb'; create table replicate_config ( insert into replicate_config (name, data_source) create trigger persons_replicate create trigger persons_replicate2 insert into persons values (1, 'One', 'X', 'Y'); connect '/tmp/slave.fdb'; -- There must exist a identical record to the one inserted in master and another one identical except that ADDRESS has NULL. |
Modified by: @asfernandesFix Version: 3.0.3 [ 10810 ] |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: Deferred => Done successfully Test Details: No idea how it can be implemented using fbtest. Any suggestions will be appreciated. => |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @artyom-smirnov
Can't give reproducible code+query right now, but may be description may be enough.
In ExtEngineManager.cpp in ExtEngineManager::ExternalContextImpl::setTransaction newTransaction obtained from tdbb and assigned to internalTransaction if newTransaction is differs from internalTransaction, and then externalTransaction created. But if transaction were committed, and by chance object of newly created internal transaction will have same address, new external transaction will not be created, and thus plugin will get wrong transaction.
Commits: 4226f7c a6bd7a5
The text was updated successfully, but these errors were encountered: