mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
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.
This commit is contained in:
@ -56,3 +56,8 @@ drop table t1;
|
||||
--exec $MYSQL --default-character-set=utf8 test -e "charset cp932; set character_set_client= cp932; select '<27>\'"
|
||||
--exec $MYSQL --default-character-set=utf8 test -e "/*charset cp932 */; set character_set_client= cp932; select '<27>\'"
|
||||
--exec $MYSQL --default-character-set=utf8 test -e "/*!\C cp932 */; set character_set_client= cp932; select '<27>\'"
|
||||
|
||||
#
|
||||
# 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
|
||||
|
Reference in New Issue
Block a user