MySQL 5.6 C API Developer Guide
unsigned long mysql_get_client_version(void)
Returns an integer that represents the MySQL client library
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, "5.6.51"
is
returned as 50651
.
The function value is the MySQL version. For more information, see Section 4.4, “C API Server Version and Client Library Version”.