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

Just wondering, can the MySQL lag out due to that fact that it I'm loading 300 rows at a constant like almost instantly, and the server seems to lag out after they are done, can this be the mysql server itself? or is this a problem with the loop loading and then going through a second function to create objects?
Reply

Quote:
Originally Posted by Riddy
View Post
Just wondering, can the MySQL lag out due to that fact that it I'm loading 300 rows at a constant like almost instantly, and the server seems to lag out after they are done, can this be the mysql server itself? or is this a problem with the loop loading and then going through a second function to create objects?
Hard to say. It also depends how many columns you are loading (the number of fields fetched by the query is important, rows*columns). However, it's likely that the MySQL plugin causes this if the lag occurs before the result-callback is called. Why don't you use the profiler plugin or just disable the object creating code and find the cause?
Reply

Quote:
Originally Posted by maddinat0r
View Post
Hard to say. It also depends how many columns you are loading (the number of fields fetched by the query is important, rows*columns). However, it's likely that the MySQL plugin causes this if the lag occurs before the result-callback is called. Why don't you use the profiler plugin or just disable the object creating code and find the cause?
Disabled the creation of the objects, and it has a slight lag on localhost, but I've noticed on a bought server, it completely lags out, it takes time for other queries to be executed such as looking up the db for a certain player, even after the queries are complete for the objects.

EDIT: Mind, I am using cache for this.
Reply

Quote:
Originally Posted by ombre
View Post
I run on debian 7 64b and R5 mysql plugin I need the plugin for debian 5 or x86 or other?
Use R6. Also, it is recommended to use R34 (latest). Don't know if it will work fine on Debian 7, it will need to be compiled again.
Reply

Quote:
Originally Posted by IstuntmanI
View Post
Use the static version.
Thanks, it's working now
Reply

Cause I wasnt able to recover a value with a query like
Код:
 mysql_format(mysql, query, sizeof(query), "INSERT INTO `joueurs` (`Username`, `Password`, `IP`, `Admin`, `VIP`, `Argent`, `posX` ,`posY`, `posZ`, `Interieur`, `World`, `Skin`, `Niveau`) VALUES ('%e', '%s', '%s', 0, 0, 1000, 1527.5634, -1738.9218, 13.5469, 0, 0, 26, 1)", Name[playerid], pInfo[playerid][Password], IP[playerid]);
mysql_tquery(mysql, query, "", "");

mysql_format(mysql, query, sizeof(query), "SELECT `posX`, `posY` FROM `joueurs` WHERE `posX` = '%f', `posY` = '%f'", pInfo[playerid][posX], pInfo[playerid][posY]);
printf("%f %f ", pInfo[playerid][posX], pInfo[playerid][posY]);
With my code, It always return me 0 instead of the positionX and positionY.




Do you know why ?
Reply

Quote:
Originally Posted by anou1
Посмотреть сообщение
Cause I wasnt able to recover a value with a query like
Код:
 mysql_format(mysql, query, sizeof(query), "INSERT INTO `joueurs` (`Username`, `Password`, `IP`, `Admin`, `VIP`, `Argent`, `posX` ,`posY`, `posZ`, `Interieur`, `World`, `Skin`, `Niveau`) VALUES ('%e', '%s', '%s', 0, 0, 1000, 1527.5634, -1738.9218, 13.5469, 0, 0, 26, 1)", Name[playerid], pInfo[playerid][Password], IP[playerid]);
mysql_tquery(mysql, query, "", "");

mysql_format(mysql, query, sizeof(query), "SELECT `posX`, `posY` FROM `joueurs` WHERE `posX` = '%f', `posY` = '%f'", pInfo[playerid][posX], pInfo[playerid][posY]);
printf("%f %f ", pInfo[playerid][posX], pInfo[playerid][posY]);
With my code, It always return me 0 instead of the positionX and positionY.


Do you know why ?
Where exactly did it returned 0? Did you mean that the query isn't returning any result?
Reply

I tried to explain it more there:

https://sampforum.blast.hk/showthread.php?tid=487488

Thank you for your help !
Reply

if my gamemode is scripted for the r6 and I install the R34 what's happen?

because i use:

mysql_fetch_int
mysql_query
OnQueryFinish

And I see it's not used for the r7
Reply

libmysqlclient.so.15 ( or more ) is compulsory because I don't have but the plugin work's why?
Reply

Quote:
Originally Posted by ombre
Посмотреть сообщение
libmysqlclient.so.15 ( or more ) is compulsory because I don't have but the plugin work's why?
That library is already there or while using static plugin it works fine (Not confirmed). If it is working fine, so don't worry about it.
Reply

