Skip to content
  • Tobias Zeuch's avatar
    Fix illegal reference in join condition on Exists-subquery · 504d8270
    Tobias Zeuch authored and Robert Lyon's avatar Robert Lyon committed
    
    
    Bug 1571421: In the exists-subquery the join-condition contains a reference to an outer table alias, which is not supported in MySql (though it seems to work in Postgres). This leads to a "site unavailable" e.g. when searching on the "shared with me" page.
    The solution is to move the condition into the WHERE-part. This might actually improve performance because it allows the database engine to precalculate the join one single time and reuse it for each Exists-subquery
    
    behatnotneeded
    
    Change-Id: I5097154d939bf7ddba01d5845af7e8cbb42681b8
    Signed-off-by: default avatarTobias Zeuch <tobias.zeuch@rwth-aachen.de>
    (cherry picked from commit 65c21985)
    504d8270