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
c84dde14
Commit
c84dde14
authored
Apr 05, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-19184 Crash in IS_IPV6(_ucs2 0x0031)
parent
02d9b048
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
107 additions
and
35 deletions
+107
-35
mysql-test/main/ctype_ucs.result
mysql-test/main/ctype_ucs.result
+24
-0
mysql-test/main/ctype_ucs.test
mysql-test/main/ctype_ucs.test
+15
-0
sql/item_inetfunc.cc
sql/item_inetfunc.cc
+68
-35
No files found.
mysql-test/main/ctype_ucs.result
View file @
c84dde14
...
...
@@ -6393,5 +6393,29 @@ SELECT HEX(INET6_ATON('1::1')), HEX(INET6_ATON(CONVERT('1::1' USING ucs2)));
HEX(INET6_ATON('1::1')) HEX(INET6_ATON(CONVERT('1::1' USING ucs2)))
00010000000000000000000000000001 00010000000000000000000000000001
#
# MDEV-19184 Crash in IS_IPV6(_ucs2 0x0031)
#
SET NAMES utf8;
SELECT IS_IPV6(_ucs2 0x0031);
IS_IPV6(_ucs2 0x0031)
0
SELECT IS_IPV4(_ucs2 0x0031);
IS_IPV4(_ucs2 0x0031)
0
SELECT IS_IPV6(_ucs2 0x003A003A);
IS_IPV6(_ucs2 0x003A003A)
1
SELECT IS_IPV4(_ucs2 0x00310030002E0030002E0030002E0031);
IS_IPV4(_ucs2 0x00310030002E0030002E0030002E0031)
1
SET NAMES utf8, collation_connection=ucs2_bin;
SELECT IS_IPV6('::');
IS_IPV6('::')
1
SELECT IS_IPV4('10.0.0.1');
IS_IPV4('10.0.0.1')
1
SET NAMES utf8;
#
# End of 10.4 tests
#
mysql-test/main/ctype_ucs.test
View file @
c84dde14
...
...
@@ -1105,6 +1105,21 @@ DEALLOCATE PREPARE stmt;
SELECT
HEX
(
INET6_ATON
(
'1::1'
)),
HEX
(
INET6_ATON
(
CONVERT
(
'1::1'
USING
ucs2
)));
--
echo
#
--
echo
# MDEV-19184 Crash in IS_IPV6(_ucs2 0x0031)
--
echo
#
SET
NAMES
utf8
;
SELECT
IS_IPV6
(
_ucs2
0x0031
);
SELECT
IS_IPV4
(
_ucs2
0x0031
);
SELECT
IS_IPV6
(
_ucs2
0x003A003A
);
SELECT
IS_IPV4
(
_ucs2
0x00310030002E0030002E0030002E0031
);
SET
NAMES
utf8
,
collation_connection
=
ucs2_bin
;
SELECT
IS_IPV6
(
'::'
);
SELECT
IS_IPV4
(
'10.0.0.1'
);
SET
NAMES
utf8
;
--
echo
#
--
echo
# End of 10.4 tests
...
...
sql/item_inetfunc.cc
View file @
c84dde14
This diff is collapsed.
Click to expand it.
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