Hi, Sergey!
On Dec 26, Sergey Glukhov wrote:
> #At file:///home/gluh/MySQL/mysql-5.1-bug-41131/ based on
> revid:sergey.glukhov@stripped
>
> 2746 Sergey Glukhov 2008-12-26
> Bug#33717 INSERT...(default) fails for enum. Crashes CSV tables,
> loads spaces for MyISAM Table corruption happens during table
> reading in ha_tina::find_current_row() func. Field::store()
> method returns error(true) if stored value is 0, but 0 is legal
> value. The fix is to return false if the value is 0.
>
> === modified file 'mysql-test/r/strict.result'
> --- a/mysql-test/r/strict.result 2008-05-13 12:01:02 +0000
> +++ b/mysql-test/r/strict.result 2008-12-26 17:48:08 +0000
> @@ -966,7 +966,6 @@ ERROR 01000: Data truncated for column '
> INSERT INTO t1 VALUES ('');
> -ERROR 01000: Data truncated for column 'col1' at row 1
This directly contradicts the manual:
If you insert an invalid value into an ENUM (that is, a string not
present in the list of allowed values), the empty string is inserted
instead as a special error value.
If strict SQL mode is enabled, attempts to insert invalid ENUM values
result in an error.
Regards / Mit vielen Grüßen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect
/_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028
<___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Häring