Package Modeling :: Package DatabaseAdaptors :: Package MySQLAdaptorLayer :: Module mysql_utils
[show private | hide private]
[frames | no frames]

Module Modeling.DatabaseAdaptors.MySQLAdaptorLayer.mysql_utils

MySQL Adaptor Layer's utils

Central point for determining MySQL specifics, like the version of the mysql server in use.

CVS information

$Id: mysql_utils.py,v 1.2 2004/07/20 06:21:38 sbigaret Exp $

Function Summary
  mysql_server_version()
Returns the version of the mysql server currently in use.

Function Details

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.


Generated by Epydoc 2.1 on Sat Mar 4 13:36:24 2006 http://epydoc.sf.net