-
-
Notifications
You must be signed in to change notification settings - Fork 245
Reimplement system triggers in C++/GDML code #8202
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
Conversation
53d6a8e
to
9e373d0
Compare
@@ -78,7 +78,7 @@ goto :EOF | |||
@for %%i in (metd) do @call :PREPROCESS dsql %%i -gds_cxx | |||
@for %%i in (DdlNodes, PackageNodes) do @call :PREPROCESS dsql %%i -gds_cxx | |||
@for %%i in (gpre_meta) do @call :PREPROCESS gpre/std %%i | |||
@for %%i in (dfw, dpm, dyn_util, fun, grant, ini, met, scl, Function) do @call :PREPROCESS jrd %%i -gds_cxx | |||
@for %%i in (dfw, dpm, dyn_util, fun, grant, ini, met, scl, Function, SystemTriggers) do @call :PREPROCESS jrd %%i -gds_cxx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be in BOOT_PROCESS section (above) too
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider to move this block into separate routine - SystemTriggers::execute()
, for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did it with multiple execute per moment/type, letting EXE still choosing them.
namespace | ||
{ | ||
|
||
void beforeDeleteCheckConstraint(thread_db* tdbb, Record* record) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to name routines according to what they do instead of when they are called.
320280c
to
31780d5
Compare
I have validated this branch with firebird-qa and the differences with master are: tests.bugs.core_4731_test: with firebird-qa inserts records in rdb$types with rdb$system_flag (not nullable) set to null and expect the records there. Firebird was wrong due to not create rdb$runtime field for it due to no system triggers for this table - now fixed in Firebird code. tests.bugs.core_4725_test These tests excepts in some operations SQLSTATE = 27000 but now Firebird returns 42000. The change is correct as 27000 is related to the error "action cancelled by system trigger" and not the actual SQLSTATE associated with the error. CC @pavel-zotov |
src/jrd/exe_proto.h
Outdated
|
||
private: | ||
unsigned id; | ||
static inline std::atomic<unsigned> generator; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cache is bound to attachment and not database, what is the point for atomic generator here? BTW, std::atomic_uint is defined.
I see result = 'passed' for this test on 6.0.0.419-3505a5ec and 6.0.0.421-ed60d4d. Nothing to do with it ? Following:
-- have been adjusted with current output in FB 6.x |
Without changes for me:
|
Sorry, i've found the reason. |
No description provided.