title: `Count Distinct` and `Group By` produce weird results
body: <p>Please consider the following query:</p>
  
  <pre><code>SELECT artist.id, COUNT(DISTINCT artist$styles.v_id)
  FROM artist
  LEFT JOIN artist$styles ON artist$styles.p_id = artist.id
  </code></pre>
  
  <p>This is the result I get:</p>
  
  <pre><code>id  count
  1   4
  </code></pre>
  
  <p>The questions are:</p>
  
  <ol>
  <li>How come it's only selecting one row from the <code>artist</code> table, when there are 4 rows in it and there are no <code>WHERE</code>, <code>HAVING</code>, <code>LIMIT</code> or <code>GROUP BY</code> clauses applied to the query?</li>
  <li>There are only three records in <code>artist$styles</code> having <code>p_id</code> of value <code>1</code>, why is it counting <code>4</code>?</li>
  <li><p>Why if I add a <code>GROUP BY</code> clause to it I get the correct results?</p>
  
  <pre><code>SELECT artist.id, COUNT(DISTINCT artist$styles.v_id)
  FROM artist
  LEFT JOIN artist$styles ON artist$styles.p_id = artist.id
  GROUP BY artist.id
  ----
  id  count
  1   3
  2   1
  3   3
  4   1
  </code></pre></li>
  <li><p>This all just doesn't make sense to me. Could this be a bug of MySQL? I'm running Community 5.5.25a</p></li>
  </ol>