title: Three left joins in a row return unexpected result
body: <p>So, I have this sql query:  </p>
  
  <pre><code>select
    o.id,
    o.name,
    d.name,
    w.day,
    o.suspended
  from resource o
    left join resource d on d.vehicle_ID = o.ID
    left join week_days_availability_to_resource aw on d.ID=aw.resource_ID
    left join week_days_availability w on aw.calendar_ID=w.ID
  where o.IS_DELETED &lt;&gt; true
        and (d.IS_DELETED is null or d.IS_DELETED &lt;&gt; true)
        and o.marketId = 98
        and (w.day = 3 or w.day is null)
        and (o.suspended &lt;&gt; true or o.id in (-1))  
  </code></pre>
  
  <p>It returns all the rows I need - excep for just one. There is row in table <code>resource o</code> which is joined with <code>resource d</code>, then it joins with <code>week_days_availability_to_resource</code> (there are some rows in this table with <code>resource_ID</code> equal to <code>d.ID</code>). The issue is that there is no row in the <code>week_days_availability</code> with <code>day</code> equal to three, so it returns nothing. But I expected <code>mysql</code> to return this row with <code>NULL</code> value of <code>day</code> field - because I thought this is what <code>left join</code> actually does. Seems like I am wrong.<br>
  Any ideas?</p>