hello guys ...
i have a rpg server using mysql system
my database have 8 Tables every have 20 columns + 1 Table have 200 columns
and that 9 tables update every 5 minutes(save every players and houses and more stats in server)
i want buy this VPS and run this gamemode on it:
Ram: 2GB
Cpu: 2 Core 2.0 Ghz(intel E5)
can i run this server without problems on this vps?
i think mysql queries needs best hardware! but i need your help,
plz say yes or no with reason?!
Reply

No, mysql don't need the best hardware. This config is good
Reply

Quote:
Originally Posted by rouzbeh
Посмотреть сообщение
hello guys ...
i have a rpg server using mysql system
my database have 8 Tables every have 20 columns + 1 Table have 200 columns
and that 9 tables update every 5 minutes(save every players and houses and more stats in server)
i want buy this VPS and run this gamemode on it:
Ram: 2GB
Cpu: 2 Core 2.0 Ghz(intel E5)
can i run this server without problems on this vps?
i think mysql queries needs best hardware! but i need your help,
plz say yes or no with reason?!
I'm running my server on 1 core CPU and it's quite fast. No need to worry.
Reply

Please Update R5 for 0.3z R2
Reply

Quote:
Originally Posted by eLiTe.
Посмотреть сообщение
Please Update R5 for 0.3z R2
MySQL plugin doesn't even touches the new callbacks and why would they even update such old revision?
Reply

Solved
Hi there,
I change my windows to 8.1 64bit Enterprise,
When i run sa-mp server i reached an error: MSVCP110.dll is missing blah blah ...
I download this dll file and put it to System32 and SysWOW64 and when i want to run samp-server i reach this:
Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3z-RC3, ©2005-2014 SA-MP Team

[14:20:47] 
[14:20:47] Server Plugins
[14:20:47] --------------
[14:20:47]  Loading plugin: streamer
[14:20:47] 

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[14:20:47]   Loaded.
[14:20:47]  Loading plugin: mysql
[14:20:47]   Failed.
[14:20:47]  Loading plugin: crashdetect
[14:20:47]   CrashDetect v4.13 is OK.
[14:20:47]   Loaded.
[14:20:47]  Loaded 2 plugins.

[14:20:47] 
[14:20:47] Filterscripts
[14:20:47] ---------------
[14:20:47]   Loaded 0 filterscripts.

[14:20:47] [debug] Run time error 19: "File or function is not found"
[14:20:47] [debug]  cache_get_row_count
[14:20:47] [debug]  cache_get_row
[14:20:47] [debug]  mysql_tquery
[14:20:47] [debug]  cache_get_row_int
[14:20:47] [debug]  cache_get_row_float
[14:20:47] [debug]  mysql_log
[14:20:47] [debug]  mysql_connect
[14:20:47] [debug]  cache_insert_id
[14:20:47] [debug] Run time error 19: "File or function is not found"
[14:20:47] [debug]  cache_get_row_count
[14:20:47] [debug]  cache_get_row
[14:20:47] [debug]  mysql_tquery
[14:20:47] [debug]  cache_get_row_int
[14:20:47] [debug]  cache_get_row_float
[14:20:47] [debug]  mysql_log
[14:20:47] [debug]  mysql_connect
[14:20:47] [debug]  cache_insert_id
[14:20:47] Script[gamemodes/lol.amx]: Run time error 19: "File or function is not found"
[14:20:47] Number of vehicle models: 0
i already run dll files fixer and fix msvcp110.dll but, still same ... i download all vcredist(Visual C++ Redistributable 64bit and 32bit) and install them and restart, ...., but still the same problem...
I am using R34 version
Help...
Reply

The best thing is not to download those .dll's separately, just download the package instead. Just check if you have 'Visual C++ 2012', x86 and x64.
Reply

Quote:
Originally Posted by iZN
Посмотреть сообщение
The best thing is not to download those .dll's separately, just download the package instead. Just check if you have 'Visual C++ 2012', x86 and x64.
Quote:
Originally Posted by Aliassassin123456
Посмотреть сообщение
i download all vcredist(Visual C++ Redistributable 64bit and 32bit) and install them and restart, ...., but still the same problem...
I am using R34 version
Help...
I already dl and install that .. update4 32bit and 64bit ... + My windows is fully up to date
Reply

Do you have both libmysql and mysql dll's?

#e: Oh, I'm Mysql plugin topic
Reply


Forum Jump:


Users browsing this thread: 32 Guest(s)