Hi, i'm having troubles with SQL_MakeDbTuple function:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <sqlx>
new Handle:g_SqlTuple;
new Handle:g_SqlConnection;
public plugin_init()
{
register_plugin("Sqlx test",AMXX_VERSION_STR,"SmileY");
g_SqlTuple = SQL_MakeDbTuple("google.com","root","","test",1); // Any address to test it
if(g_SqlTuple != Empty_Handle)
{
new ErrorCode,Error[32];
g_SqlConnection = SQL_Connect(g_SqlTuple,ErrorCode,Error,charsmax(Error));
if(g_SqlConnection == Empty_Handle)
{
set_fail_state("[%i] %s",ErrorCode,Error);
}
}
}
public plugin_end()
{
SQL_FreeHandle(g_SqlTuple);
SQL_FreeHandle(g_SqlConnection);
}
This code try to connect to a remote mysql host (
In this case with a wrong address to test it!)
The server just do not respect timeout parameter (It respect only from core.ini).
In this test code the server will wait 60 seconds from mysql_timeout (at core.ini), not just 1 second from SQL_MakeDbTuple.
Ps. All crap from console (It is a local test)
Code:
] meta list
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] AMX Mod X RUN - amxmodx_mm.dll v1.9.0.5 ini Start ANY
[ 2] CStrike RUN - cstrike_amxx.dll v1.9.0.5 pl1 ANY ANY
[ 3] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl1 ANY ANY
[ 4] FakeMeta RUN - fakemeta_amxx.dl v1.9.0.5 pl1 ANY ANY
[ 5] CSX RUN - csx_amxx.dll v1.9.0.5 pl1 ANY ANY
[ 6] MySQL RUN - mysql_amxx.dll v1.9.0.5 pl1 ANY ANY
6 plugins, 6 running
] amxx plugins
Currently loaded plugins:
name version author file status
[ 1] Pug Mod (Anti Flood) 1.9.0.5263 AMXX Dev Team PugFlood.amxx running
[ 2] Pug Mod (Core) 3.0.2 SmileY PugCore.amxx running
[ 3] Pug Mod (Config System 3.0.2 SmileY PugConfigs.amxx running
[ 4] Pug Mod (Menus System) 3.0.2 SmileY PugMenus.amxx running
[ 5] Pug Mod (Ready System) 3.0.2 SmileY PugReady.amxx running
[ 6] Pug Mod (LO3) 3.0.2 SmileY PugLO3.amxx running
[ 7] Pug Mod (Aux) 3.0.2 SmileY PugAux.amxx running
[ 8] Pug Mod (Warmup) 3.0.2 SmileY PugWarmup.amxx running
[ 9] Pug Mod (Manager) 1.9.0.5263 SmileY PugAdmin.amxx running
[ 10] Pug Mod (Stats) 3.0.2 SmileY PugStats.amxx debug
[ 11] Logs Parser 1.9.0.5263 SmileY File.amxx error
( 11) Error: [2003] Can't connect to MySQL server o
11 plugins, 10 running
] amxx version
AMX Mod X 1.9.0.5263 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Oct 27 2019 16:23:56
Built from: https://github.com/alliedmodders/amxmodx/commit/15a14a0a
Build ID: 5263:15a14a0a
Core mode: JIT+ASM32
] meta list
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] AMX Mod X RUN - amxmodx_mm.dll v1.9.0.5 ini Start ANY
[ 2] CStrike RUN - cstrike_amxx.dll v1.9.0.5 pl1 ANY ANY
[ 3] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl1 ANY ANY
[ 4] FakeMeta RUN - fakemeta_amxx.dl v1.9.0.5 pl1 ANY ANY
[ 5] CSX RUN - csx_amxx.dll v1.9.0.5 pl1 ANY ANY
[ 6] MySQL RUN - mysql_amxx.dll v1.9.0.5 pl1 ANY ANY
6 plugins, 6 running
__________________