mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
parentheses in default
- Adding SHOW CREATE TABLE into all DEFAULT tests, to cover need_parentheses_in_default() for all items - Fixing a few items not to print parentheses in DEFAULT: spatial function-alike predicates, IS_IPV4 and IS_IPV6 functions, COLUMN_CHECK() and COLUMN_EXISTS().
This commit is contained in:
committed by
Sergei Golubchik
parent
b3e11d33db
commit
4dcbb775ae
@ -1446,6 +1446,15 @@ a1 VARCHAR(30) DEFAULT INET_NTOA(b),
|
||||
c INT DEFAULT IS_IPV4(a),
|
||||
d INT DEFAULT IS_IPV6(a)
|
||||
);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` varchar(30) DEFAULT NULL,
|
||||
`b` bigint(20) DEFAULT INET_ATON(a),
|
||||
`a1` varchar(30) DEFAULT INET_NTOA(b),
|
||||
`c` int(11) DEFAULT IS_IPV4(a),
|
||||
`d` int(11) DEFAULT IS_IPV6(a)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 (a) VALUES ('192.168.001.001'),('::1'),('xxx');
|
||||
SELECT * FROM t1;
|
||||
a b a1 c d
|
||||
@ -1460,6 +1469,15 @@ str1 VARCHAR(128) DEFAULT INET6_NTOA(addr),
|
||||
b INT DEFAULT IS_IPV4_COMPAT(addr),
|
||||
c INT DEFAULT IS_IPV4_MAPPED(addr)
|
||||
);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`str` varchar(128) DEFAULT NULL,
|
||||
`addr` varbinary(16) DEFAULT INET6_ATON(str),
|
||||
`str1` varchar(128) DEFAULT INET6_NTOA(addr),
|
||||
`b` int(11) DEFAULT IS_IPV4_COMPAT(addr),
|
||||
`c` int(11) DEFAULT IS_IPV4_MAPPED(addr)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 (str) VALUES ('::FFFF:192.168.0.1'),('::10.0.5.9');
|
||||
SELECT str, str1, b,c FROM t1;
|
||||
str str1 b c
|
||||
|
Reference in New Issue
Block a user