[Plugin] [REL] MySQL Plugin (Now on github!)

Should I use this mysql plugin or StrickenKid's mysql plugin?
Reply

This.

This is the best in many different ways.
Reply

Код:
[01:30:57] [debug] System backtrace:
[01:30:57] [debug] #0 00f45f41 in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[01:30:57] [debug] #1 00f3c41f in _ZN11crashdetect20PrintSystemBacktraceEPv () from plugins/crashdetect.so
[01:30:57] [debug] #2 00f3a963 in _ZN11crashdetect15SystemExceptionEPv () from plugins/crashdetect.so
[01:30:57] [debug] #3 00f453c1 in ?? () from plugins/crashdetect.so
[01:30:57] [debug] #4 009bc410 in ?? ()
[01:30:57] [debug] #5 08098cb1 in ?? () from ./samp03svr
[01:30:57] [debug] #6 007167c4 in _ZN6StrAmx3GetEP6tagAMXiRPc () from plugins/mysql.so
[01:30:57] [debug] #7 0071e666 in _ZN7Natives22n_mysql_query_callbackEP6tagAMXPi () from plugins/mysql.so
[01:30:57] [debug] #8 00f4aa33 in amx_Exec () from plugins/crashdetect.so
[01:30:57] [debug] #9 00f3b622 in _ZN11crashdetect9DoAmxExecEPii () from plugins/crashdetect.so
[01:30:57] [debug] #10 00f43699 in ?? () from plugins/crashdetect.so
[01:30:57] [debug] #11 080dc757 in ?? () from ./samp03svr
[01:30:57] [debug] #12 00f4aa33 in amx_Exec () from plugins/crashdetect.so
[01:30:57] [debug] #13 00f3b622 in _ZN11crashdetect9DoAmxExecEPii () from plugins/crashdetect.so
[01:30:57] [debug] #14 00f43699 in ?? () from plugins/crashdetect.so
[01:30:57] [debug] #15 080a248c in ?? () from ./samp03svr
[01:30:57] [debug] #16 0809fe19 in ?? () from ./samp03svr
[01:30:57] [debug] #17 080ac043 in ?? () from ./samp03svr
[01:30:57] [debug] #18 080ad4b6 in ?? () from ./samp03svr
[01:30:57] [debug] #19 080ad652 in ?? () from ./samp03svr
[01:30:57] [debug] #20 080a8fb3 in ?? () from ./samp03svr
[01:30:57] [debug] #21 003d8ce6 in __libc_start_main () from /lib/libc.so.6
[01:30:57] [debug] #22 0804b491 in ?? () from ./samp03svr
^ Crash during executing a RCON command which backups all data in my server.
The gameserver is hosted on linux and the MySQL server (Windows) is remote, the mutex is enabled and I execute about 300 queries.
Reply

Quote:
Originally Posted by Dan..
Посмотреть сообщение
Код:
[01:30:57] [debug] System backtrace:
[01:30:57] [debug] #0 00f45f41 in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[01:30:57] [debug] #1 00f3c41f in _ZN11crashdetect20PrintSystemBacktraceEPv () from plugins/crashdetect.so
[01:30:57] [debug] #2 00f3a963 in _ZN11crashdetect15SystemExceptionEPv () from plugins/crashdetect.so
[01:30:57] [debug] #3 00f453c1 in ?? () from plugins/crashdetect.so
[01:30:57] [debug] #4 009bc410 in ?? ()
[01:30:57] [debug] #5 08098cb1 in ?? () from ./samp03svr
[01:30:57] [debug] #6 007167c4 in _ZN6StrAmx3GetEP6tagAMXiRPc () from plugins/mysql.so
[01:30:57] [debug] #7 0071e666 in _ZN7Natives22n_mysql_query_callbackEP6tagAMXPi () from plugins/mysql.so
[01:30:57] [debug] #8 00f4aa33 in amx_Exec () from plugins/crashdetect.so
[01:30:57] [debug] #9 00f3b622 in _ZN11crashdetect9DoAmxExecEPii () from plugins/crashdetect.so
[01:30:57] [debug] #10 00f43699 in ?? () from plugins/crashdetect.so
[01:30:57] [debug] #11 080dc757 in ?? () from ./samp03svr
[01:30:57] [debug] #12 00f4aa33 in amx_Exec () from plugins/crashdetect.so
[01:30:57] [debug] #13 00f3b622 in _ZN11crashdetect9DoAmxExecEPii () from plugins/crashdetect.so
[01:30:57] [debug] #14 00f43699 in ?? () from plugins/crashdetect.so
[01:30:57] [debug] #15 080a248c in ?? () from ./samp03svr
[01:30:57] [debug] #16 0809fe19 in ?? () from ./samp03svr
[01:30:57] [debug] #17 080ac043 in ?? () from ./samp03svr
[01:30:57] [debug] #18 080ad4b6 in ?? () from ./samp03svr
[01:30:57] [debug] #19 080ad652 in ?? () from ./samp03svr
[01:30:57] [debug] #20 080a8fb3 in ?? () from ./samp03svr
[01:30:57] [debug] #21 003d8ce6 in __libc_start_main () from /lib/libc.so.6
[01:30:57] [debug] #22 0804b491 in ?? () from ./samp03svr
^ Crash during executing a RCON command which backups all data in my server.
The gameserver is hosted on linux and the MySQL server (Windows) is remote, the mutex is enabled and I execute about 300 queries.
It is known to crash when using gmx.
Reply

