MySQL Problem, PLUGIN BUG ?!?!?! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL Problem, PLUGIN BUG ?!?!?! (
/showthread.php?tid=463990)
MySQL Problem, PLUGIN BUG ?!?!?! -
NeroX98 - 14.09.2013
Hi Guys...
I have Mysql based server with phpmyadmin... So when i've had +30 players mysql database messed up and don't load and save properly so i've closed my server... After a long time trying to fix it, i saw that the problem was mysql plugin which couldn't handle with 30+ players...
I've checked that by this code:
pawn Код:
forward ZacuvajBiznisi();
public ZacuvajBiznisi()
{
print("AsdAsd");
for(new BiznisID = 0; BiznisID < sizeof(BizzInfo); BiznisID++)
{
mysql_format(1, querybiznis, sizeof(querybiznis), "UPDATE Biznisi SET bOwned = '%d', bOwner = '%s', bMessage = '%s', bDiscription = '%s', bEntranceCost = '%d', bTill = '%d', bLocked = '%d' WHERE BiznisID = '%d'",
BizzInfo[BiznisID][bOwned],
BizzInfo[BiznisID][bOwner],
BizzInfo[BiznisID][bMessage],
BizzInfo[BiznisID][bDiscription],
BizzInfo[BiznisID][bEntranceCost],
BizzInfo[BiznisID][bTill],
BizzInfo[BiznisID][bLocked],
BiznisID);
mysql_function_query(1, querybiznis, false, "", "");
print("AsdAsd1");
}
return 1;
}
My Bizzinfo size is 50 and in my server.log ZacuvajBiznisi is called 22 times...
Код:
[21:39:47] AsdAsd
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
[21:39:47] AsdAsd1
AND SERVER CRASHES... SO IF THERE WERE 22+ Players server would CRASH !!!
What's the problem with the fcking mysql ?
I use BlueG Mysql plugin R7
Re: MySQL Problem, PLUGIN BUG ?!?!?! -
AndreT - 14.09.2013
The R7 version of the plugin, as I recall, had some issues with mysql_format. But this may very well not be the case. You could try upgrading or not using mysql_format, but normal format and then query.
Also, what is the point in calling UPDATE for each business while only just one or two might have been modified during the server runtime? Why not actually update the database when the business data changes?
Re: MySQL Problem, PLUGIN BUG ?!?!?! -
NeroX98 - 14.09.2013
OMG I use mysql_format almost everywhere... AndreT i tried this with businesses to simulate the players (the problem which i had with 30+ players)...
If i upload to the newest mysql i get error in the libmysqlclient because im on CentOS 6.4
64 bit...
BTW REP +1
I will try with format... but if i use format instead of mysql_format will be the cache cleared with
return 1?