On 8/21/21 6:26 PM, Tony Whyman wrote:
The good news is that I believe I have found a way around the problem. The bad news is that I think I have found another minor bug.

The workaround for variable message sizes is to compute the "used" buffer size after each call to IBatch::add by ensuring that getAlignedLength() is refreshed for each message buffer and adding this to the running total. It is then possible to identify when the buffer will overflow before IBatch::add is called and take appropriate action.

Yes, that should wok.


The minor bug is that if TAG_BUFFER_BYTES_SIZE is set to > 256MB no error status is reported on a call to createBatch. Instead, you only know you have a problem when an error is returned from IBatch::add - looks like the buffer size is simply limited to 256MB.

Ahh, that's pretty easy to fix but that's traditional approach of using constant as 'hint' and continue operation. For example:

SQL> CREATE DATABASE 'qq' pagesize 100000;
SQL> show db;
Database: qq
        Owner: SYSDBA
PAGE_SIZE 32768
..................

Same for conf files - invalid values are treated as defaults.

So chaging behavior in single place - not sure it's good idea.




Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to