Page MenuHomePhabricator

Database returned error "1: RIGHT and FULL OUTER JOINs are not currently supported".
Closed, ResolvedPublic

Description

I got the following when I accessed Special:Watchlist in my copy of MW+LQT:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
SELECT * FROM thread RIGHT JOIN user_message_state ON ((ums_user IS NULL OR (ums_user = '1' AND (ums_thread=thread_id)))) WHERE ums_read_timestamp IS NULL AND ((thread_article_title = 'MyUserName' AND thread_article_namespace = '3'))
from within function "NewMessages::newUserMessages". Database returned error "1: RIGHT and FULL OUTER JOINs are not currently supported".
Backtrace:
#0 /var/www/mw/includes/db/Database.php(939): DatabaseBase->reportQueryError('RIGHT and FULL ...', 1, 'SELECT * FROM...', 'NewMessages::ne...', false)
#1 /var/www/mw/includes/db/Database.php(1412): DatabaseBase->query('SELECT * FROM...', 'NewMessages::ne...')
#2 /var/www/mw/extensions/LiquidThreads/classes/NewMessagesController.php(442): DatabaseBase->select(Array, '*', Array, 'NewMessages::ne...', Array, Array)
#3 /var/www/mw/extensions/LiquidThreads/classes/Hooks.php(121): NewMessages::newUserMessages(Object(User))
#4 [internal function]: LqtHooks::beforeWatchlist(Array, Array, Array, Array)
#5 /var/www/mw/includes/Hooks.php(216): call_user_func_array('LqtHooks::befor...', Array)
#6 /var/www/mw/includes/GlobalFunctions.php(3969): Hooks::run('SpecialWatchlis...', Array)
#7 /var/www/mw/includes/specials/SpecialWatchlist.php(304): wfRunHooks('SpecialWatchlis...', Array)
#8 /var/www/mw/includes/SpecialPage.php(611): SpecialWatchlist->execute(NULL)
#9 /var/www/mw/includes/SpecialPageFactory.php(493): SpecialPage->run(NULL)
#10 /var/www/mw/includes/Wiki.php(290): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#11 /var/www/mw/includes/Wiki.php(536): MediaWiki->performRequest()
#12 /var/www/mw/includes/Wiki.php(446): MediaWiki->main()
#13 /var/www/mw/index.php(58): MediaWiki->run()
#14 {main}


Version: unspecified
Severity: minor
URL: http://localhost/mw/index.php/Special:Watchlist

Details

Reference
bz39064

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:58 AM
bzimport set Reference to bz39064.
bzimport added a subscriber: Unknown Object (MLST).

I was able to access
http://localhost/mw/index.php/special:Watchlist/raw
without problem and then I removed all pages from my watchlist.

It seems the problem only happens if my watchlist contains some thread which was deleted.

This is a limitation of sqlite

Change 101055 had a related patch set uploaded by Nemo bis:
Use LEFT JOIN for SQLite compatibility

https://gerrit.wikimedia.org/r/101055

Change 101055 merged by Alex Monk:
Use LEFT JOIN for SQLite compatibility

https://gerrit.wikimedia.org/r/101055

Helder: Can you answer comment 5, please?

(In reply to Waldir from comment #5)

Helder, does the patch at https://gerrit.wikimedia.org/r/101055 solve the
issue?

I think so.