Reimplement system triggers in C++/GDML code#8202
Conversation
53d6a8e to
9e373d0
Compare
| @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.
It should be in BOOT_PROCESS section (above) too
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Consider to move this block into separate routine - SystemTriggers::execute(), for example
There was a problem hiding this comment.
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.
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 |
|
|
||
| private: | ||
| unsigned id; | ||
| static inline std::atomic<unsigned> generator; |
There was a problem hiding this comment.
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.