summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.(none)>2006-05-09 22:35:51 -0400
committerunknown <cmiller@zippy.(none)>2006-05-09 22:35:51 -0400
commit2e72ae3d818cef271dc348ba4ba781f66d4c1ec3 (patch)
tree69526931aa8a9484857bf00d581ffa85544a9dbe /client
parent481493a6fcf0a17326801a12e00b23db431fdb8c (diff)
downloadmariadb-git-2e72ae3d818cef271dc348ba4ba781f66d4c1ec3.tar.gz
Bug#19564: mysql displays NULL instead of space
Correct a bug (that I introduced, after using Oracle's database software for too many years) where the length of the database-sent data is incorrectly used to infer NULLness. client/mysql.cc: No longer use the length of the data to infer whether it is NULL or not. mysql-test/r/mysql.result: Add result and version marker, and correct previous result. mysql-test/t/mysql.test: Add test and version marker
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 7b46aaf67ce..50e5569a0ec 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -2319,7 +2319,7 @@ print_table_data(MYSQL_RES *result)
uint extra_padding;
/* If this column may have a null value, use "NULL" for empty. */
- if (! not_null_flag[off] && (lengths[off] == 0))
+ if (! not_null_flag[off] && (cur[off] == NULL))
{
buffer= "NULL";
data_length= 4;