Added cases for bugs #6307 and #6460.
sql_select.cc:
Fixed the problem of bug reports #6307 and #6460.
The reported wrong result sets were due to the fact that
the added call of the fix_fields method for the built
AND condition that joined WHERE and ON conditions
broke ON expression, as it removed extra AND levels
in the built condition.
It looks like that no attributes of the built condition
are needed, so we don't have to call fix_fields here.
Added protocol::flush() for easier embedded-server code
Increase block allocation variables a bit as they where a bit too small for MySQL 4.1
Added option --silent to client_test
Added a test case for bug #5896.
sql_select.cc:
Fixed the problem of ignoring on expressions depending
only on outer table when outer table either contains
1 row or is guaranteed to return only 1 row (bug #5896).
* When executing EXPLAIN, do the same as for the query: convert join type to JT_CONST if keyuse array covers all key parts and all of them are constants.
* In remove_const, don't remove conditions that depend on some-const-table and current-table.
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'