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

Hey maddinator.
What would be the easiest way to debug this problem?

Код:
[11:10:08] [ERROR] mysql_escape_string - destination size is too small (must be at least as big as source)
I am expiriencing it only on my live server and I use mysql_escape_string alot in my gamemode.
Any suggestions before I need to do line by line debugging? ( I am a bit lazy )
Reply

Quote:
Originally Posted by Gigi-The-Beast
Посмотреть сообщение
Hey maddinator.
What would be the easiest way to debug this problem?

Код:
[11:10:08] [ERROR] mysql_escape_string - destination size is too small (must be at least as big as source)
I am expiriencing it only on my live server and I use mysql_escape_string alot in my gamemode.
Any suggestions before I need to do line by line debugging? ( I am a bit lazy )
Use mysql_format instead or just change the destination size of mysql_escape_string to higher values or you can just remove the last parameter as it's already getting the destination size so you won't need to insert the size always.

pawn Код:
native mysql_escape_string(const source[], destination[], connectionHandle = 1, max_len = sizeof(destination));
Reply

I know that, it just prints the error for one use of function, I use it like 500 times in my gm. I asked if there is a debug level that would show some more information so I could easily find the line that causes the issue.
Reply

Quote:
Originally Posted by Gigi-The-Beast
Посмотреть сообщение
I know that, it just prints the error for one use of function, I use it like 500 times in my gm. I asked if there is a debug level that would show some more information so I could easily find the line that causes the issue.
Can't you CTRL + F and write mysql_escape_string to find them and change their destination size.
Reply

The problem is not with every one of them. Anyway thanks for your help, I'll just debug one by one.
Reply

Quote:
Originally Posted by Gigi-The-Beast
Посмотреть сообщение
The problem is not with every one of them. Anyway thanks for your help, I'll just debug one by one.
There is no easier way to find that error. Maybe you should try with using mysql_log(LOG_ALL). Query will be printed before the error so you will be able to see where the error is.
Reply

Hey B-Matt, that is what I was looking for, I didn't know that LOG_ALL logs the query, so it would be LOT easier to find the problematic one.
The only problem is that the log will be massive, as this is a live server with 100+ players.
Will try that way and see. Thanks.
Reply

Quote:
Originally Posted by Gigi-The-Beast
Посмотреть сообщение
Hey B-Matt, that is what I was looking for, I didn't know that LOG_ALL logs the query, so it would be LOT easier to find the problematic one.
The only problem is that the log will be massive, as this is a live server with 100+ players.
Will try that way and see. Thanks.
Open it in Notepad++ and then CTRL+F "Error", then you will have less lag. I do it with my server_log.txt.
Reply

Can I get a download link for R6-2? The standard R6 posted here doesn't have mysql_format.
Reply

Where can I find MySQL R33+
I am trying to find it but nothing :/
Just need help, thanks
Reply

Quote:
Originally Posted by VladimirMark
Посмотреть сообщение
Where can I find MySQL R33+
I am trying to find it but nothing :/
Just need help, thanks
It's on the first post: https://github.com/pBlueG/SA-MP-MySQL/releases
Reply

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Isn't that R38? When I scroll down I find R33 but is it the same with R33+ ?
I just got confused :/

EDIT:
It meant R33 or higher? I really don't know :P
Reply

The latest versions exist in that page (R33 to R38). Some bugs have been fixed, new functions have been added and there have been performance improvements after R33 got out so it's recommended to use the latest one R38.
Reply

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
The latest versions exist in that page (R33 to R3. Some bugs have been fixed, new functions have been added and there have been performance improvements after R33 got out so it's recommended to use the latest one R38.
Yea but I want the R33+ plugin

EDIT:
What does that mean?
Код:
Failed (libmysqlclient.so.18: cannot open shared object file: No such file or directory)
Reply

"R33+" means any version from R33 and above (up to R38). If you want to use R33 version, go ahead but using the latest version for plugins/includes etc is always recommended.
Reply

What does that mean?
Код:
Failed (libmysqlclient.so.18: cannot open shared object file: No such file or directory)
Reply

I'm not that good on Linux so I can't help you installing those libraries are needed but you can get rid of it by using a static version of the plugin.
Reply

Thank you very much Konstantino I speak Greek also
REP+
Reply

i want R6 by ubuntu plz
Reply

Quote:
Originally Posted by khalildz
Посмотреть сообщение
i want R6 by ubuntu plz
At least check the main post.

Quote:
Originally Posted by BlueG
Посмотреть сообщение
Downloads: (for newer updates, use the github project site above!)

NOTE: DON'T USE VERSION R7 OR ABOVE IF YOU HAVE NO IDEA WHAT THREADING MEANS OR HOW IT WORKS. YOU MIGHT HARM YOUR SERVER WHEN USING IT NOT PROPERLY.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)