_check_ini_cache Regression
Joshua Colp <[email protected]> Thu, 02 Jun 2016 12:53:34 -0300
| Newsgroups | gmane.comp.db.unixodbc.devel |
|---|---|
| Message-ID | <[email protected]> |
Kia ora,
First time posting here so sorry if this is the incorrect place (since
I'm discussing a regression and specific code I thought your dev list
was most appropriate).
In the 2.3.3 release a change was made to the _check_ini_cache function
in odbcinst/SQLGetPrivateProfileString.c to fix an issue.
The code before the change was:
if ( nRetBuffer != ini_cache -> buffer_size )
continue;
This was changed to:
if ( nRetBuffer <= ini_cache -> buffer_size )
continue;
Unfortunately this has caused a regression where cached entries are not
actually being used, causing the linked list to grow. In my case
nRetBuffer is 1024 and ini_cache->buffer_size is 1024 as expected. This
results in them being evaluated as equal and therefore skipped. Since
I'm testing an environment where many disconnect/connect attempts are
occurring at the same time this spirals and the cache grows out of control.
Looking at the code I think the following is the right fix for it but
I'm still looking to confirm:
if ( nRetBuffer < ini_cache -> buffer_size )
continue;
Eyes and feedback on this would be appreciated.
Cheers and have a great day,
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
_______________________________________________
unixODBC-dev mailing list
[email protected]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev