0.7.1 & SQLite Bugs

Found a bug? Tell us!!
Post Reply
loranger

0.7.1 & SQLite Bugs

Post by loranger »

Hello,

First of all I would like to say the Seredipity is an amazing blog : Efficient, Fast, Web standards compliant, and supporting a lot of cool plugins (I want more ! =p )

I installed a 0.7.1 version on a Windows XP Pro SP2. This server runs an Apache 2.0 with PHP 5.0.2 which embed SQLite 2.8.14

Everything was perfect except a request which did crash the Apache server and a second request which ad ambigious results :

The faulty request is the one which sits in the serendipity_functions.inc.php, line 795. The "left join" statement seems to disturb SQLite (PHP) a lot and crashed the Apache service. I replace all the query by the following :

Code: Select all

        $query = "SELECT
                         ec.entryid,
                         c.categoryid,
                         c.category_name,
                         c.category_description,
                         c.category_icon,
                         c.parentid
                    FROM {$serendipity['dbPrefix']}category AS c,
                         {$serendipity['dbPrefix']}entrycat AS ec
                   WHERE ec.categoryid = c.categoryid
                     AND ec.entryid IN (" . implode(', ', $search_ids) . ")";
The Server is not crashing anymore, and Serendipity is still working perfectly.

The second issue I had, also concerned the comments, but in the admin part : The query (serendipity_admin_comments.inc.php line 156) grabbing the comments contains an ambigious result field. I had to specify the table in the order statement on line 161.
I replaced the

Code: Select all

ORDER BY id DESC $limit");
with a

Code: Select all

ORDER BY c.id DESC $limit");
Now everything works well and I can now enjoy my new blog 8)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: 0.7.1 & SQLite Bugs

Post by garvinhicking »

Hi loranger!

First, thanks for your praise! We very much appreciate this!

The problem is, we can't eradicate the LEFT JOIN, it is important for entries without a category association.

I know of at least 2 others users who're using SQLite and don't seem to have that problem, so I guess this may be more a problem of your setup/sqlite version. SQLite is quite known to cause some coredumps...is your Apache2 runnin in prefork mode, as suggested with PHP?

About the second issue: Thanks, nice gotcha. I committed the fix to CVS (for our 0.8 version). :-)

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/
Post Reply