MySQL Bug?

After an upgrade to MySQL 5.0.51b on RHEL 5 I started seeing curious results in a fairly common query. Here’s a simplified version:

SELECT ID, post_date_gmt
FROM wp_posts
GROUP BY ID
ORDER BY post_date_gmt DESC
LIMIT 5

What I expected was to get a handful of post ID numbers sorted in descending order by the post_date_gmt. Instead, I got [...]

Many Eyes, Bugs Being Shallow, All That

WordPress 2.5.1 added a really powerful feature to register_taxonomy(): automatic registration of permalinks and query vars to match the taxonomy. Well, theoretically it added that feature. It wasn’t working in practice. After some searching yesterday and today, I finally found the bug and worked up a fix. I made a diff and set off to [...]

bsuite Bug Fixes (release b2v7)

[]Work on bsuite3 is progressing well, thanks to help from Zach and Matt, who are collaborating with me on completely rearchitecting how stats are collected and reported. This, however, is not bs3. It’s a transitional release intended to fix some bugs in b2 and make upgrading easier. This upgrade is recommended for all current bsuite [...]

Displaying Google Calendars in PHP iCal

PHP iCalendar solves a couple problems I’m working on, but I needed a solution to fix the duration display for Gcal-managed ICS calendars.
As it turns out, a fix can be found in the forums, and the trick is to insert the following code in functions/ical_parser.php.

case ‘DURATION’:
if (($first_duration == TRUE) && (!stristr($field, ‘=DURATION’))) {
ereg (’^P([0-9]{1,2}[W])?([0-9]{1,2}[D])?([T]{0,1})?([0-9]{1,2}[H])?([0-9]{1,2}[M])?([0-9]{1,}[S])?’, $data, [...]

Catching Bugs Before They Catch You

I got itchy about magic quotes the other day because it’s the cause (through a fairly long cascade of errors) of some performance problems and runaways I’ve been seeing lately (pictured above).
But I deserve most of the blame for allowing a query like this to run at all:

SELECT type, data, count(*) AS hits
FROM wpopac_WPopac_bibs_atsk
WHERE data [...]

bsuite Bug Fixes (release b2v6)

[]Update: bugfix release b2v7 available.
It’s been a while since I released a new version of bsuite, my multi-purpose WordPress plugin. I’d been hoping to finish up a series of new features, but those have been delayed and this is mostly just a collection of bugfixes. This update is recommended for all bsuite users.
bsuite Features

Tracks page [...]

bsuite Bug Fixes (release b2v3)

[]I’ve fixed another bug in bsuite b2, my multi-purpose plugin. This update is recommended for all bsuite users.
Fixed

Previous versions would throw errors at the bottom of the page when the http referrer info included search words from a recognized search engine. 

Installation
Follow the directions for the bsuite b2 release. The download link there will always fetch [...]

bsuite Bug Fixes (release b2b)

[]I’ve fixed a couple bugs in bsuite b2, released last week.
Fixes

A bug with search word highlighting that caused it to litter the display in some cases. 
A silly mistake of mine that cause a mysql error for some users.

Installation
Follow the directions for the bsuite b2 release. The download link there will always fetch the current version.
Upgrades [...]