1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +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:
Alexander Barkov
2016-06-29 21:10:35 +02:00
committed by Sergei Golubchik
parent b3e11d33db
commit 4dcbb775ae
27 changed files with 1415 additions and 2 deletions

View File

@@ -1097,6 +1097,7 @@ CREATE TABLE t1 (
c INT DEFAULT IS_IPV4(a),
d INT DEFAULT IS_IPV6(a)
);
SHOW CREATE TABLE t1;
INSERT INTO t1 (a) VALUES ('192.168.001.001'),('::1'),('xxx');
SELECT * FROM t1;
DROP TABLE t1;
@@ -1108,6 +1109,7 @@ CREATE TABLE t1 (
b INT DEFAULT IS_IPV4_COMPAT(addr),
c INT DEFAULT IS_IPV4_MAPPED(addr)
);
SHOW CREATE TABLE t1;
INSERT INTO t1 (str) VALUES ('::FFFF:192.168.0.1'),('::10.0.5.9');
SELECT str, str1, b,c FROM t1;
DROP TABLE t1;