mysql_refresh — flush server information

int mysql_refresh(MYSQL * mysql,
                  unsigned int options);

The mysql_refresh() flushes different types of information stored on server side. The bit-masked parameter options specifies which kind of information will be flushed.

Parameters

mysql

A mysql handle, which was previously allocated by mysql_init() or mysql_real_connect().

options

A bit masked composed integer which can be one or the combination of the following values:

REFRESH_GRANT

Refresh grant tables.

REFRESH_LOG

Flush logs.

REFRESH_TABLES

Flush table cache.

REFRESH_HOSTS

Flush host cache.

REFRESH_STATUS

Reset status variables.

REFRESH_THREADS

Flush thread cache

REFRESH_SLAVE

Reset master server information and restart slaves.

REFRESH_MASTER

Remove binary log files.

REFRESH_READ_LOCK

todo!!!

REFRESH_FAST

Return value

Zero on success, otherweise non zero.

[Note]

To combine different values in the options parameter use the OR operator '|'.

The function mysql_reload() is an alias for mysql_refresh().

See also