mysql_server_version()
Returns the version of the mysql server currently in use. If the environment
variable MDL_MYSQL_SERVER_VERSION is set, it returns the information it
contains, otherwise it calls MySQLdb.get_client_info().
Acceptable values for MDL_MYSQL_SERVER_VERSION are e.g: 3.23, 4,
4.0.11a-gamma.
- Return value:
- A 4-values tuple: (VERSION, PATCH_LEVEL, SUBLEVEL, EXTRA_VERSION)
E.g. (4,0,11,'a-gamma')
Note that the env. is checked before MySQLdb.get_client_info() is called,
because on some installation the latter reports a different version than the
server's one (this happens e.g. when the client python adaptor is linked to
an older mysql-library); in such cases, the env.variable allows the user to
explicitly set the version of the mysql db-server.
-
|