Skip to content

Instantly share code, notes, and snippets.

@dlitz
Created April 18, 2010 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlitz/370205 to your computer and use it in GitHub Desktop.
Save dlitz/370205 to your computer and use it in GitHub Desktop.
it inserts '' when you try to insert an illegal value, rather than returning an error
mysql> create database foo;
Query OK, 1 row affected (0.00 sec)
mysql> use foo;
Database changed
mysql> create table blah (e ENUM('True', 'False') NOT NULL);
Query OK, 0 rows affected (0.10 sec)
mysql> INSERT INTO blah VALUES ('Flase');
Query OK, 1 row affected, 1 warning (0.04 sec)
mysql> select * from blah;
+---+
| e |
+---+
| |
+---+
1 row in set (0.00 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment