Posts: 845
Threads: 3
Joined: Jun 2010
Quote:
Originally Posted by The501legion
Is there any way to get a simple function which saves the results of a query directly in its parameters? This function should skip the entire callback-part like
Код:
sqlQuery("select userID from users where userName = 'Test';", "i", id, handle);
id should now contain the selected userID from user Test.
|
Sure:
Код:
sqlQuery(handle, const query[], &var)
{
new Cache:result = mysql_query(handle, query);
var = cache_get_row_int(0, 0);
cache_delete(result);
return 1;
}
Just make sure that your query executes quick enough (since this is an unthreaded query), e.g. add a "LIMIT 1" statement at the end of your query.
Quote:
Originally Posted by _Zume
Код:
[15:19:57] [debug] Server crashed due to an unknown error
[15:19:57] [debug] Native backtrace:
[15:19:57] [debug] #0 00e0f50b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[15:19:57] [debug] #1 00e0820f in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[15:19:57] [debug] #2 00e093fc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[15:19:57] [debug] #3 00e09866 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[15:19:57] [debug] #4 00e0f15c in ?? () from plugins/crashdetect.so
[15:19:57] [debug] #5 0013e410 in ?? ()
[15:19:57] [debug] #6 005be806 in ?? () from /lib/libc.so.6
[15:19:57] [debug] #7 00f55254 in _ZN11CMySQLQuery11StoreResultEP8st_mysqlP12st_mysql_res () from plugins/mysql_static.so
[15:19:57] [debug] #8 00f55657 in _ZN11CMySQLQuery7ExecuteEP8st_mysql () from plugins/mysql_static.so
[15:19:57] [debug] #9 00f4c9e4 in _ZN16CMySQLConnection14ProcessQueriesEv () from plugins/mysql_static.so
[15:19:57] [debug] #10 00f4d2e7 in _ZN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf0Iv16CMySQLConnectionEENS2_5list$
[15:19:57] [debug] #11 00ff65a8 in ?? () from plugins/mysql_static.so
[15:19:57] [debug] #12 001c7b69 in ?? () from /lib/libpthread.so.0
[15:19:57] [debug] #13 00569cce in clone () from /lib/libc.so.6
what's wrong with this?
|
Quote:
Originally Posted by LatinZ
The r39-3 and r39-4 version is not compatible with the latest detect crash, this incompatibility causes the fall of the server.
EDIT:
The crash occurs for the 64-bit version. " mysql_static.so " I'll let the problem here:
|
Hm, this seems like a real issue now. How often does this crash occur (for both of you)?
Quote:
Originally Posted by Ralfie
|
Could you provide that faulty html file? (through pastebin please)
Posts: 49
Threads: 5
Joined: Nov 2015
Hey,i've got problem,why mydql cant connect to database ..
Help me,pm meh if u know what'is problem
Posts: 562
Threads: 41
Joined: Aug 2013
Reputation:
0
use tQuery
pQuery is for on mulitple connection
Posts: 913
Threads: 70
Joined: Apr 2009
Reputation:
0
I saw now you added mysql_unprocessed_queries & mysql_format. If you compile it then I can test it on my live server.
Posts: 270
Threads: 7
Joined: Apr 2015
Whenever I connect to mysql, It creates a process in mysql process list, then when I use mysql_close it won't kill the process therefore after a while error will occur: "Too many connections"...
Why mysql_close won't kill the process?
Posts: 36
Threads: 3
Joined: Mar 2015
Because mysql_close closes the connection to the database, not the process itself.
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
I don't know what you are doing in order to open too many connections. Unless your connection limit is, like, 5. The plugin only opens as many connections as has been set in the poolsize parameter in mysql_connect (default 2) and it should close all of them on disconnect.
Posts: 845
Threads: 3
Joined: Jun 2010
The number of direct database connections per connection handle is 2 (un/threaded connections for mysql_(t)query) + pool size (mysql_pquery), thus the default number of connections is actually 4.
Posts: 270
Threads: 7
Joined: Apr 2015
I've move to an Ubuntu 64bit
I get this error
I've searched for it but don't know what to do with the file:
Код:
Loading plugin: mysql.so
Failed (libmysqlclient_r.so.16: cannot open shared object file: No such file or directory)
* Both mysql.so and a_mysql.inc are version R7,
* I've recompiled my FS too.
Posts: 270
Threads: 7
Joined: Apr 2015
Quote:
Originally Posted by Jeroen52
R7 is ancient, get a newer revision.
|
What do you mean? There's only R7, can't see a newer version...
Posts: 845
Threads: 3
Joined: Jun 2010
Quote:
Originally Posted by amirm3hdi
What do you mean? There's only R7, can't see a newer version...
|
Quote:
Originally Posted by BlueG
It's currently being developed by Pain123/maddinat0r; you'll find all older versions, including source codes and sample scripts, from R5 to R7 at the bottom of this post and the latest release here.
|
4char
Posts: 1,042
Threads: 46
Joined: Jun 2013
Callback OnQueryError not caused. What to do? Version: Linux, R39-4