if(mysql_ping() ==-1) { print("[MYSQL-DEAD] Reconnect"); mysql_reconnect(); }
new query[MAX_STRING]; format(query,sizeof(query)," UPDATE players SET PlayerLevel=%d,AdminLevel=%d,Sex=%d,Age=%d,Money=%d,Kills=%d,...,..., etc. a lot of data (over 35) WHERE id=%d", PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pSex], PlayerInfo[playerid][pAge], PlayerInfo[playerid][pCash], PlayerInfo[playerid][pKills], .... etc. a lot of data (over 50) .... PlayerInfo[playerid][pSQLID]); mysql_query(query);
error 075: input line too long (after substitutions)
format(query,sizeof(query)," UPDATE players SET PlayerLevel=%d,AdminLevel=%d,Sex=%d,Age=%d,Money=%d,Kills=%d,...,..., etc. a lot of data (over 35) WHERE id=%d",
I'm doing in my script, save the data in the player database.
Makes a request of this kind in Public updateaccount: Код:
new query[MAX_STRING]; format(query,sizeof(query)," UPDATE players SET PlayerLevel=%d,AdminLevel=%d,Sex=%d,Age=%d,Money=%d,Kills=%d,...,..., etc. a lot of data (over 35) WHERE id=%d", PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pSex], PlayerInfo[playerid][pAge], PlayerInfo[playerid][pCash], PlayerInfo[playerid][pKills], .... etc. a lot of data (over 50) .... PlayerInfo[playerid][pSQLID]); mysql_query(query); Код:
error 075: input line too long (after substitutions) Код:
format(query,sizeof(query)," UPDATE players SET PlayerLevel=%d,AdminLevel=%d,Sex=%d,Age=%d,Money=%d,Kills=%d,...,..., etc. a lot of data (over 35) WHERE id=%d", That request to be as fast, optimized, does not create lag and did not create big server load and server mysql load. |
mysql_ping function crashes sometimes my server. :-$
Код:
if(mysql_ping() ==-1) { print("[MYSQL-DEAD] Reconnect"); mysql_reconnect(); } |
I changed to R6 plugin. It still says R5 plugin loaded when I run the server.
Is there wrong file compiled, or is it just forgotten to change that text in plugin? |
If you compiled it from source, the version string isn't updated/changed with the string "R6" (if that annoys you, you can change that yourself).
But if you compare the source code with the previous version(R5), you'll see that there's a mutex implementation. Код:
while(true) { Mutex::getInstance()->_lockMutex(); |
Hi, our problems seem very similar (read my post on the previous page) It may be a problem with reconnecting instead of what I thought (reloading fs), hopefully this will be fixed, in the meantime, i'm using R5. does yours work in R5?
|
native mysql_is_stored_result( [connectionHandle = 1] );
forward OnQueryStart( query[], resultid, extraid, connectionHandle );
public OnQueryStart(query[], resultid, extraid, connectionHandle)
{
if(mysql_is_result_stored()) mysql_free_result();
return 1;
}
[10:56:19] Loading plugin: mysql.so [10:56:19] Failed (plugins/mysql.so: symbol _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_i, version GLIBCXX_3.4.9 not defined in file libstdc++.so.6 with link time reference)
[00:46:02] [00:46:02] --------------------------- [00:46:02] MySQL Debugging activated (07/19/11) [00:46:02] --------------------------- [00:46:02] [00:46:02] >> mysql_connect( ) [00:46:02] CMySQLHandler::CMySQLHandler() - constructor called. [00:46:02] CMySQLHandler::CMySQLHandler() - Connecting to "sql102.0fees.net" | DB: "fees0_8346974_jban" | Username: "fees0_8346974" ... [00:46:23] CMySQLHandler::Connect() - Can't connect to MySQL server on 'sql102.0fees.net' (10060) (Error ID: 2003) [00:46:23] >> mysql_ping( Connection handle: 1 ) [00:46:23] CMySQLHandler::Ping() - You cannot call this function now. (Reason: Dead Connection) [00:46:23] CMySQLHandler::~CMySQLHandler() - deconstructor called. [00:46:23] CMySQLHandler::FreeResult() - There is nothing to free (Reason: Connection is dead) [00:46:23] CMySQLHandler::Disconnect() - You cannot call this function now. (Reason: Connection is dead)
mysql_format(iQuery2, "INSERT INTO `playerbans` (`BannedName`, `BannedIP`, `Reason`, `Date`, `Admin`) VALUES ('%s', '%e', '%s', '%s', '%e')", "IP Ban", params, "No Reason Given", iStamp(), PNames[playerid]);
//format(iQuery2, sizeof(iQuery2), "INSERT INTO `playerbans` (`BannedName`, `BannedIP`, `Reason`, `Date`, `Admin`) VALUES ('%s', '%s', '%s', '%s', '%s')", "IP Ban", params, "No Reason Given", iStamp(), PNames[playerid]);
mysql_query(iQuery2);
If I understand this correctly, mysql_format() does the escaping for you so there's no need to sanitize inputs before using them and formats the string all in one?
|