| Justin Swanhart ( @ 2008-07-17 10:27:00 |
CentOS 5 users beware - The shipped mysql client is broken
CentOS 5 ships with version 5.0.22 of MySQL, which has a number of issues, but I discovered a major one that I wasn't aware of until yesterday. There is a problem in the 5.0.22 client that causes empty strings, or strings consisting only of spaces to be displayed as NULL:
http://bugs.mysql.com/bug.php?id=19564
CentOS 5 ships with version 5.0.22 of MySQL, which has a number of issues, but I discovered a major one that I wasn't aware of until yesterday. There is a problem in the 5.0.22 client that causes empty strings, or strings consisting only of spaces to be displayed as NULL:
http://bugs.mysql.com/bug.php?id=19564
CREATE TABLE test.x1 (c char(10)) ENGINE=MYISAM;
INSERT INTO test.x1 values (' ');
INSERT INTO test.x1 values ('');
-- on a 5.0.22 client (/usr/local/mysql):
mysql> select * from test.x1;
+------+
| c |
+------+
| NULL |
| NULL |
+------+
2 rows in set (0.00 sec)
-- on a 5.0.37 client (~/bin/mysql):
mysql> select * from test.x1;
+------+
| c |
+------+
| |
| |
+------+
2 rows in set (0.00 sec)