returns warnings as expected:
If I change the engine to InnoDB, the warnings are not displayed any more:
The problem happens because in case of InnoDB, execution goes through do_field_string():
Field_num::get_int() does not produce the warnings because count_cuted_field is equal to CHECK_FIELD_IGNORE.
In case of MyISAM the optimizer chooses a different plan, execution goes through this code:
The warnings ARE displayed, because Converter_strntod_with_warn checks for thd->no_errors rather than thd->count_cuted_fields.
The execution path for InnoDB should be fixed to call do_field_int() instead of do_field_string().
This will force Field_long to produce warnings on Field_long::store("d", 1, &my_charset_latin1).