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

Because the mutex method was improved, but the improvement only takes effect on Windows machines.
Reply

https://code.******.com/p/sa-mp-mysq...s/detail?id=25

Can someone help me with this?
Reply

I need the mysql.so because my server isn't running on the .dll.
Reply

Quote:
Originally Posted by Diamondier
Посмотреть сообщение
I need the mysql.so because my server isn't running on the .dll.
Both Linux and Windows packages are available on the download page.
Reply

When using mysql_function_query, what should the format be for retrieving a number such as 131.512? I'm speaking in terms of retrieving x, y, z positions from a table.
Reply

Quote:
Originally Posted by Calabresi
View Post
I don't know if MySQL version has any effects while compiling those plugin files but, I do know that MySQL 5.5 and 5.1 has different mysql.sock directories which is source of my problem. Could you recompile it in MySQL 5.5?

My Ubuntu version is 12.04 by the way. R20 was working fine I think (I couldn't really test it because of my remote and local server OS differences).
Yes it does matter, unless you compile the static version. Atm i don't have the possibiliy to compile on Ubuntu 12.04. However the static version should work for you whether you have MySQL 5.1 or 5.5. Also try to compile yourself, make sure you have mysql-client installed.

If R20 worked for you, there must be an issue in R24.

Quote:
Originally Posted by RealCop228
View Post
I don't have a /usr/lib/mysql directory, but /usr/lib exists!


I did install mysql-devel earlier, but that didn't help either.


And, this is another version of mysql-devel being installed but again, still not working.


I'm at a loss...
You don't need mysql-devel but mysql-client.
Reply

yum provides mysqlclient is my source of information (the command which tells me that these files are a part of mysql and mysql-devel).

Also, as you can see, RealCop228 has these files, but in a tad different directory. So what needs to be done is alter the makefile so it says -L/usr/lib, not -L/usr/lib/mysql, as the latter does not exist on his system. I don't know if it'll work, but it is worth a try.

Furthermore, Mellnik, it would be a real honor if you started crediting people for the code and maps that you use without their permission. I'm faithfully yours =)
Reply

I edited the makefile, but that didn't work either..

EDIT: Okay, I think I got the MySQL files installed into the proper directory now. However, it still doesn't seem to compile...

Quote:

[root@orion lib]# cd /usr/lib/mysql
[root@orion mysql]# ls
libmysqlclient_r.so libmysqlclient.so

/usr/bin/ld: cannot find -lmysqlclient_r

Would rebooting the system help, maybe?
Reply

Zeex once provided me this link.

It looks like your files are very well present (libmysqlclient_r* files), this means that there must be something wrong (either an inconsistency between the paths with the makefile, or symbolic links not in place).

Also, how did you get the MySQL files into /usr/lib/mysql? Copying them manually would - I assume - break the symbolic links.

But meh, this issue has driven me nuts before a few years ago, I don't know how it solved itself, I was quite ready to cancel all my projects back then
Reply

I did this command: yum -y groupinstall "MySQL Database client"

It installed the libraries in the [..]/mysql directory automatically. I don't quite know why it's giving me such an issue. I don't know C++, otherwise I would be in the code looking to see what the problem is. Anyways, I would really like to find a resolution to this problem.

Is there a particular directory I need to be compiling plugins in?
Reply

This is weird, but is not influenced by the code in any way.

If you were to compile without linking against mysqlclient_r (-lmysqlclient_r means the linker looks for libmysqlclient_r.so in the directories specified with -L), it would most likely compile since the MySQL headers exist, but when running the plugin, the headers wouldn't be any use without the library to actually provide these functions.

Try running ldconfig to see if refreshing the cache would solve your issue (afaik this is for runtime though, not sure, but give it a try at least).

There might be something vital I'm missing here, but if it wouldn't bother you, you could also compile a static version of the plugin (a few MBs bigger, I assume), the .a file should be in the repo as well.

Best of luck!
Reply

Yes, all my Linux builds are on Ubuntu 10.04 with MySQL 5.1
Reply

EDIT: Okay, it's compiling now. However, it's the same runtime error I got when I used the downloadable Linux .so on the ****** Project page.

Quote:

Failed (plugins/mysql.so: undefined symbol: _ZNSt12out_of_rangeD2Ev)

This happens for both the static and non-static builds.

EDIT 2: I would also like to point out that I have run the same plugin on a Volt server (they run CentOS 5 IIRC) and the same errors occur.
Reply

how do u switch tables for cache_get_row_int etc etc Ex. users to bans... is there a mysql function?
Reply

Quote:
Originally Posted by Calabresi
View Post
[...]However, whenever my script tries to execute a "SELECT" query, the server crashes. I have tried many ways and checked many things to be sure about that, INSERT and UPDATE queries just work fine. I am pretty sure nothing else causes the crash.

The most interesting thing is, that crash only happens in my remote Linux server. When I try anything in Windows, it just works fine. I'm using R24 and Ubuntu 12.04.
Quote:
Originally Posted by Chaprnks
View Post
What's really odd is I compiled the R24 source on CentOS 6 (x86); then when I try and run it, the "_ZNSt12out_of_rangeD2Ev" error still persists.
Quote:
Originally Posted by RealCop228
View Post
EDIT: Okay, it's compiling now. However, it's the same runtime error I got when I used the downloadable Linux .so on the ****** Project page.



This happens for both the static and non-static builds.

EDIT 2: I would also like to point out that I have run the same plugin on a Volt server (they run CentOS 5 IIRC) and the same errors occur.
There is some kind of bug related to a function in the script, which only happens on Linux. Be patient, I'm working on it.
Reply

while i was changing my mysql server to r24 from r20 i edited the mysql_insert_id to a new one then i compiled it and run the server but when i checked the logs i got this "[00:13:36] [INFO] Now logging: errors" but under it it said nothing and everytime i open my server that happened but i don't know why
Reply

It does that to let you know what it's going to be logging. You can ignore it if you want to, it means nothing. However, in the event of an error, it'll print that error in that file for you.
Reply

ok thx for the info.... ;3
Reply

Just pushed out R25, all the Linux issues should be fixed now.
Reply

Quote:
Originally Posted by Pain123
Посмотреть сообщение
Just pushed out R25, all the Linux issues should be fixed now.
Nice updates.

Now Mellnik has to compile it again on linux. xD
Reply


Forum Jump:


Users browsing this thread: 12 Guest(s)