Philip Newton wrote:
You could also try "insert into foo values ('2')", for example.
Or even better :
mysql> insert into foo values('t');
Query OK, 1 row affected, 1 warning (0.00 sec)
Which most programs will interpret as a positive result and carry on.
You can make the above fail if you
mysql>set sql_mode=STRICT_ALL_TABLES
But then this has a tendency to break most PHP apps, like Drupal or
Zencart. Not that that's a bad thing but it explains why it's not on by
default, since mysql is the db of choice for PHP users.
My favourite mysqlism is that setting ENUMs for a field don't actually
force you to use them unless you enable strict mode. So entering "blah"
into a column that has an enum of foo or bar will not fail by default, just
result in a warning, which as shown above will actually be interpretted as
a positive result by most APIs.
regards,
Paul