15.07.2021 22:34, Adriano dos Santos Fernandes wrote:
Hi!Currently it's possible to set TraceDSQL config parameter in dev build to have formatted statement BLR in firebird.log, but that is not sufficient for automated tests. I want to add facility to make it possible to applications request individual statements BLR for debug and test purposes (also in prod build). Here is the design I would go: interface Statement { const uint PREPARE_PRESERVE_BLR = 0x80; } #define isc_info_sql_blr_bytes 31 #define isc_info_sql_blr_text 32 Statements prepared with PREPARE_PRESERVE_BLR would be usable with getInfo and isc_info_sql_blr_*. isc_info_sql_blr_bytes retrieves raw BLR bytes and isc_info_sql_blr_text retrieves formatted BLR as the BLOB filter/TraceDSQL. ISQL will have SET BLR_DISPLAY OFF/ON/ONLY. ONLY will make only prepare/display without execution. ISQL would use isc_info_sql_blr_text and retrieves already formatted data ready for display. That would be for master and v4. Comments?
I like it. Not sure how it will handle non-DML statements, but it is tool for those who understand how and why to use it. Regards, Vlad PS same way to get dsql\jrd parse tree ? :) Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
