My system
- Database Version: 6.1.0
- Database Name: Sybase
- Node.js Version:12.18.3
- node-odbc package Version: 2.4.1
- Node.js OS: Windows 10 Pro
The bug
Launching the same query with a lot of data for many times odbc packet returns to me the following error "[odbc]Error allocating or reallocating memory when fetching data. No ODBC error information available". The heap fills up with each query despite the result being returned to the service response and the variable being cleaned. Trying to run the query with the parameter (cursor=true) and closing the cursor without data fetch there are no problems. The same problem occurs when I have longvarchar fields on the tables. Although I close the connections the db still displays them open.
Expected behavior
I do not understand why the system goes out of memory despite the fact that the queries are executed one after the other. Running the query once does not cause the problem.
To Reproduce
Prepare table with 22 fields (2 varchar(32767)) and 5633 records. Call the service 15 times by pressing a key that open connection, executes the SELECT query on table, close connection and returns the result.