it happens because of the LEFT JOINT optimization in add_key_part()
This optimization does exactly the same in JOIN and in WHERE conditions
Not right.
I moved that optimization one level upper.
Added missing InnoDB variables to SHOW VARIABLES.
Fixed bug when doing WHERE 'column_name=NULL' on an indexed column that had NULL values.
Fixed bug when doing 'LEFT JOIN ... ON (column_name = constant) WHERE column_name = constant'