Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
5ba196c4
Commit
5ba196c4
authored
Jun 10, 2016
by
Alexander Barkov
Committed by
Sergei Golubchik
Jun 30, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More test for MDEV-10134 Add full support for DEFAULT
INET4/INET6 functions
parent
6cb4731f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
0 deletions
+70
-0
mysql-test/r/func_misc.result
mysql-test/r/func_misc.result
+36
-0
mysql-test/t/func_misc.test
mysql-test/t/func_misc.test
+34
-0
No files found.
mysql-test/r/func_misc.result
View file @
5ba196c4
...
...
@@ -1433,3 +1433,39 @@ release_lock('test')
# -- Done.
#
# Start of 10.2 tests
#
#
# MDEV-10134 Add full support for DEFAULT
#
CREATE TABLE t1 (
a VARCHAR(30),
b BIGINT DEFAULT INET_ATON(a),
a1 VARCHAR(30) DEFAULT INET_NTOA(b),
c INT DEFAULT IS_IPV4(a),
d INT DEFAULT IS_IPV6(a)
);
INSERT INTO t1 (a) VALUES ('192.168.001.001'),('::1'),('xxx');
SELECT * FROM t1;
a b a1 c d
192.168.001.001 3232235777 192.168.1.1 1 0
::1 NULL NULL 0 1
xxx NULL NULL 0 0
DROP TABLE t1;
CREATE TABLE t1 (
str VARCHAR(128),
addr VARBINARY(16) DEFAULT INET6_ATON(str),
str1 VARCHAR(128) DEFAULT INET6_NTOA(addr),
b INT DEFAULT IS_IPV4_COMPAT(addr),
c INT DEFAULT IS_IPV4_MAPPED(addr)
);
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
::FFFF:192.168.0.1 ::ffff:192.168.0.1 0 1
::10.0.5.9 ::10.0.5.9 1 0
DROP TABLE t1;
#
# End of 10.2 tests
#
mysql-test/t/func_misc.test
View file @
5ba196c4
...
...
@@ -1081,3 +1081,37 @@ select release_lock('test');
--
echo
--
echo
# -- Done.
--
echo
--
echo
#
--
echo
# Start of 10.2 tests
--
echo
#
--
echo
#
--
echo
# MDEV-10134 Add full support for DEFAULT
--
echo
#
CREATE
TABLE
t1
(
a
VARCHAR
(
30
),
b
BIGINT
DEFAULT
INET_ATON
(
a
),
a1
VARCHAR
(
30
)
DEFAULT
INET_NTOA
(
b
),
c
INT
DEFAULT
IS_IPV4
(
a
),
d
INT
DEFAULT
IS_IPV6
(
a
)
);
INSERT
INTO
t1
(
a
)
VALUES
(
'192.168.001.001'
),(
'::1'
),(
'xxx'
);
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
str
VARCHAR
(
128
),
addr
VARBINARY
(
16
)
DEFAULT
INET6_ATON
(
str
),
str1
VARCHAR
(
128
)
DEFAULT
INET6_NTOA
(
addr
),
b
INT
DEFAULT
IS_IPV4_COMPAT
(
addr
),
c
INT
DEFAULT
IS_IPV4_MAPPED
(
addr
)
);
INSERT
INTO
t1
(
str
)
VALUES
(
'::FFFF:192.168.0.1'
),(
'::10.0.5.9'
);
SELECT
str
,
str1
,
b
,
c
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 10.2 tests
--
echo
#
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment