Last modified: 2012-04-12 13:54:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T27746, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25746 - categories don't work with the sqlite backend?
categories don't work with the sqlite backend?
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Categories (Other open bugs)
1.16.x
All All
: Normal major (vote)
: ---
Assigned To: Max Semenik
:
Depends on:
Blocks: sqlite
  Show dependency treegraph
 
Reported: 2010-11-01 23:13 UTC by phil
Modified: 2012-04-12 13:54 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
sqlite database that reproduces the bug (for me) (661.00 KB, application/octet-stream)
2010-11-02 21:52 UTC, phil
Details

Description phil 2010-11-01 23:13:22 UTC
I made a clean 1.16.0 install using an sqlite backend, then created a page that contained only:

[[Category:Tests]]

The "Category: Tests" link appeared correctly at the bottom of the page, but the Category:Tests page itself says only "This category currently contains no pages or media."

A repeat of the same test on a MySQL installation behaves correctly.

From my quick, ignorant poking at the DB, it looks ok -- both the categories and categorylinks tables have sensible-looking rows in them -- but I really have no experience here.

Interestingly, sub-categories do work correctly -- which makes me wonder if it's a side-effect of whatever was done to fix bug 16966?
Comment 1 Max Semenik 2010-11-02 18:33:14 UTC
Hi, I was unable to reproduce this on both 1.16 and trunk (the latter had lots of category-related changes though). Could you specify which SQLite version do you have (from Special:Version) and attach a sample database file?
Comment 2 phil 2010-11-02 21:52:28 UTC
Created attachment 7780 [details]
sqlite database that reproduces the bug (for me)

sqlite version 3.3.6

This a pristine just-installed database, with the single change of adding Main_Page to [[Category:Test]] and confirming that it doesn't appear (for me)
Comment 3 Max Semenik 2010-11-04 15:24:52 UTC
I managed to find 3.3.7, and everything still worked for me. The only visible difference between your database and databases created by later versions of SQLite is PRAGMA legacy_file_format that is off for you and on for newer versions (this is a documented change in SQLite behaviour).

Can you try the following SQL:

SELECT page_title,page_namespace,page_len,page_is_redirect,cl_sortkey,cat_id,cat_title,cat_subcats,cat_pages,cat_files  FROM page INNER JOIN categorylinks  ON ((cl_from = page_id)) LEFT JOIN category ON ((cat_title = page_title AND page_namespace = 14))  WHERE (1 = 1) AND cl_to = 'Test'  ORDER BY cl_sortkey LIMIT 201  

To ensure that it's being run in the same environment, it should be executed via maintenance/sql.php

If everything works, you should receive one row of results. The behaviour you're observing indicates that it returns no rows for you.

On a side note, SQLite 3.3.6 is more than 4 years old, has bugs that were fixed in later versions and has no full-text search support. I wonder if we should drop support for it completely. Are your packages up to date? Or you're using something in the line of Debian Lenny, RHEL and XAMPP?
Comment 4 Mark A. Hershberger 2011-02-08 02:07:23 UTC
Phil, did you try Max's select query?
Comment 5 Max Semenik 2011-07-19 15:57:23 UTC
No response, assuming it's due to antiquated SQLite version. I'll consider adding a warning when installing on anything less than 3.6.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links