Last modified: 2013-03-15 07:08:31 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 T47650, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45650 - SQLite syntax error: LOCK IN SHARE MODE when running Category::refreshCounts
SQLite syntax error: LOCK IN SHARE MODE when running Category::refreshCounts
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Categories (Other open bugs)
1.21.x
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy
Depends on:
Blocks: sqlite
  Show dependency treegraph
 
Reported: 2013-03-02 22:24 UTC by liamzebedee
Modified: 2013-03-15 07:08 UTC (History)
2 users (show)

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


Attachments

Description liamzebedee 2013-03-02 22:24:06 UTC
I've recently had to recover an SQLite database after I did some crazy stuff to it (I have no idea what I did). Long story short, I ended up dumping the DB into XML, reinstalling, then reimporting it. I then ran maintenance/update.php and now I am in a situation where I receive the following error when trying to access the page "Category:Maths":

Function: Category::refreshCounts
Error: 1 near "LOCK": syntax error

I also receive this error when running maintenance/populateCategory.php, in more detail:

Query: SELECT  COUNT(*) AS pages,COUNT( (CASE WHEN page_namespace = '14' THEN 1 ELSE NULL END) ) AS subcats,COUNT( (CASE WHEN page_namespace = '6' THEN 1 ELSE NULL END) ) AS files  FROM categorylinks,page  WHERE cl_to = 'Biological_Level_of_Analysis' AND (page_id = cl_from)  LIMIT 1   LOCK IN SHARE MODE

Function: Category::refreshCounts
Error: 1 near "LOCK": syntax error

I'm unsure as how to reproduce the error, but I think it may lie in the XML dump. I dumped the XML as of an earlier 1.21-git revision, and imported it later at a newer 1.21-git revision.
Comment 1 Bawolff (Brian Wolff) 2013-03-02 22:36:10 UTC
What's probably happening is the dump doesnt import category counts so update.php adds them, which runs some not often executed code which doesnt properly use the sql abstraction layer.
Comment 2 liamzebedee 2013-03-04 11:32:46 UTC
Hm. Steps to reproduction would probably follow:

# Install newest MediaWiki software using an SQLite database
# Create (?one or more?) category pages (?with some more subpages of the categories?)
# Dump the database into XML
# Reinstall newest MediaWiki using an SQLite database again
# Run maintenance/update.php, should return without error
# Run maintenance/populateCategory.php, which should return with the SQL syntax error
Comment 3 Bawolff (Brian Wolff) 2013-03-04 13:25:40 UTC
Steps to reproduce should be (assuming my guess about issue is correct):
*install on sqlite
*run populateCategory.php --force

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


Navigation
Links