Documentation Home
MySQL 26.10 C API Developer Guide
Download this Manual
PDF (US Ltr) - 1.4Mb
PDF (A4) - 1.4Mb


5.4.36 mysql_get_server_info()

const char *
    mysql_get_server_info_with_version_update(MYSQL *mysql)

Description

Returns the complete version of the connected MySQL server in MAJOR.MINOR.PATCH.UPDATE form. The update component is always present, including when its value is 0. Any build or runtime suffix follows the update component.

A successfully retrieved value is cached, and subsequent calls return the cached value without issuing another query.

Return Values

A character string that represents the complete MySQL server version.

NULL if the connection is not ready to issue a command, the connected server does not support VERSION_WITH_UPDATE(), or no value can be retrieved. An unsupported server remains usable. Failed retrievals are not cached, so a later call may retry.