Hello,
Just to let you know, we've been able to consistently reproduce the issue reported by ael.
Please download the following POC here :
POC
In this archive, besides the source code, and firebird support folder, you'll find in the Win32 subfolders 2 different executable file :
- Parametric_8x.exe : compiled with Delphi 10.4 + Unidac 8.3.1
- Parametric_9x.exe : compiled with Delphi 11.1 + Unidac 9.1.1
Binaries will create and populate a new database using runtime/sql scripts in the DatabaseCreate function, and then perform 2 different queries in DatabasePatch function :
- QUERY_ERROR_MODEL_EXPLICIT where we replace the various values using format before passing the resulting SQL query string directly to TUniSQL to insert.
- QUERY_ERROR_MODEL_PARAMS where we're using Params & Macros of TUniSQL instead
This shouldn't trigger any exception in Parametric_8x.
Code: Select all
SUCCESS: Empty DB created!
SUCCESS: Database creation completed
SUCCESS: Connected to new_db.fdb
INSERT INTO p_error_model (bha_id, bha_errormodelcategoryid, bha_srvtypid, bha_estsys, bha_revisionnumber, bha_revisiondate, bha_inclinationrangemin, bha_inclinationrangemax, bha_horeasrwestexclusion, bha_toolparameterid, bha_modelsource, bha_owsgprefix, bha_shortname, bha_longname, bha_revisioncomment, bha_source, bha_application, bha_rangecomment) VALUES (2, 3, 1, 'TRUE', 1, 1, 0, 3.14159, 0, 1, 'Explicit', 'Explicit', 'Explicit', 'Explicit', 'Explicit', 'Explicit', 'Explicit', 'None');
INSERT INTO p_error_model (bha_id, bha_errormodelcategoryid, bha_srvtypid, bha_estsys, bha_revisionnumber, bha_revisiondate, bha_inclinationrangemin, bha_inclinationrangemax, bha_horeasrwestexclusion, bha_toolparameterid, bha_modelsource, bha_owsgprefix, bha_shortname, bha_longname, bha_revisioncomment, bha_source, bha_application, bha_rangecomment) VALUES ("3", "3", "1", "FALSE", "1", "1", "0", "3,141593", "0", "1", "Parametric", "Parametric", "Parametric", "Parametric", "Parametric", "Parametric", "Parametric", "None");
UPDATE s_cst SET bha_val = :Val WHERE bha_id = :Id;
In Parametric_9x on the other hand, you should get an exception for QUERY_ERROR_MODEL_PARAMS about one of the parameter : Problematic key value is ("BHA_SRVTYPID" = 14337) on table "P_ERROR_MODEL"
Code: Select all
SUCCESS: Empty DB created!
SUCCESS: Database creation completed
SUCCESS: Connected to new_db.fdb
INSERT INTO p_error_model (bha_id, bha_errormodelcategoryid, bha_srvtypid, bha_estsys, bha_revisionnumber, bha_revisiondate, bha_inclinationrangemin, bha_inclinationrangemax, bha_horeasrwestexclusion, bha_toolparameterid, bha_modelsource, bha_owsgprefix, bha_shortname, bha_longname, bha_revisioncomment, bha_source, bha_application, bha_rangecomment) VALUES (2, 3, 1, 'TRUE', 1, 1, 0, 3.14159, 0, 1, 'Explicit', 'Explicit', 'Explicit', 'Explicit', 'Explicit', 'Explicit', 'Explicit', 'None');
SELECT GEN_ID(p_error_model_Gen, 1) FROM RDB$DATABASE;
INSERT INTO p_error_model (bha_id, bha_errormodelcategoryid, bha_srvtypid, bha_estsys, bha_revisionnumber, bha_revisiondate, bha_inclinationrangemin, bha_inclinationrangemax, bha_horeasrwestexclusion, bha_toolparameterid, bha_modelsource, bha_owsgprefix, bha_shortname, bha_longname, bha_revisioncomment, bha_source, bha_application, bha_rangecomment) VALUES ("1", "3", "1", "FALSE", "1", "1", "0", "3,141593", "0", "1", "Parametric", "Parametric", "Parametric", "Parametric", "Parametric", "Parametric", "Parametric", "None");
Problematic key value is ("BHA_SRVTYPID" = 14337) on table "P_ERROR_MODEL"
Please note that this value has been (silently) changed from what we've requested ("BHA_SRVTYPID" = 1) (we've added a dirty log to every request to make this fact more visible).
Could you please take a look and let us know if you're seeing the same behaviour on your end ? Don't hesitate to let me know if you need anything else as this issue is blocking our migration to Delphi 11 (and unidac 9)
Thanks a lot for your time,
Regards,