Hi, Sergey!
On Feb 06, Sergey Glukhov wrote:
> #At file:///home/gluh/MySQL/mysql-5.0-bug-33717/ based on
> revid:alexey.kopytov@stripped
>
> 2741 Sergey Glukhov 2009-02-06
> 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.
> Additional fix:
> INSERT...(default) and INSERT...() have the same behaviour now.
> === modified file 'mysql-test/r/sp.result'
> --- a/mysql-test/r/sp.result 2008-10-17 14:55:06 +0000
> +++ b/mysql-test/r/sp.result 2009-02-06 10:03:37 +0000
> @@ -3480,8 +3480,6 @@ drop procedure bug9538|
> drop procedure if exists bug8692|
> create table t3 (c1 varchar(5), c2 char(5), c3 enum('one','two'), c4 text, c5 blob,
> c6 char(5), c7 varchar(5))|
> insert into t3 values ('', '', '', '', '', '', NULL)|
> -Warnings:
> -Warning 1265 Data truncated for column 'c3' at row 1
> create procedure bug8692()
> begin
> declare v1 VARCHAR(10);
Again, I don't think you should change the existing behavior.
Now you 1. removed a warning, which 2. made invalid insert to succeed in
the strict mode.
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