ROOT  6.06/09
Reference Guide
Macros | Functions
TMySQLServer.cxx File Reference
#include "TMySQLServer.h"
#include "TMySQLResult.h"
#include "TMySQLStatement.h"
#include "TSQLColumnInfo.h"
#include "TSQLTableInfo.h"
#include "TSQLRow.h"
#include "TUrl.h"
#include "TList.h"
#include "TObjString.h"
#include "TObjArray.h"
#include <my_global.h>
+ Include dependency graph for TMySQLServer.cxx:

Go to the source code of this file.

Macros

#define CheckConnect(method, res)
 
#define CheckErrNo(method, force, res)
 

Functions

 ClassImp (TMySQLServer) TMySQLServer
 Open a connection to a MySQL DB server. More...
 

Macro Definition Documentation

#define CheckConnect (   method,
  res 
)
#define CheckErrNo (   method,
  force,
  res 
)
Value:
{ \
unsigned int sqlerrno = mysql_errno(fMySQL); \
if ((sqlerrno!=0) || force) { \
const char* sqlerrmsg = mysql_error(fMySQL); \
if (sqlerrno==0) { sqlerrno = 11111; sqlerrmsg = "MySQL error"; } \
SetError(sqlerrno, sqlerrmsg, method); \
return res; \
} \
}
if(pyself &&pyself!=Py_None)
return
Definition: TBase64.cxx:62

Definition at line 248 of file TMySQLServer.cxx.

Referenced by TMySQLServer::Commit(), TMySQLServer::CreateDataBase(), TMySQLServer::DropDataBase(), TMySQLServer::Exec(), TMySQLServer::GetDataBases(), TMySQLServer::GetTableInfo(), TMySQLServer::GetTables(), TMySQLServer::GetTablesList(), TMySQLServer::PingVerify(), TMySQLServer::Query(), TMySQLServer::Reload(), TMySQLServer::Rollback(), TMySQLServer::SelectDataBase(), TMySQLServer::ServerInfo(), TMySQLServer::Shutdown(), and TMySQLServer::Statement().

Function Documentation

ClassImp ( TMySQLServer  )

Open a connection to a MySQL DB server.

The db arguments should be of the form "mysql://<host>[:<port>][/<database>]", e.g.: "mysql://pcroot.cern.ch:3456/test". The uid is the username and pw the password that should be used for the connection.

In addition, several parameters can be specified in url after "?" symbol: timeout=N n is connect timeout is seconds socket=socketname socketname should be name of Unix socket, used for connection multi_statements tell the server that the client may send multiple statements in a single string (separated by ;); multi_results tell the server that the client can handle multiple result sets from multiple-statement executions or stored procedures reconnect=0|1 enable or disable automatic reconnection to the server if the connection is found to have been lost compress use the compressed client/server protocol cnf_file=filename Read options from the named option file instead of from my.cnf cnf_group=groupname Read options from the named group from my.cnf or the file specified with cnf_file option If several parameters are specified, they should be separated by "&" symbol Example of connection argument: TSQLServer::Connect("mysql://host.domain/test?timeout=10&multi_statements");

Definition at line 58 of file TMySQLServer.cxx.