mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Only expand the empty string to the letters "NULL" if the column
does not have "NOT NULL" attribute set. Also, calculate the padding characters more safely, so that a negative number doesn't cause it to print MAXINT-n spaces. mysql-test/r/mysql.result: Add test result. mysql-test/t/mysql.test: Add test.
This commit is contained in:
@ -85,3 +85,15 @@ c_cp932
|
||||
| NULL | NULL | Τη γλώσσα |
|
||||
| NULL | NULL | ᛖᚴ ᚷᛖᛏ |
|
||||
+------+------+---------------------------+
|
||||
+------+---+------+
|
||||
| i | j | k |
|
||||
+------+---+------+
|
||||
| NULL | 1 | NULL |
|
||||
+------+---+------+
|
||||
+-------+---------+------+-----+---------+-------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+-------+---------+------+-----+---------+-------+
|
||||
| i | int(11) | YES | | NULL | |
|
||||
| j | int(11) | NO | | NULL | |
|
||||
| k | int(11) | YES | | NULL | |
|
||||
+-------+---------+------+-----+---------+-------+
|
||||
|
@ -67,3 +67,8 @@ drop table t1;
|
||||
#
|
||||
--exec $MYSQL -t --default-character-set utf8 test -e "create table t1 (i int, j int, k char(25) charset utf8); insert into t1 (i) values (1); insert into t1 (k) values ('<----------------------->'); insert into t1 (k) values ('<-----'); insert into t1 (k) values ('Τη γλώσσα'); insert into t1 (k) values ('ᛖᚴ ᚷᛖᛏ'); select * from t1; DROP TABLE t1;"
|
||||
|
||||
#
|
||||
# "DESCRIBE" commands may return strange NULLness flags.
|
||||
#
|
||||
--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;"
|
||||
|
||||
|
Reference in New Issue
Block a user