fixed amb1067 - SQL_SetAffinity crashed when targeting sqlite
This commit is contained in:
parent
a2e3f8682f
commit
f6276db4d0
@ -141,11 +141,13 @@ namespace SourceMod
|
|||||||
|
|
||||||
struct DatabaseInfo
|
struct DatabaseInfo
|
||||||
{
|
{
|
||||||
|
DatabaseInfo() : max_timeout(0) { };
|
||||||
const char *host;
|
const char *host;
|
||||||
const char *database;
|
const char *database;
|
||||||
const char *user;
|
const char *user;
|
||||||
const char *pass;
|
const char *pass;
|
||||||
unsigned int port;
|
unsigned int port;
|
||||||
|
unsigned int max_timeout;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ISQLDriver
|
class ISQLDriver
|
||||||
@ -154,6 +156,8 @@ namespace SourceMod
|
|||||||
virtual ~ISQLDriver() { };
|
virtual ~ISQLDriver() { };
|
||||||
public:
|
public:
|
||||||
virtual IDatabase *Connect(DatabaseInfo *info, int *errcode, char *error, size_t maxlength) =0;
|
virtual IDatabase *Connect(DatabaseInfo *info, int *errcode, char *error, size_t maxlength) =0;
|
||||||
|
//Supports the timeout clause
|
||||||
|
virtual IDatabase *Connect2(DatabaseInfo *info, int *errcode, char *error, size_t maxlength) =0;
|
||||||
virtual const char *NameString() =0;
|
virtual const char *NameString() =0;
|
||||||
virtual bool IsCompatDriver(const char *namestring) =0;
|
virtual bool IsCompatDriver(const char *namestring) =0;
|
||||||
};
|
};
|
||||||
|
@ -35,6 +35,10 @@ int busy_handler(void *unused1, int unused2)
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
IDatabase *SqliteDriver::Connect2(DatabaseInfo *info, int *errcode, char *error, size_t maxlength)
|
||||||
|
{
|
||||||
|
return Connect(info, errcode, error, maxlength);
|
||||||
|
}
|
||||||
|
|
||||||
IDatabase *SqliteDriver::Connect(DatabaseInfo *info, int *errcode, char *error, size_t maxlength)
|
IDatabase *SqliteDriver::Connect(DatabaseInfo *info, int *errcode, char *error, size_t maxlength)
|
||||||
{
|
{
|
||||||
|
@ -9,6 +9,7 @@ namespace SourceMod
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IDatabase *Connect(DatabaseInfo *info, int *errcode, char *error, size_t maxlength);
|
IDatabase *Connect(DatabaseInfo *info, int *errcode, char *error, size_t maxlength);
|
||||||
|
IDatabase *Connect2(DatabaseInfo *info, int *errcode, char *error, size_t maxlength);
|
||||||
const char *NameString();
|
const char *NameString();
|
||||||
bool IsCompatDriver(const char *namestr);
|
bool IsCompatDriver(const char *namestr);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user