Created
April 18, 2010 12:11
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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