tdbc::mysql

View Ticket
Login
Ticket Hash: 38b421299fb6f4d8ce41ff7b128ed4f93ceb7476
Title: open connections aren't closed properly
Status: Closed Type: Code_Defect
Severity: Severe Priority: Immediate
Subsystem: not_specified Resolution: Fixed
Last Modified: 2022-08-23 10:37:05
Version Found In: 1.1.1
User Comments:
anonymous added on 2019-12-04 18:52:26:
Executing "tdbc::mysql::connection create" will eventually throw "Too many connections", if I executed it too often before.
The general workflow is:
-----------------
tdbc::mysql::connection create
# A single SELECT-statement
$db_handle close
-----------------
This workflow is run very often and around run 157 the mentioned erro is thrown.

A comparison of the file "tdbcmysql.c" with version 1.1.0 shows that the DEFINES to decrement the ref-counters were changed from something like "if (--bla->refCount <= 0)" to "if (bla->refCount-- <= 1)". I guess it means the same thing but is just written differently. Nevertheless the 2 DEFINES "DecrConnectionRefCount" and "DecrResultSetRefCount" seem to be wrong. The first has a "01" instead of just "1" and the latter still has "0" but the "--" already behind the variable. When changing both these cases to "1" it seems to work again.

oehhar added on 2022-08-23 10:28:39:

When I look to 1.1.4 [ec5ceb1004], I think, the issue is fixed.

Closing now.

Please complain if not done.