Error in log parsing

General forum for discussions regarding UTStatsDB
zzz0o
Posts: 5
Joined: Fri Oct 24, 2008 3:08 am
Location: Ukraine
Contact:

Error in log parsing

Postby zzz0o » Fri Oct 24, 2008 3:24 am

Hi

I had utstatsdb v1.03 and it worked perfectly. After ubgrade to v1.05, i update database using admin panel, and after that log parser is brakes. I get error message:

Code: Select all

*Error in database query: 'INSERT INTO ut_matches VALUES (NULL,2,'3369',6,1,0,'2008-10-23 14:08:17','2008-10-24+00:58:37',0,'Stats_8888_2008_10_23_14_08_17.log',110,0,0,-1,'DMMutator, NoSuperWeapon,NoAdrenaline,UTComp,+UTComp_GameRules',1,1,0,15,0,1,0,4,0,0,'0','',1,0,1,0,1,1, 0,4292200,99100,2,37,37,2,0,0,0,0,0,23,0,0)' 1136: Column count doesn't match value count at row 1
describe ut_matches; gives me answer:
<skiped>
47 rows in set (0.02 sec)

How can i fix database, or logs.php ?
If a make reinitialize database all works correct, by i don't want loss statictics.

freebsd7.0
mysql-server-5.0.67_1
php5-5.2.6
apache-2.2.9_5

Panther
Site Admin
Posts: 500
Joined: Sat Dec 08, 2007 12:51 am
Contact:

Re: Error in log parsing

Postby Panther » Fri Oct 24, 2008 4:12 am

There should be 48 rows. When you did the upgrade, are you certain there were no errors? When you go to the admin screen does it no longer show that you need to upgrade the database?
Please show me the full list of rows when you do the 'describe ut_matches'.

zzz0o
Posts: 5
Joined: Fri Oct 24, 2008 3:08 am
Location: Ukraine
Contact:

Re: Error in log parsing

Postby zzz0o » Fri Oct 24, 2008 4:39 am

There is no field "upgrade db" in the admin pannel now and no errors then a did upgrade db. But, may be, i paid no attention on error message.

Think, if I manualy add the missing row logs.php will work again.

Code: Select all

+------------------------+ | Field | +------------------------+ | gm_num | | gm_server | | gm_serverversion | | gm_map | | gm_type | | gm_uttype | | gm_init | | gm_start | | gm_logger | | gm_logname | | gm_rpg | | gm_maxwave | | gm_difficulty | | gm_mutators | | gm_mapvoting | | gm_kickvoting | | gm_fraglimit | | gm_timelimit | | gm_overtime | | gm_minplayers | | gm_translocator | | gm_endtimedelay | | gm_balanceteams | | gm_playersbalanceteams | | gm_friendlyfirescale | | gm_linksetup | | gm_gamespeed | | gm_healthforkills | | gm_allowsuperweapons | | gm_camperalarm | | gm_allowpickups | | gm_allowadrenaline | | gm_fullammo | | gm_starttime | | gm_length | | gm_numplayers | | gm_kills | | gm_deaths | | gm_suicides | | gm_numteams | | gm_tscore0 | | gm_tscore1 | | gm_tscore2 | | gm_tscore3 | | gm_firstblood | | gm_headshots | | gm_status | +------------------------+ 47 rows in set (0.02 sec)

Panther
Site Admin
Posts: 500
Joined: Sat Dec 08, 2007 12:51 am
Contact:

Re: Error in log parsing

Postby Panther » Fri Oct 24, 2008 5:14 am

The only concern is the possibility that something else didn't updated, but if it's just the one table you're missing then the following should work for you:

ALTER TABLE ut_matches ADD gm_timeoffset float unsigned NOT NULL default 100 AFTER gm_logname;
UPDATE ut_matches SET gm_timeoffset=110;
UPDATE ut_matches SET gm_timeoffset=118.25 WHERE gm_serverversion=436 OR gm_serverversion=451;

Panther
Site Admin
Posts: 500
Joined: Sat Dec 08, 2007 12:51 am
Contact:

Re: Error in log parsing

Postby Panther » Fri Oct 24, 2008 5:18 am

Before you do the above, I would first run:
SELECT value FROM ut_config WHERE conf='Version';

Check to make sure the database version is in fact 3.05.

zzz0o
Posts: 5
Joined: Fri Oct 24, 2008 3:08 am
Location: Ukraine
Contact:

Re: Error in log parsing

Postby zzz0o » Fri Oct 24, 2008 6:36 am

I checked version, looks normal. Then added new row - gm_timeoffset and now logs.php work again, thank you very much. Also gone away some php warnings which have appeared at the 'Matches' selection.

May be i get this trouble, becouse i used stats v1.03 then update to v1.05 over one branch v1.04

Any way, problem solved, thanks for help.

Panther
Site Admin
Posts: 500
Joined: Sat Dec 08, 2007 12:51 am
Contact:

Re: Error in log parsing

Postby Panther » Fri Oct 24, 2008 6:42 am

The updater updates one version at a time, so it doesn't matter how many versions you skip.
There's a good chance that some updates have not been completed on your system for some reason. If you've backups saved of your logs I recommend a complete reinitialize of your database.


Return to “UTStatsDB”