Previously, third-party tools that need to determine the MySQL version from the MySQL source read the configure.in file in the top-level source directory. For example, the AC_INIT line for 5.5.7-rc looked like this:
AC_INIT([MySQL Server], [5.5.7-rc], [], [mysql])
Such tools now can read the VERSION file. For example, if the version is 5.5.8, the file looks like this:
MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MINOR=5 MYSQL_VERSION_PATCH=8 MYSQL_VERSION_EXTRA=
If the source is not for a General Availablility (GA) release, the MYSQL_VERSION_EXTRA value will be nonempty. For example, the value for a Release Candidate release would look like this:
MYSQL_VERSION_EXTRA=rc
To construct a five-digit number from the version components, use this formula:
MYSQL_VERSION_MAJOR*10000 + MYSQL_VERSION_MINOR*100 + MYSQL_VERSION_PATCH
