Bug in serendipity_track_url()

Found a bug? Tell us!!
Post Reply
ads
Regular
Posts: 93
Joined: Sun Oct 29, 2006 11:39 am

Bug in serendipity_track_url()

Post by ads »

Just tracked done a bug in the serendipity_track_url() function:

In this function, a table entry is updated which the following conditions: scheme, host, port, path, query, day, entry_id. If affected_rows() is 0, then a new entry is inserted into the statistic table. This table has an unique constraint about three of the seven columns: host, day and entry_id.

So if i have 2 URLs in a blog entry, which have the same host but different pathnames, i get a SQL error about unique key violation, because it won't match the first update but will match the unique constraint.

Bug ID on SF is: 1604918
ads
Regular
Posts: 93
Joined: Sun Oct 29, 2006 11:39 am

Re: Bug in serendipity_track_url()

Post by ads »

I just realized: this bug is still open.

Either the primary key must be changed to include the "path" column or the select must be changed to not include the "path" column.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Bug in serendipity_track_url()

Post by garvinhicking »

Hi!

In which table? For the "exits"-Table the current primary ID is set to include "path" as well, maybe an DB update wasn't executed on your DB or maybe it was only added for mysql and not postgresql properly...?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ads
Regular
Posts: 93
Joined: Sun Oct 29, 2006 11:39 am

Re: Bug in serendipity_track_url()

Post by ads »

For the "exits" table, yes. Dunno what happened, probably too long ago.
Where can i find the database change, so i can try it manually?
Post Reply