diff options
author | unknown <cmiller@zippy.(none)> | 2006-03-03 16:26:38 -0500 |
---|---|---|
committer | unknown <cmiller@zippy.(none)> | 2006-03-03 16:26:38 -0500 |
commit | 21d6e172f5cb182132f1869dac0707da98a462bb (patch) | |
tree | df16c9d0887285cd9c8c342eb3670d4e177ad929 /mysql-test/t/mysql.test | |
parent | 88d4005b8aeae7f0252893590e5ea12b3a43b24e (diff) | |
download | mariadb-git-21d6e172f5cb182132f1869dac0707da98a462bb.tar.gz |
Bug#16859 involves truncating column data at NUL characters. Instead, the
client will now substitute spaces for NULs, so that the grid isn't messed up
due to silently consumed NULs and that the full field is shown.
client/mysql.cc:
For non-numbers, print each character at a time, instead of using the
fprintf() facility, which interprets an array of chars as a C string, which
is necessarily NUL terminated. We mustn't terminate on NULs, and since we
know the length of the data, we needn't.
mysql-test/r/mysql.result:
Add a test.
mysql-test/t/mysql.test:
Add a test.
Diffstat (limited to 'mysql-test/t/mysql.test')
-rw-r--r-- | mysql-test/t/mysql.test | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test index 4712e7e8266..dbf65845e6a 100644 --- a/mysql-test/t/mysql.test +++ b/mysql-test/t/mysql.test @@ -56,3 +56,8 @@ drop table t1; --exec $MYSQL --default-character-set=utf8 test -e "charset cp932; set character_set_client= cp932; select 'ƒ\'" --exec $MYSQL --default-character-set=utf8 test -e "/*charset cp932 */; set character_set_client= cp932; select 'ƒ\'" --exec $MYSQL --default-character-set=utf8 test -e "/*!\C cp932 */; set character_set_client= cp932; select 'ƒ\'" + +# +# Bug#16859 -- NULLs in columns must not truncate data as if a C-language "string". +# +--exec $MYSQL -t test -e "create table t1 (col1 binary(4), col2 varchar(10), col3 int); insert into t1 values ('a', 'b', 123421),('a ', '0123456789', 4), ('abcd', '', 4); select concat('>',col1,'<'), col2, col3 from t1; drop table t1;" 2>&1 |