Quote:
Originally Posted by zgintasz
Посмотреть сообщение
Should I use this mysql plugin or StrickenKid's mysql plugin?
MySQL R7 is more stable and fast, that's StrickenKid plugin.
Reply

Quote:
Originally Posted by KyleSmith
Посмотреть сообщение
It is known to crash when using gmx.
That's odd. My server never crashed on 'gmx'. :\

This is probably the fix (I haven't tested yet):
Код:
int StrAmx::Get(AMX* amx, cell param, char*& dest)
{
	cell *ptr;
	int len;
	amx_GetAddr(amx, param, &ptr);
	amx_StrLen(ptr, &len);
	dest = (char*)malloc((len * sizeof(char))+1);
	if (dest == NULL) return 0; // FIX
	amx_GetString(dest, ptr, 0, UNLIMITED);
	dest[len] = '\0';
	return len;
}
Reply

can anyone help me?

[18:45:15] Loading plugin: mysql.so
[18:45:15] Failed (libmysqlclient_r.so.16: cannot open shared object file: No such file or directory)

is there any fix for debian? i have just tried this http://forum.sa-mp.com/showpost.php?...&postcount=553 but, there is no /usr/lib only /usr/share/doc

i "wget"ed http://security.ubuntu.com/ubuntu/po...tu12.7_all.deb
Reply

I believe the links are down, or is it just me?
Reply

Quote:
Originally Posted by Steven82
Посмотреть сообщение
I believe the links are down, or is it just me?
Me too, damn!
Reply

DANGER: LINKS ARE DOWN FIX THEM PLEASEEEE
Reply

I have got one question about the mysql plugin.
Could someone compile the R7 mysql plugin for Debian 64 please?
The precompiled Ubuntu R7 version does not work for me on Debian..
Version R6 works.. But I need R7.

Sincerely
flying
Reply

Quote:
Originally Posted by flying
Посмотреть сообщение
I have got one question about the mysql plugin.
Could someone compile the R7 mysql plugin for Debian 64 please?
The precompiled Ubuntu R7 version does not work for me on Debian..
Version R6 works.. But I need R7.

Sincerely
flying
Have you tried with static variants from http://www.egaming.ro/MySQL/ ?
Reply

When I try to connect using "localhost" (which I've always been doing)

Code:
[02:27:09] >> mysql_connect(localhost, lscnr_****, lscnr_****, ******) on port 3306
[02:27:09] CMySQLHandler::CMySQLHandler() - constructor called.
[02:27:09] CMySQLHandler::CMySQLHandler() - Connecting to "localhost" | DB: "lscnr_***" | Username: "lscnr_****"
[02:27:09] CMySQLHandler::Connect() - Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (Error ID: 2002)
When I change to 127.0.0.1, it does this. (I think it is because the actual MySQL is set up as localhost)

Code:
[02:17:20] >> mysql_connect(127.0.0.1, lscnr_****, lscnr_****, ******) on port 3306[02:17:20] CMySQLHandler::CMySQLHandler() - constructor called.
[02:17:20] CMySQLHandler::CMySQLHandler() - Connecting to "127.0.0.1" | DB: "lscnr_****" | Username: "lscnr_****"
[02:17:20] CMySQLHandler::Connect() - Can't connect to MySQL server on '127.0.0.1' (111) (Error ID: 2003)
Using RC7-2-v4 on Centos 5.3 64-bit. Any help please? The MySQL connection is up...

This fix is really urgent, I'll pay anyone who can help me with this fast, upload a working version or something!
Reply

@Source have you re-checked your database connection strings?
Reply

Quote:
Originally Posted by gilpenner
View Post
This is the bad cod, it doesn't work beacause I'm using %e
Code:
mysql_format(mysql, query, "SELECT * FROM `acc` WHERE `user` = '%e'", name(playerid));
	mysql_function_query(mysql, query, true, "_Read", "d", playerid);
But when I change to %s it works
Code:
mysql_format(mysql, query, "SELECT * FROM `acc` WHERE `user` = '%s'", name(playerid));
	mysql_function_query(mysql, query, true, "_Read", "d", playerid);
Have the same problem here ... using mysql_real_escape_string(...) works fine for me!
I use the latest RC for 0.3x
Reply

Are you sure you are using R8 (https://code.google.com/p/sa-mp-mysq...downloads/list)?
Reply

Can you tell us exactly what was changed in the R8 version uploaded on Google?

Also, where is the source for it? I only see the Windows Plugin.

Anyways, thanks for everything and your hard work.
Reply

I was thinking that you prepare R8 or another surprise. <3

Thank you !

Could you say all the changes ?
Reply

Quote:
Originally Posted by lolumadd_
View Post
Can you tell us exactly what was changed in the R8 version uploaded on Google?

Also, where is the source for it? I only see the Windows Plugin.

Anyways, thanks for everything and your hard work.
https://code.google.com/p/sa-mp-mysq...in/source/list
Reply

Thanks, the R8 fixes the problem with the heap size warning
Reply


Forum Jump:


Users browsing this thread: 11 Guest(s)