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


5.4.35 mysql_get_server_version()

unsigned longmysql_get_server_version(MYSQL *mysql)

Description

Returns an integer that represents the MySQL server version. The value has the formatXXYYZZ, whereXX is the major version,YY is the release level (or minor version), andZZ is the sub-version within the release level:

major_version*10000 + release_level*100 + sub_version

For example,"8.4.6" is returned as80406.

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.