List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:April 19 2002 11:10am
Subject:ENUM and UPDATE ;-)
View as plain text  
Hi!

>>>>> "Colin" == Colin Faber <cfaber@stripped> writes:

Colin> I don't know if this has come up or not on the list yet, but I noticed
Colin> tonight that when trying to UPDATE an ENUM value with a value out side
Colin> of the set, i.e. x for 1,2,3 etc. It didn't error nor set a '0' value.

Colin> Rather it simple didn't match.  This doesn't seem to be documented in
Colin> the manual.  Is this a bug or another enum feature ;-)

Sorry, but what do you mean ?

I did a quick test of this and it seams to work as intended:

mysql> create table t1 (a enum('a','b','c'));
mysql> insert into t1 values ('a');
mysql> insert into t1 values ('b');
mysql> update t1 set a='d' where a='a';
mysql> select * from t1;
+------+
| a    |
+------+
|      |
| b    |
+------+
2 rows in set (0.02 sec)

Regards,
Monty


Thread
ENUM and UPDATE ;-)Colin Faber9 Apr
  • ENUM and UPDATE ;-)Michael Widenius19 Apr