Bug Report 2001/09/23-v1.0b26-br01


[MAIN]
[News]
[Intro]
[Features]
[Download]
[Installation]
[Support]
[Support+]
[Docu]
[Tutorial]
[Bugs]
[forum ]
[wiki]
[Mirror]
[Authors]
[Future]
[License]
[Win98 Setup Bug]
[Subscribe]
Bug Report id=2001/09/23-v1.0b26-br01
Affected versions:v1.0b26 MySQL module
Severity:Low

Bug Description

Opening configured MySQL connections allocates memory, which is reallocated only when the interpreter finishes.

Bug Reason, What Causes the Bug

The implementation of the function mysql::Connect allocates memory to store the name of the connection zchar terminated and does not release this memory. This means that each time you call mysql::Connect the interpreter looses n+1 bytes of memory, where n is the number of characters in the name of the connection. This is quite a few bytes, but repetitive connection to mysql may sum up.

The memory lost during the interpreter execution is automatically released when the interpreter finishes even if there are other interpreters running in the same process.

The bug may affect applications where a BASIC program runs extremely long time, uses MySQL and periodically opens and closes the MySQL connection.

Solution

The next release of the MySQL module will correct this bug.

Bug Workaround Until Solution is Available

Do not excessively open and close MySQL connections using the function mysql::Connect. Use mysql::RealConnect instead if you open and close MySQL connection in your program more than a few thousand times.

In usual programs there is no need to apply any workaround, the lost memory is not significant.

Acknowledgement

N/A

This page was generated January 28, 2010 9:58:42