From 3fa6cd3227bad683cb23b87e3c29919967fca453 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 1 Oct 2006 19:59:27 +0000 Subject: [PATCH] added a timeout test which does not work, thanks MySQL --- plugins/testsuite/sqlxtest.sma | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/plugins/testsuite/sqlxtest.sma b/plugins/testsuite/sqlxtest.sma index 37e1f5eb..5dc3a62c 100644 --- a/plugins/testsuite/sqlxtest.sma +++ b/plugins/testsuite/sqlxtest.sma @@ -15,6 +15,7 @@ public plugin_init() register_srvcmd("sqlx_test_old1", "SqlxTest_Old1") register_srvcmd("sqlx_test_old2", "SqlxTest_Old2") register_srvcmd("sqlx_test_thread_end", "SqlxTest_ThreadEnd") + register_srvcmd("sqlx_test_bad", "SqlxTest_Bad") new configsDir[64] get_configsdir(configsDir, 63) @@ -73,6 +74,22 @@ public plugin_cfg() g_DbInfo = SQL_MakeDbTuple(host, user, pass, db) } +public SqlxTest_Bad() +{ + new errnum, error[255] + new Handle:tempinfo = SQL_MakeDbTuple("1.2.3.4", "asdf", "gasdf", "gaben", 2) + new Handle:db = SQL_Connect(tempinfo, errnum, error, 254) + + if (db == Empty_Handle) + { + server_print(" --> Errored out! %d, %s", errnum, error) + } else { + server_print(" --> Something is wrong here.") + } + + return PLUGIN_HANDLED +} + /** * Note that this function works for both threaded and non-threaded queries. */