Search the MySQL manual:
MySQL Manual

Buy this Reference Manual in softcover from Barnes & Noble!

/ / Up / Table of Contents

8.4.3.15 mysql_close()

void mysql_close(MYSQL *mysql)

8.4.3.16 Описание

Закрывает ранее открытое соединение. Функция mysql_close() также освобождает дескриптор данного соединения, указанный в mysql, если данный дескриптор был выделен автоматически функциями mysql_init() или mysql_connect().

8.4.3.17 Возвращаемые значения

Нет.

8.4.3.18 Ошибки

Нет.

User Comments

Posted by [name withheld] on Sunday January 12 2003, @8:02pm [Delete] [Edit]

Hello, we may have found a bug. We wrote a little function in C on Linux RedHat 7.3 that repetively does 3 things

- use mysql_init to initialise a MYSQL structure
- use mysql_connect to establish connection
- use mysql_query to execute an "insert" query
- finally use mysql_close to close communication.

We executed 1988 times that function using a simple loop instruction, and then it is not possible to connect to the server anymore. After a delay of 30 seconds approx., we can run the loop for another 1988 iterations. It looks like mysql_close does not do its job properly.

Add your own comment.

Top / / / Up / Table of Contents