https://bugzilla.wikimedia.org/show_bug.cgi?id=57724

José Antonio <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from José Antonio <[email protected]> ---
23:07:05Fri 29 Nov 13 23:07:07



The the fields to be use in outer joins need to be defined as not null. Then 
PostgreSQL can enforce data consistency without falling the outer left join
transaction. 

The root of the problem  can be found in the the PostgreSQL log.

The test from where the fail arises is: public function
testOnArticlePurgeOnDatabase()
in line 121 of  
SemanticMediaWiki/tests/phpunit/integration/MediaWikiFunctionHookIntegrationTest.php.


GMT ERROR:  
SELECT FOR UPDATE/SHARE cannot be applied to the nullable side of an outer
join.

This means in this context that the data fields used in the left join must be
not nullable:
{
LEFT JOIN "unittest_mwuser" ON ((rev_user != 0) AND (user_id = rev_user)) 
WHERE page_id = '612' AND rev_id = '892'  LIMIT 1   FOR UPDATE
}

ref:
http://www.postgresql.org/message-id/flat/[email protected]
http://postgresql.1045698.n5.nabble.com/outer-joins-and-for-update-td1937029.html


GMT ERROR:  
SELECT FOR UPDATE/SHARE cannot be applied to the nullable side of an outer
join.

GMT STATEMENT:  
SELECT 

rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_user_text,rev_user,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,rev_content_format,rev_content_model,page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name
 

FROM "unittest_revision" INNER JOIN "unittest_page" ON ((page_id = rev_page)) 



It seems that unit test reporting hides the real root of the problem that can
be identified in the PostgreSQL log .Then in future It seems that it would very
useful to include this log.
On a debian system the standard location is in: 
/var/log/postgresql/postgresql-9.1-main.log. Thus perhaps including the output
of 
tail -20  /var/log/postgresql/postgresql-9.1-main.log  with unit test fails
report could be something easy to achieve.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to