Nezd Posted July 8, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 4 Reputation: 0 Joined: 07/08/12 Last Seen: March 11, 2020 Share Posted July 8, 2012 Уже не первый рза наблюдаю проблему у новых ревизий афины. : DB error - Using unsupported buffer type: 1615701 (parameter: 3)[Debug]: at c:\users\hostuser030\desktop\eathena\src\login\account_sql.c:637 - UPDATE `login` SET `userid`=?,`user_pass`=?,`sex`=?,`email`=?,`level`=?,`state`=?,`unban_time`=?,`expiration_time`=?,`logincount`=?,`lastlogin`=?,`last_ip`=?,`birthdate`=? WHERE `account_id` = '1'[status]: Connection of the char-server '' accepted.Посмотрел, почитал в инете информацию, проблема явно связана с версией сервера mysql, версия сервера 5.5, но почемуто проблемы получились только недавно...Строка на которую указывает ошибка:SqlStmt_ShowDebug(stmt);Кусок кода целиком:static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, bool is_new){ Sql* sql_handle = db->accounts; SqlStmt* stmt = SqlStmt_Malloc(sql_handle); bool result = false; int i; // try do { if( SQL_SUCCESS != Sql_QueryStr(sql_handle, "START TRANSACTION") ) { Sql_ShowDebug(sql_handle); break; } if( is_new ) {// insert into account table if( SQL_SUCCESS != SqlStmt_Prepare(stmt, "INSERT INTO `%s` (`account_id`, `userid`, `user_pass`, `sex`, `email`, `level`, `state`, `unban_time`, `expiration_time`, `logincount`, `lastlogin`, `last_ip`, `birthdate`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", db->account_db) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 0, SQLDT_INT, (void*)&acc->account_id, sizeof(acc->account_id)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 1, SQLDT_STRING, (void*)acc->userid, strlen(acc->userid)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 2, SQLDT_STRING, (void*)acc->pass, strlen(acc->pass)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 3, SQLDT_ENUM, (void*)&acc->sex, sizeof(acc->sex)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 4, SQLDT_STRING, (void*)&acc->email, strlen(acc->email)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 5, SQLDT_INT, (void*)&acc->level, sizeof(acc->level)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 6, SQLDT_UINT, (void*)&acc->state, sizeof(acc->state)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 7, SQLDT_LONG, (void*)&acc->unban_time, sizeof(acc->unban_time)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 8, SQLDT_INT, (void*)&acc->expiration_time, sizeof(acc->expiration_time)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 9, SQLDT_UINT, (void*)&acc->logincount, sizeof(acc->logincount)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 10, SQLDT_STRING, (void*)&acc->lastlogin, strlen(acc->lastlogin)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 11, SQLDT_STRING, (void*)&acc->last_ip, strlen(acc->last_ip)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 12, SQLDT_STRING, (void*)&acc->birthdate, strlen(acc->birthdate)) || SQL_SUCCESS != SqlStmt_Execute(stmt) ) { SqlStmt_ShowDebug(stmt); break; } } else {// update account table if( SQL_SUCCESS != SqlStmt_Prepare(stmt, "UPDATE `%s` SET `userid`=?,`user_pass`=?,`sex`=?,`email`=?,`level`=?,`state`=?,`unban_time`=?,`expiration_time`=?,`logincount`=?,`lastlogin`=?,`last_ip`=?,`birthdate`=? WHERE `account_id` = '%d'", db->account_db, acc->account_id) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 0, SQLDT_STRING, (void*)acc->userid, strlen(acc->userid)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 1, SQLDT_STRING, (void*)acc->pass, strlen(acc->pass)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 2, SQLDT_ENUM, (void*)&acc->sex, sizeof(acc->sex)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 3, SQLDT_STRING, (void*)acc->email, strlen(acc->email)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 4, SQLDT_INT, (void*)&acc->level, sizeof(acc->level)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 5, SQLDT_UINT, (void*)&acc->state, sizeof(acc->state)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 6, SQLDT_LONG, (void*)&acc->unban_time, sizeof(acc->unban_time)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 7, SQLDT_LONG, (void*)&acc->expiration_time, sizeof(acc->expiration_time)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 8, SQLDT_UINT, (void*)&acc->logincount, sizeof(acc->logincount)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 9, SQLDT_STRING, (void*)&acc->lastlogin, strlen(acc->lastlogin)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 10, SQLDT_STRING, (void*)&acc->last_ip, strlen(acc->last_ip)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 11, SQLDT_STRING, (void*)&acc->birthdate, strlen(acc->birthdate)) || SQL_SUCCESS != SqlStmt_Execute(stmt) ) { SqlStmt_ShowDebug(stmt); break; } } // remove old account regs if( SQL_SUCCESS != Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `type`='1' AND `account_id`='%d'", db->accreg_db, acc->account_id) ) { Sql_ShowDebug(sql_handle); break; } // insert new account regs if( SQL_SUCCESS != SqlStmt_Prepare(stmt, "INSERT INTO `%s` (`type`, `account_id`, `str`, `value`) VALUES ( 1 , '%d' , ? , ? );", db->accreg_db, acc->account_id) ) { SqlStmt_ShowDebug(stmt); break; } for( i = 0; i < acc->account_reg2_num; ++i ) { if( SQL_SUCCESS != SqlStmt_BindParam(stmt, 0, SQLDT_STRING, (void*)acc->account_reg2[i].str, strlen(acc->account_reg2[i].str)) || SQL_SUCCESS != SqlStmt_BindParam(stmt, 1, SQLDT_STRING, (void*)acc->account_reg2[i].value, strlen(acc->account_reg2[i].value)) || SQL_SUCCESS != SqlStmt_Execute(stmt) ) { SqlStmt_ShowDebug(stmt); break; } } if( i < acc->account_reg2_num ) { result = false; break; } // if we got this far, everything was successful result = true; } while(0); // finally result &= ( SQL_SUCCESS == Sql_QueryStr(sql_handle, (result == true) ? "COMMIT" : "ROLLBACK") ); SqlStmt_Free(stmt); return result;}Мне кажется проблема связана с добавлением последнего пункта в базу деньрождения, если кто может чем помочь скажите куда копать... Quote Link to comment Share on other sites More sharing options...
Lilith Posted July 8, 2012 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 407 Reputation: 159 Joined: 11/18/11 Last Seen: November 15, 2014 Share Posted July 8, 2012 Используйте тег codebox Проблема точно не в ревизии эмулятора. Как компилировали эмулятор? Пробовали ставить все базы заново? Если не помогает, то пробуйте переустановить MySQL. Quote Link to comment Share on other sites More sharing options...
Tiera Posted July 9, 2012 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 103 Reputation: 37 Joined: 12/15/11 Last Seen: January 10, 2020 Share Posted July 9, 2012 Какая версия эмулятора, как давно обновлял? Quote Link to comment Share on other sites More sharing options...
Nezd Posted July 9, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 4 Reputation: 0 Joined: 07/08/12 Last Seen: March 11, 2020 Author Share Posted July 9, 2012 Последняя версия, компилятор 2010 студия, прккрастно работал и работает, проб лема в новых ревизиях. Начиная с мая 2012 начались такие вот ошибки с переодичностью в неделю. неделю нет ошиок неделю есть. Quote Link to comment Share on other sites More sharing options...
Tiera Posted July 9, 2012 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 103 Reputation: 37 Joined: 12/15/11 Last Seen: January 10, 2020 Share Posted July 9, 2012 Если последняя версия эмулятора, то проверь таблицу login, там не должно быть поля level, вместо него теперь group_id. Quote Link to comment Share on other sites More sharing options...
Lilith Posted July 9, 2012 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 407 Reputation: 159 Joined: 11/18/11 Last Seen: November 15, 2014 Share Posted July 9, 2012 Если последняя версия эмулятора, то проверь таблицу login, там не должно быть поля level, вместо него теперь group_id. В таком случае была бы ошибка типа DB error - Unknown column 'group_id' in 'field list' И чар сервер бы вообще не запускался Quote Link to comment Share on other sites More sharing options...
Tiera Posted July 10, 2012 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 103 Reputation: 37 Joined: 12/15/11 Last Seen: January 10, 2020 Share Posted July 10, 2012 Да, ты прав, не внимательно посмотрела. Может моды какие стоят? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.