SA-MP Forums Archive
[Ajuda] Mysql CMySQLConnection::Connect - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Mysql CMySQLConnection::Connect (/showthread.php?tid=552392)



Mysql CMySQLConnection::Connect - Marlon307 - 24.12.2014

Nгo tenho praticidade com sql to bem no inicio e me deparei com esse problema.
Estou usando a nova versгo do MySql R39-2 eu fui ver esse log quando coloquei a funзгo"mysql_log(LOG_ALL);" no OnGameModeInit e toda veze que liga o server aparece isso,

Код:
[07:38:08] [DEBUG] mysql_errno - connection: 1
[07:38:08] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[07:38:08] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[07:38:08] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[07:38:08] [DEBUG] CMySQLConnection::Connect - connection was successful
[07:38:08] [DEBUG] CMySQLConnection::Connect - connection was successful
[07:38:08] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[07:38:08] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
e quando eu entro no server aparece isso
Код:
[07:38:34] [DEBUG] mysql_format - connection: 1, len: 1024, format: "SELECT * FROM `contas` WHERE `usuario` = '%s'"
[07:38:34] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `contas` WHERE `usuario` = 'Swit_Cj.'", callback: "LoadSqlDados", format: "d"
[07:38:34] [DEBUG] CMySQLQuery::Execute[LoadSqlDados] - starting query execution
[07:38:34] [DEBUG] CMySQLQuery::Execute[LoadSqlDados] - query was successfully executed within 1.388 milliseconds
[07:38:34] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[07:38:34] [DEBUG] mysql_format - connection: 1, len: 1024, format: "SELECT * FROM `contas` WHERE `usuario` = '%s'"
[07:38:34] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `contas` WHERE `usuario` = 'Swit_Cj.'", callback: "q_loginRedquest", format: "d"
[07:38:34] [DEBUG] Calling callback "LoadSqlDados"..
[07:38:34] [DEBUG] CMySQLQuery::Execute[q_loginRedquest] - starting query execution
[07:38:34] [DEBUG] cache_get_data - connection: 1
[07:38:34] [DEBUG] cache_get_field_content - row: 0, field_name: "skin", connection: 1, max_len: 200
[07:38:34] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "skin", data: "270"
[07:38:34] [DEBUG] CMySQLQuery::Execute[q_loginRedquest] - query was successfully executed within 1.580 milliseconds
[07:38:34] [DEBUG] cache_get_field_content - row: 0, field_name: "Admin", connection: 1, max_len: 200
[07:38:34] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[07:38:34] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Admin", data: "5"
[07:38:34] [DEBUG] cache_get_field_content - row: 0, field_name: "CasaX", connection: 1, max_len: 200
[07:38:34] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CasaX", data: "-2014.16"
[07:38:34] [DEBUG] cache_get_field_content - row: 0, field_name: "CasaY", connection: 1, max_len: 200
[07:38:34] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CasaY", data: "152.987"
[07:38:34] [DEBUG] cache_get_field_content - row: 0, field_name: "CasaZ", connection: 1, max_len: 200
[07:38:34] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CasaZ", data: "27.688"
[07:38:34] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[07:38:34] [DEBUG] Calling callback "q_loginRedquest"..
[07:38:34] [DEBUG] cache_get_data - connection: 1
[07:38:34] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[07:38:39] [DEBUG] mysql_format - connection: 1, len: 1024, format: "SELECT * FROM `contas` WHERE `usuario` = '%s' AND `senha` = '%s'"
[07:38:39] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `contas` WHERE `usuario` = 'Swit_Cj.' AND `senha` ", callback: "q_verifyPassword", format: "d"
[07:38:39] [DEBUG] CMySQLQuery::Execute[q_verifyPassword] - starting query execution
[07:38:39] [DEBUG] CMySQLQuery::Execute[q_verifyPassword] - query was successfully executed within 1.105 milliseconds
[07:38:39] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[07:38:39] [DEBUG] Calling callback "q_verifyPassword"..
[07:38:39] [DEBUG] cache_get_data - connection: 1
[07:38:40] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[07:38:44] [DEBUG] mysql_format - connection: 1, len: 1024, format: "UPDATE `contas` SET `skin` = '%d' WHERE `usuario` = '%s'"
[07:38:44] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `contas` SET `skin` = '270' WHERE `usuario` = 'Swit_Cj.'", callback: "(null)", format: "(null)"
[07:38:44] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[07:38:44] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 112.400 milliseconds
[07:38:44] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving



Re: Mysql CMySQLConnection::Connect - PT - 24.12.2014

o tipo ALL vai fazer debug de todas as acoes executadas.

coloque

pawn Код:
mysql_log(loglevel = LOG_ERROR | LOG_WARNING, logtype = LOG_TYPE_HTML);
se quiser apenas que mostre os warnings e erros num ficheiro HTML se preferir um ficheiro texto coloque

logtype = LOG_TYPE_TEXT


Re: Mysql CMySQLConnection::Connect - Marlon307 - 24.12.2014

Aproveitando o tуpico gostaria de saber porque isso acontece sу no meu server. Jб fiz teste em outros server e nгo fica bugado assim.

https://www.youtube.com/watch?v=EYFV...JD0Lo4WU6BrYAg


Re: Mysql CMySQLConnection::Connect - PT - 24.12.2014

Pode ser a sua OnPlayerDeath ou OnPlayerTakeDamage que esteja bugada, confira bem os sistemas que tem em ambas para saber mais.

Voce usa crashdetect? Se sim, ele gera algum debug?

#Feliz Natal.