Commit c84dde14 authored by Alexander Barkov's avatar Alexander Barkov

MDEV-19184 Crash in IS_IPV6(_ucs2 0x0031)

parent 02d9b048
......@@ -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
#
......@@ -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
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment