Здравствуйте, юзаю основу l2j + свои наработки с ребятами..
так вот... не знаю что делать, было все хорошо, потом стреслась проблема с БД, я ее устранил, но после того случая
ЛЮБЫЕ значения в clanhall__functions или castle_functions ВНОСИТЬСЯ с бешаной скоростью N ое количество раз!!!
и Цп уходит в 100%.
Кусок кода из Clanhall.java
Код
public void dbSave(boolean newFunction)
{
Connection con = null;
try
{
PreparedStatement statement;
con = L2DatabaseFactory.getInstance().getConnection();
if (newFunction)
{
statement = con.prepareStatement("INSERT INTO clanhall_functions (hall_id, type, lvl, lease, rate, endTime) VALUES (?,?,?,?,?,?)");
statement.setInt(1, getId());
statement.setInt(2, getType());
statement.setInt(3, getLvl());
statement.setInt(4, getLease());
statement.setLong(5, getRate());
statement.setLong(6, getEndTime());
}
else
{
statement = con.prepareStatement("UPDATE clanhall_functions SET lvl=?, lease=?, endTime=? WHERE hall_id=? AND type=?");
statement.setInt(1, getLvl());
statement.setInt(2, getLease());
statement.setLong(3, getEndTime());
statement.setInt(4, getId());
statement.setInt(5, getType());
}
statement.execute();
statement.close();
}
catch (Exception e)
{
_log.log(Level.SEVERE, "Exception: ClanHall.updateFunctions(int type, int lvl, int lease, long rate, long time, boolean addNew): "
+ e.getMessage(), e);
}
finally
{
try
{
con.close();
}
catch (Exception e)
{
}
}
}
}
сами ошибки в MYSQL log
Код
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235285 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235285 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235285 WHERE hall_id=48 AND type=8
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235285 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235286 WHERE hall_id=48 AND type=8
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235286 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235286 WHERE hall_id=48 AND type=8
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235286 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235286 WHERE hall_id=48 AND type=8
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235286 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235286 WHERE hall_id=48 AND type=8
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235287 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235287 WHERE hall_id=48 AND type=8
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235287 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235287 WHERE hall_id=48 AND type=8
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235287 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235287 WHERE hall_id=48 AND type=8
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235287 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235287 WHERE hall_id=48 AND type=8
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235287 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235288 WHERE hall_id=48 AND type=8
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235288 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235288 WHERE hall_id=48 AND type=8
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235288 WHERE hall_id=48 AND type=8
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235288 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235288 WHERE hall_id=48 AND type=8
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235288 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235288 WHERE hall_id=48 AND type=8
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235289 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235289 WHERE hall_id=48 AND type=8
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235289 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235289 WHERE hall_id=48 AND type=8
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235289 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235289 WHERE hall_id=48 AND type=8
1838 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235289 WHERE hall_id=48 AND type=8
2457 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235289 WHERE hall_id=48 AND type=8
2455 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235290 WHERE hall_id=48 AND type=8
2457 Query UPDATE clanhall_functions SET lvl=2, lease=0, endTime=1254561235290 WHERE hall_id=48 AND type=8