Public bug reported:
Binary package hint: mysql-server-5.0
Maybe it's just the commandline client that confuses an empty string
with a NULL, but there is something fishy here...
Description by example and steps to reproduce:
mysql> insert into test values("","an empty string");
Query OK, 1 row affected (0.00 sec)
mysql> insert into test values(NULL,"a NULL");
Query OK, 1 row affected (0.00 sec)
mysql> select * from test;
+------+-----------------+
| colv | colc |
+------+-----------------+
| NULL | an empty string |
| NULL | a NULL |
+------+-----------------+
2 rows in set (0.00 sec)
mysql> select * from test where colv is null;
+------+--------+
| colv | colc |
+------+--------+
| NULL | a NULL |
+------+--------+
1 row in set (0.00 sec)
mysql> select * from test where colv="";
+------+-----------------+
| colv | colc |
+------+-----------------+
| NULL | an empty string |
+------+-----------------+
1 row in set (0.00 sec)
** Affects: mysql-dfsg-5.0 (Ubuntu)
Importance: Untriaged
Status: Unconfirmed
--
empty string confused with a NULL
https://launchpad.net/bugs/59100
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs