summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysql.test
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.cornsilk.net>2006-09-13 11:41:41 -0400
committerunknown <cmiller@zippy.cornsilk.net>2006-09-13 11:41:41 -0400
commit306827a5ccb5c92b964b847e4927601b9fecd5ae (patch)
treea5f1f2c07aca67c9630a82a7f968a47bc7d90961 /mysql-test/t/mysql.test
parentd31a3434650a9991bcc16478e65efd7d2ea23c76 (diff)
downloadmariadb-git-306827a5ccb5c92b964b847e4927601b9fecd5ae.tar.gz
Bug #21618: NULL shown as empty string in client
The column's NOT NULL flag doesn't affect what we should print. Remove the wrong logic that does check it. Also, verify that this and the previous two tests print the same data as other output formats. client/mysql.cc: Don't check the column's NOT NULL flag when determining whether to print "NULL" or not. mysql-test/r/mysql.result: Add results and confirm that the other output forms give the same results for other similar tests. mysql-test/t/mysql.test: Add regression tests for this bug and two similar bugs.
Diffstat (limited to 'mysql-test/t/mysql.test')
-rw-r--r--mysql-test/t/mysql.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test
index 98fadcfc75d..7cc92574b76 100644
--- a/mysql-test/t/mysql.test
+++ b/mysql-test/t/mysql.test
@@ -70,13 +70,21 @@ drop table t1;
#
# "DESCRIBE" commands may return strange NULLness flags.
#
+--exec $MYSQL --default-character-set utf8 test -e "create table t1 (i int, j int not null, k int); insert into t1 values (null, 1, null); select * from t1; describe t1; drop table t1;"
--exec $MYSQL -t --default-character-set utf8 test -e "create table t1 (i int, j int not null, k int); insert into t1 values (null, 1, null); select * from t1; describe t1; drop table t1;"
#
# Bug#19564: mysql displays NULL instead of space
#
+--exec $MYSQL test -e "create table b19564 (i int, s1 char(1)); insert into b19564 values (1, 'x'); insert into b19564 values (2, NULL); insert into b19564 values (3, ' '); select * from b19564 order by i; drop table b19564;"
--exec $MYSQL -t test -e "create table b19564 (i int, s1 char(1)); insert into b19564 values (1, 'x'); insert into b19564 values (2, NULL); insert into b19564 values (3, ' '); select * from b19564 order by i; drop table b19564;"
+#
+# Bug#21618: NULL shown as empty string in client
+#
+--exec $MYSQL test -e "select unhex('zz');"
+--exec $MYSQL -t test -e "select unhex('zz');"
+
--echo End of 5.0 tests