Last modified: 2013-03-15 07:08:31 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.
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.
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
Steps to reproduce should be (assuming my guess about issue is correct): *install on sqlite *run populateCategory.php --force
Resolved by Gerrit change I74af28e3f7bb0c37ea1cc9cd087a688ba7621e57 - https://gerrit.wikimedia.org/r/#q,I74af28e3f7bb0c37ea1cc9cd087a688ba7621e57,n,z