Documentation Home
MySQL 8.0 C API Developer Guide
Download this Manual
PDF (US Ltr) - 1.2Mb
PDF (A4) - 1.2Mb
HTML Download (TGZ) - 158.8Kb
HTML Download (Zip) - 190.0Kb


MySQL 8.0 C API Developer Guide  /  C API Function Descriptions  /  mysql_get_server_version()

7.34 mysql_get_server_version()

unsigned long
mysql_get_server_version(MYSQL *mysql)

Description

Returns an integer that represents the MySQL server version. The value has the format XYYZZ where X is the major version, YY is the release level (or minor version), and ZZ is the sub-version within the release level:

major_version*10000 + release_level*100 + sub_version

For example, "8.0.24" is returned as 80024.

This function is useful in client programs for determining whether some version-specific server capability exists.

Return Values

An integer that represents the MySQL server version.

Errors

None.