According to my reading of the manual, specifically
http://dev.mysql.com/doc/refman/5.0/en/enum.html
"If strict SQL mode is enabled, attempts to insert invalid ENUM values result in an error. "
Shouldn't this insert be failing with errors?
Thanks in advance, James
Server version: 5.0.51a-3ubuntu5.4 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
mysql> create database teststrict;
Query OK, 1 row affected (0.00 sec)
mysql> use teststrict;
Database changed
mysql> create table test (
-> ID Integer not null primary key,
-> test enum('1','2','3') not null
-> ) engine=innodb;
Query OK, 0 rows affected (0.08 sec)
mysql>
mysql> SET SESSION sql_mode='STRICT_ALL_TABLES';
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> insert into test set ID=1, test='0';
Query OK, 1 row affected (0.01 sec)
mysql> select * from test;
+----+------+
| ID | test |
+----+------+
| 1 | |
+----+------+
1 row in set (0.00 sec)