title: mysql inner join with nulls in join
body: <p>In below sample I expect output id as 1, 4, 6 and 7. But I get only 1, not sure why. By default do we have to use IFNULL for every join in mysql?</p>
  
  <pre><code>-- create table
  create table t1(col1 int, col2 char(1), col3 varchar(5), col4 date);  
  create table t2(col1 int, col2 char(1), col3 varchar(5), col4 date);  
  
  -- insert dummy data
  insert into t1 values (1,'m', 'name1', '2000-1-1');  
  insert into t2 values (1,'m', 'name1', '2000-1-1');  
  
  insert into t1 values (2,'f', 'name2', '2000-1-1');  
  insert into t2 values (2,'f', 'name2', null);  
  
  insert into t1 values (3,'f', null, null);  
  insert into t2 values (3,'f', 'name3', null);  
  
  insert into t1 values (4,'f', null, '2000-1-1');  
  insert into t2 values (4,'f', null, '2000-1-1');  
  
  insert into t1 values (5,'f', null, '2000-1-1');  
  insert into t2 values (5,'f', 'name5', null);  
  
  insert into t1 values (6,'f', null, null);  
  insert into t2 values (6,'f', null, null);  
  
  insert into t1 values (7,null, 'name7', '2000-1-1');  
  insert into t2 values (7,null, 'name7', '2000-1-1');  
  
  -- select query with inner join  
  select a.col1  
  from t1 a  
  inner join t2 b on b.col2 = a.col2  
  and b.col3 = a.col3  
  and b.col4 = a.col4  
  </code></pre>