Server restart
#1

i've a big probleeemm: sometimes the server restarts unexpectedly

I think here is the problem but i don't know who cause it

Mysql log:
Код:
[12:48:41] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''''' at line 1
[13:07:06] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1
[13:13:54] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[13:52:40] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[14:15:13] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[14:15:31] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[14:15:59] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[14:38:37] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[14:57:01] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[15:19:31] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[15:24:59] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[15:26:30] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[15:28:38] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[15:36:05] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[15:45:18] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[15:47:50] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''\'' at line 1
[15:52:03] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1
[16:13:32] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[16:14:49] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''''' at line 1
[16:22:51] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[16:23:33] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[16:23:36] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[16:23:36] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[16:24:29] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
Reply
#2

Post the related stock.
Reply
#3

I don't know where's stock
I think #1064 means something..
Reply
#4

Quote:
Originally Posted by Harty
Посмотреть сообщение
stock.
Quote:
Originally Posted by Addons
Посмотреть сообщение
stock
Function*; the stock keyword is a function modifier. There isn't such a thing as 'a stock' when describing a function.
Show me the code where you send the SQL query and the function where you process the retrieved data.

EDIT: the log you provided, is that the log before the server restarts or after? If it's after, then you might want to check what happens before it restarts.
Reply
#5

before.
You mean
Код:
public MySQLCheckAccount(sqlplayersname[])
{
	new query[128];
	new escstr[MAX_PLAYER_NAME];
	mysql_real_escape_string(sqlplayersname, escstr);
	format(query, sizeof(query), "SELECT `ID` FROM users WHERE `name` = '%s'", escstr);
	mysql_query(SQL,query);
	mysql_store_result();
	if (mysql_num_rows()==0)
	{
	    mysql_free_result();
		return 0;
	}
	else
	{
		new strid[32];
		new intid;
		mysql_fetch_row(strid);
		intid = strval(strid);
	    mysql_free_result();
		return intid;
	}
}
?
Reply
#6

What version of MySQL are you even using? Update the include, plugin and syntax in your script. The connection is probably not closed upon OnGameModeExit.
Reply
#7

I use Mysql R5. Crashdetect will help me to detect the error source?
Reply
#8

Код HTML:
public MySQLCheckAccount(sqlplayersname[])
{
         new gQuery[128];
    gQuery[0] = (EOS);
	new escstr[MAX_PLAYER_NAME];
	mysql_escape_string(sqlplayersname, escstr);
	mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT `ID` FROM `users` WHERE `name` = '%s' LIMIT 1", escstr);
	new Cache:result = mysql_query(SQL, gQuery);
	if(cache_num_rows())
	{
	    cache_delete(result);
		return 1;
	}
	cache_delete(result);
	return 0;
}
Reply
#9

this make server restart?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)