Bug #20109 mysql client displays empty strings as NULL
Submitted: 28 May 2006 4:55 Modified: 28 May 2006 5:52
Reporter: Jordan Russell Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.21 OS:Linux (Linux (FC5))
Assigned to: CPU Architecture:Any

[28 May 2006 4:55] Jordan Russell
Description:
The 5.0.21 client displays 'NULL' for columns that contain empty (non-NULL) strings.

This did not happen before 5.0.21.

How to repeat:
mysql> create table test (col1 varchar(20));
Query OK, 0 rows affected (0.03 sec)

mysql> insert into test (col1) values ('');
Query OK, 1 row affected (0.00 sec)

mysql> select * from test;
+------+
| col1 |
+------+
| NULL |
+------+
1 row in set (0.00 sec)
[28 May 2006 5:52] MySQL Verification Team
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

miguel@hegel:~/dbs/5.0> bin/mysql -uroot dbg
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 5.0.23-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create table test (col1 varchar(20));
Query OK, 0 rows affected (0.00 sec)

mysql> insert into test (col1) values ('');
Query OK, 1 row affected (0.01 sec)

mysql> select * from test;
+------+
| col1 |
+------+
|      | 
+------+
1 row in set (0.00 sec)

mysql>