Resetting TinyStats PDF Print E-mail
User Rating: / 1
PoorBest 
Written by Datagod   
Thursday, 12 April 2007

ImageI deleted all the TinyStat data gathered for the past two weeks.  I hated doing that, but I am still in Alpha development afterall.

I inadvertantly introduced a serious error in the portion of the codebase that inserts new UserAgent records.  I translate spaces in the UserAgent to "_space_" prior to sending to the TinyStats collection script.  I then use the replace function to change the data back.  The bug was that I forgot to include the replace command in the correlated subquery.  The example below shows the correct method.  

insert into UserAgent (UserAgent)
select distinct replace(UserAgent,'_space_',' ')
  from WebLogQueue wlq
 where not exists(select 1
                    from UserAgent ua where ua.UserAgent = replace(wlq.UserAgent,'_space_',' '))

 To make a long story short, I am too time pressed to spend the hour it would take to resolve the data inconsistencies.  Hitting the reset switch is the easiest solution at this point. 

For those participating in the testing, I apologize.  It hopefully will not happen again.    Image

 

 

Hits: 2887
Comments (0)add comment

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

busy
Last Updated ( Friday, 13 April 2007 )
 
< Prev   Next >
Visit the SQL Hunter
Joomla Templates by JoomlaShack Joomla Templates
Free Ecards | Book Store | Debt Help | DVD rental | Motorhome Insurance



In My Sights Photography