Upgrade MySQL 5.0 to 5.1 on FreeBSD

Uncategorized — Titus Barik on June 13, 2009 at 4:20 pm

You can upgrade MySQL 5.0 to MySQL 5.1 on FreeBSD using portupgrade as follows:

  1. portupgrade -o databases/mysql51-client databases/mysql50-client
  2. portupgrade -o databases/mysql51-server databases/mysql50-server
  3. mysql_upgrade -u root -p

Post Order Broken in WordPress 2.7.1

Uncategorized — Titus Barik on June 5, 2009 at 2:25 pm

Ah, more obscure bugs to try to deal with. I have a blog, running WordPress 2.7.1, that will not show posts in the correct, descending chronological order. Instead, I see the following:

  1. May 6th, 2009
  2. June 5th, 2009
  3. May 15th, 2009
  4. May 1st, 2009

Notice that the post from May 6th comes before the posts from June 5th or May 15th. Furthermore, this problem seems to only occur on the main index.php page. When filtering the archive by date it works fine. The problem also seems to happen regardless of the theme being used.

The version of MySQL running on this system is mysql Ver 14.12 Distrib 5.0.81, for portbld-freebsd7.2 (i386) using 5.2. The PHP version is PHP Version 5.2.9.

Update Ah ha, it isn’t a bug in WordPress at all. Some hapless user set the Sticky flag for the post for some arbitrary reason, causing it to always appear at the top of the page.

titus@barik.net | The Weblog of Titus Barik