1mysql_reset_connection(3)     MariaDB Connector/C    mysql_reset_connection(3)
2
3
4
5   Name
6       mysql_reset_connection - Resets connection and clears session state
7
8   Synopsis
9              #include <mysql.h>
10
11              int mysql_reset_connection(MYSQL * mysql);
12
13   Description
14       Resets  the  current  connection  and clears session state.  Similar to
15       mysql_change_user(3) or mariadb_reconnect(3),  mysql_reset_connection()
16       resets session status, but without disconnecting, opening, or reauthen‐
17       ticating.
18
19       On client side mysql_reset_connection() * clears pending or unprocessed
20       result  sets * clears status like affected_rows, info or last_insert_id
21       * invalidates active prepared statements
22
23       On server side mysql_reset_connection() * drops  temporary  table(s)  *
24       rollbacks  active transaction * resets autocommit mode * releases table
25       locks * initializes session variables (and sets them to  the  value  of
26       corresponding  global  variables) * closes active prepared statements *
27       clears user variables
28
29   Parameter
30       • mysql  -  a  mysql  handle,  which  was   previously   allocated   by
31         mysql_init(3) and connected by mysql_real_connect(3).
32
33   Return value
34       Returns zero on success, non zero if an error occurred.
35
36   History
37       This function was added in MariaDB Connector/C 3.0.0.
38
39   See also
40mariadb_cancel(3)
41
42mysql_kill(3)
43
44
45
46Version 3.3.1                                        mysql_reset_connection(3)
Impressum