List:Commits« Previous MessageNext Message »
From:brajmohan saxena Date:March 5 2012 2:07pm
Subject:bzr push into mysql-trunk branch (brajmohan.saxena:3712 to 3713)
View as plain text  
 3713 brajmohan saxena	2012-03-05
                 Bug 12635232 - VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
                                INET6_NTOA + MULTIBYTE CHARSET
            
                 Problem : valgrind warnings due to some wrong checking of character
                           values before checking charcter string boundaries.
                 Solution: checking string length before evaluating character
                           string values.

    added:
      mysql-test/include/ctype_inet.inc
    modified:
      mysql-test/r/ctype_ascii.result
      mysql-test/r/ctype_big5.result
      mysql-test/r/ctype_binary.result
      mysql-test/r/ctype_cp1250_ch.result
      mysql-test/r/ctype_cp1251.result
      mysql-test/r/ctype_eucjpms.result
      mysql-test/r/ctype_euckr.result
      mysql-test/r/ctype_gb2312.result
      mysql-test/r/ctype_gbk.result
      mysql-test/r/ctype_latin1.result
      mysql-test/r/ctype_latin2.result
      mysql-test/r/ctype_sjis.result
      mysql-test/r/ctype_tis620.result
      mysql-test/r/ctype_ujis.result
      mysql-test/r/ctype_utf8.result
      mysql-test/r/ctype_utf8mb4.result
      mysql-test/t/ctype_ascii.test
      mysql-test/t/ctype_big5.test
      mysql-test/t/ctype_binary.test
      mysql-test/t/ctype_cp1250_ch.test
      mysql-test/t/ctype_cp1251.test
      mysql-test/t/ctype_eucjpms.test
      mysql-test/t/ctype_euckr.test
      mysql-test/t/ctype_gb2312.test
      mysql-test/t/ctype_gbk.test
      mysql-test/t/ctype_latin1.test
      mysql-test/t/ctype_latin2.test
      mysql-test/t/ctype_sjis.test
      mysql-test/t/ctype_tis620.test
      mysql-test/t/ctype_ujis.test
      mysql-test/t/ctype_utf8.test
      mysql-test/t/ctype_utf8mb4.test
      sql/item_inetfunc.cc
 3712 Joerg Bruehe	2012-03-05
      Raise the version number after cloning 5.6.5-m8.

    modified:
      VERSION
=== added file 'mysql-test/include/ctype_inet.inc'
--- a/mysql-test/include/ctype_inet.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/ctype_inet.inc	2012-03-05 13:18:39 +0000
@@ -0,0 +1,4 @@
+SELECT is_ipv4(inet_ntoa('1'));
+SELECT is_ipv6(inet_ntoa('1'));
+SELECT inet6_aton(inet_ntoa('1'));
+SELECT inet6_ntoa(inet_ntoa('1'));

=== modified file 'mysql-test/r/ctype_ascii.result'
Binary files a/mysql-test/r/ctype_ascii.result	2007-08-07 09:35:20 +0000 and b/mysql-test/r/ctype_ascii.result	2012-03-05 13:18:39 +0000 differ

=== modified file 'mysql-test/r/ctype_big5.result'
--- a/mysql-test/r/ctype_big5.result	2010-03-22 09:13:41 +0000
+++ b/mysql-test/r/ctype_big5.result	2012-03-05 13:18:39 +0000
@@ -1028,5 +1028,22 @@ select hex(weight_string(cast(0xA1A1A1A1
 hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0))
 A1A1A1A1A1A120202020202020202020202020202020202020
 #
+# Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+# INET6_NTOA + MULTIBYTE CHARSET. 
+#
+SET NAMES big5;
+SELECT is_ipv4(inet_ntoa('1'));
+is_ipv4(inet_ntoa('1'))
+1
+SELECT is_ipv6(inet_ntoa('1'));
+is_ipv6(inet_ntoa('1'))
+0
+SELECT inet6_aton(inet_ntoa('1'));
+inet6_aton(inet_ntoa('1'))
+
+SELECT inet6_ntoa(inet_ntoa('1'));
+inet6_ntoa(inet_ntoa('1'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_binary.result'
--- a/mysql-test/r/ctype_binary.result	2012-02-23 16:32:32 +0000
+++ b/mysql-test/r/ctype_binary.result	2012-03-05 13:18:39 +0000
@@ -2878,3 +2878,22 @@ SET sql_mode=default;
 #
 # End of 5.5 tests
 #
+#
+# Start of 5.6 tests
+#
+SET NAMES binary;
+SELECT is_ipv4(inet_ntoa('1'));
+is_ipv4(inet_ntoa('1'))
+1
+SELECT is_ipv6(inet_ntoa('1'));
+is_ipv6(inet_ntoa('1'))
+0
+SELECT inet6_aton(inet_ntoa('1'));
+inet6_aton(inet_ntoa('1'))
+
+SELECT inet6_ntoa(inet_ntoa('1'));
+inet6_ntoa(inet_ntoa('1'))
+NULL
+#
+# End of 5.6 tests
+#

=== modified file 'mysql-test/r/ctype_cp1250_ch.result'
--- a/mysql-test/r/ctype_cp1250_ch.result	2011-02-17 11:58:08 +0000
+++ b/mysql-test/r/ctype_cp1250_ch.result	2012-03-05 13:18:39 +0000
@@ -638,5 +638,22 @@ select hex(weight_string('A' LEVEL 1-2))
 hex(weight_string('A' LEVEL 1-2))
 A401
 #
+# Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+# INET6_NTOA + MULTIBYTE CHARSET.
+#
+SET NAMES cp1250;
+SELECT is_ipv4(inet_ntoa('1'));
+is_ipv4(inet_ntoa('1'))
+1
+SELECT is_ipv6(inet_ntoa('1'));
+is_ipv6(inet_ntoa('1'))
+0
+SELECT inet6_aton(inet_ntoa('1'));
+inet6_aton(inet_ntoa('1'))
+
+SELECT inet6_ntoa(inet_ntoa('1'));
+inet6_ntoa(inet_ntoa('1'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_cp1251.result'
--- a/mysql-test/r/ctype_cp1251.result	2012-02-27 16:48:05 +0000
+++ b/mysql-test/r/ctype_cp1251.result	2012-03-05 13:18:39 +0000
@@ -3285,3 +3285,22 @@ DROP TABLE t1;
 #
 # End of 5.5 tests
 #
+#
+# Start of 5.6 tests
+#
+SET NAMES cp1251;
+SELECT is_ipv4(inet_ntoa('1'));
+is_ipv4(inet_ntoa('1'))
+1
+SELECT is_ipv6(inet_ntoa('1'));
+is_ipv6(inet_ntoa('1'))
+0
+SELECT inet6_aton(inet_ntoa('1'));
+inet6_aton(inet_ntoa('1'))
+
+SELECT inet6_ntoa(inet_ntoa('1'));
+inet6_ntoa(inet_ntoa('1'))
+NULL
+#
+# End of 5.6 tests
+#

=== modified file 'mysql-test/r/ctype_eucjpms.result'
--- a/mysql-test/r/ctype_eucjpms.result	2011-02-17 11:58:08 +0000
+++ b/mysql-test/r/ctype_eucjpms.result	2012-03-05 13:18:39 +0000
@@ -33351,6 +33351,19 @@ hex(weight_string(cast(0x8FA2C38FA2C38FA
 select hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 4, 0xC0));
 hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 4, 0xC0))
 8FA2C38FA2C38FA2C320202020202020202020202020202020
+SET NAMES eucjpms;
+SELECT is_ipv4(inet_ntoa('1'));
+is_ipv4(inet_ntoa('1'))
+1
+SELECT is_ipv6(inet_ntoa('1'));
+is_ipv6(inet_ntoa('1'))
+0
+SELECT inet6_aton(inet_ntoa('1'));
+inet6_aton(inet_ntoa('1'))
+
+SELECT inet6_ntoa(inet_ntoa('1'));
+inet6_ntoa(inet_ntoa('1'))
+NULL
 #
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_euckr.result'
--- a/mysql-test/r/ctype_euckr.result	2010-03-22 09:13:41 +0000
+++ b/mysql-test/r/ctype_euckr.result	2012-03-05 13:18:39 +0000
@@ -24994,6 +24994,19 @@ A1A1A1A1A1
 select hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0));
 hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0))
 A1A1A1A1A1A120202020202020202020202020202020202020
+SET NAMES euckr;
+SELECT is_ipv4(inet_ntoa('1'));
+is_ipv4(inet_ntoa('1'))
+1
+SELECT is_ipv6(inet_ntoa('1'));
+is_ipv6(inet_ntoa('1'))
+0
+SELECT inet6_aton(inet_ntoa('1'));
+inet6_aton(inet_ntoa('1'))
+
+SELECT inet6_ntoa(inet_ntoa('1'));
+inet6_ntoa(inet_ntoa('1'))
+NULL
 #
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_gb2312.result'
--- a/mysql-test/r/ctype_gb2312.result	2010-03-22 09:13:41 +0000
+++ b/mysql-test/r/ctype_gb2312.result	2012-03-05 13:18:39 +0000
@@ -1022,5 +1022,22 @@ select hex(weight_string(cast(0xA1A1A1A1
 hex(weight_string(cast(0xA1A1A1A1A1A1 as char),25, 4, 0xC0))
 A1A1A1A1A1A120202020202020202020202020202020202020
 #
+# Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+# INET6_NTOA + MULTIBYTE CHARSET.
+#
+SET NAMES gb2312;
+SELECT is_ipv4(inet_ntoa('1'));
+is_ipv4(inet_ntoa('1'))
+1
+SELECT is_ipv6(inet_ntoa('1'));
+is_ipv6(inet_ntoa('1'))
+0
+SELECT inet6_aton(inet_ntoa('1'));
+inet6_aton(inet_ntoa('1'))
+
+SELECT inet6_ntoa(inet_ntoa('1'));
+inet6_ntoa(inet_ntoa('1'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_gbk.result'
--- a/mysql-test/r/ctype_gbk.result	2010-03-22 09:13:41 +0000
+++ b/mysql-test/r/ctype_gbk.result	2012-03-05 13:18:39 +0000
@@ -1402,5 +1402,22 @@ select hex(weight_string(cast(0x8EA18EA1
 hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 4, 0xC0))
 8EA18EA18EA120202020202020202020202020202020202020
 #
+# Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+# INET6_NTOA + MULTIBYTE CHARSET.
+#
+SET NAMES gbk;
+SELECT is_ipv4(inet_ntoa('1'));
+is_ipv4(inet_ntoa('1'))
+1
+SELECT is_ipv6(inet_ntoa('1'));
+is_ipv6(inet_ntoa('1'))
+0
+SELECT inet6_aton(inet_ntoa('1'));
+inet6_aton(inet_ntoa('1'))
+
+SELECT inet6_ntoa(inet_ntoa('1'));
+inet6_ntoa(inet_ntoa('1'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_latin1.result'
--- a/mysql-test/r/ctype_latin1.result	2012-02-23 16:32:32 +0000
+++ b/mysql-test/r/ctype_latin1.result	2012-03-05 13:18:39 +0000
@@ -4032,5 +4032,22 @@ hex(weight_string('abc' as char(5) LEVEL
 FFFF9C9D9E
 set names latin1;
 #
+# Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+# INET6_NTOA + MULTIBYTE CHARSET.
+#
+SET NAMES latin1;
+SELECT is_ipv4(inet_ntoa('1'));
+is_ipv4(inet_ntoa('1'))
+1
+SELECT is_ipv6(inet_ntoa('1'));
+is_ipv6(inet_ntoa('1'))
+0
+SELECT inet6_aton(inet_ntoa('1'));
+inet6_aton(inet_ntoa('1'))
+
+SELECT inet6_ntoa(inet_ntoa('1'));
+inet6_ntoa(inet_ntoa('1'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_latin2.result'
--- a/mysql-test/r/ctype_latin2.result	2010-03-22 09:13:41 +0000
+++ b/mysql-test/r/ctype_latin2.result	2012-03-05 13:18:39 +0000
@@ -601,5 +601,22 @@ select hex(weight_string('abc' as char(5
 hex(weight_string('abc' as char(5) LEVEL 1 DESC REVERSE))
 DFDF9C9D9E
 #
+# Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+# INET6_NTOA + MULTIBYTE CHARSET.
+#
+SET NAMES latin2;
+SELECT is_ipv4(inet_ntoa('1'));
+is_ipv4(inet_ntoa('1'))
+1
+SELECT is_ipv6(inet_ntoa('1'));
+is_ipv6(inet_ntoa('1'))
+0
+SELECT inet6_aton(inet_ntoa('1'));
+inet6_aton(inet_ntoa('1'))
+
+SELECT inet6_ntoa(inet_ntoa('1'));
+inet6_ntoa(inet_ntoa('1'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_sjis.result'
--- a/mysql-test/r/ctype_sjis.result	2011-03-04 14:59:32 +0000
+++ b/mysql-test/r/ctype_sjis.result	2012-03-05 13:18:39 +0000
@@ -14955,5 +14955,22 @@ select hex(weight_string(cast(0x81408140
 hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0))
 81408140814020202020202020202020202020202020202020
 #
+# Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+# INET6_NTOA + MULTIBYTE CHARSET.
+#
+SET NAMES sjis;
+SELECT is_ipv4(inet_ntoa('1'));
+is_ipv4(inet_ntoa('1'))
+1
+SELECT is_ipv6(inet_ntoa('1'));
+is_ipv6(inet_ntoa('1'))
+0
+SELECT inet6_aton(inet_ntoa('1'));
+inet6_aton(inet_ntoa('1'))
+
+SELECT inet6_ntoa(inet_ntoa('1'));
+inet6_ntoa(inet_ntoa('1'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_tis620.result'
--- a/mysql-test/r/ctype_tis620.result	2010-08-30 06:38:09 +0000
+++ b/mysql-test/r/ctype_tis620.result	2012-03-05 13:18:39 +0000
@@ -3307,5 +3307,22 @@ select hex(weight_string(cast(0xE0A1 as
 hex(weight_string(cast(0xE0A1 as char) as char(1)))
 E0
 #
+# Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+# INET6_NTOA + MULTIBYTE CHARSET.
+#
+SET NAMES tis620;
+SELECT is_ipv4(inet_ntoa('1'));
+is_ipv4(inet_ntoa('1'))
+1
+SELECT is_ipv6(inet_ntoa('1'));
+is_ipv6(inet_ntoa('1'))
+0
+SELECT inet6_aton(inet_ntoa('1'));
+inet6_aton(inet_ntoa('1'))
+
+SELECT inet6_ntoa(inet_ntoa('1'));
+inet6_ntoa(inet_ntoa('1'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_ujis.result'
--- a/mysql-test/r/ctype_ujis.result	2010-11-18 13:50:08 +0000
+++ b/mysql-test/r/ctype_ujis.result	2012-03-05 13:18:39 +0000
@@ -25658,5 +25658,22 @@ select hex(weight_string(cast(0x8FA2C38F
 hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 4, 0xC0))
 8FA2C38FA2C38FA2C320202020202020202020202020202020
 #
+# Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+# INET6_NTOA + MULTIBYTE CHARSET.
+#
+SET NAMES ujis;
+SELECT is_ipv4(inet_ntoa('1'));
+is_ipv4(inet_ntoa('1'))
+1
+SELECT is_ipv6(inet_ntoa('1'));
+is_ipv6(inet_ntoa('1'))
+0
+SELECT inet6_aton(inet_ntoa('1'));
+inet6_aton(inet_ntoa('1'))
+
+SELECT inet6_ntoa(inet_ntoa('1'));
+inet6_ntoa(inet_ntoa('1'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_utf8.result'
--- a/mysql-test/r/ctype_utf8.result	2012-02-27 16:48:05 +0000
+++ b/mysql-test/r/ctype_utf8.result	2012-03-05 13:18:39 +0000
@@ -5549,5 +5549,22 @@ c
 drop table t1;
 set max_sort_length=default;
 #
+# Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+# INET6_NTOA + MULTIBYTE CHARSET.
+#
+SET NAMES utf8;
+SELECT is_ipv4(inet_ntoa('1'));
+is_ipv4(inet_ntoa('1'))
+1
+SELECT is_ipv6(inet_ntoa('1'));
+is_ipv6(inet_ntoa('1'))
+0
+SELECT inet6_aton(inet_ntoa('1'));
+inet6_aton(inet_ntoa('1'))
+
+SELECT inet6_ntoa(inet_ntoa('1'));
+inet6_ntoa(inet_ntoa('1'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_utf8mb4.result'
--- a/mysql-test/r/ctype_utf8mb4.result	2011-06-24 12:53:57 +0000
+++ b/mysql-test/r/ctype_utf8mb4.result	2012-03-05 13:18:39 +0000
@@ -2605,5 +2605,25 @@ DROP TABLE t1, t2;
 # End of 5.5 tests
 #
 #
-# End of tests
+# Start of 5.6 tests
+#
+#
+# Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+# INET6_NTOA + MULTIBYTE CHARSET.
+#
+SET NAMES utf8mb4;
+SELECT is_ipv4(inet_ntoa('1'));
+is_ipv4(inet_ntoa('1'))
+1
+SELECT is_ipv6(inet_ntoa('1'));
+is_ipv6(inet_ntoa('1'))
+0
+SELECT inet6_aton(inet_ntoa('1'));
+inet6_aton(inet_ntoa('1'))
+
+SELECT inet6_ntoa(inet_ntoa('1'));
+inet6_ntoa(inet_ntoa('1'))
+NULL
+#
+# End of 5.6 tests
 #

=== modified file 'mysql-test/t/ctype_ascii.test'
--- a/mysql-test/t/ctype_ascii.test	2007-08-07 09:35:20 +0000
+++ b/mysql-test/t/ctype_ascii.test	2012-03-05 13:18:39 +0000
@@ -9,5 +9,16 @@ insert into t1 (a) values (' '), ('a'),
 select t1a.a, t1b.a from t1 as t1a, t1 as t1b where t1a.a=t1b.a order by binary t1a.a, binary t1b.a;
 drop table t1;
 
-#
 --echo End of 5.0 tests.
+
+--echo Start of 5.6 tests.
+
+--echo #
+--echo # Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+--echo # INET6_NTOA + MULTIBYTE CHARSET.
+--echo #
+
+SET NAMES ascii;
+--source include/ctype_inet.inc
+
+--echo End of 5.6 tests.

=== modified file 'mysql-test/t/ctype_big5.test'
--- a/mysql-test/t/ctype_big5.test	2010-03-22 09:13:41 +0000
+++ b/mysql-test/t/ctype_big5.test	2012-03-05 13:18:39 +0000
@@ -168,5 +168,13 @@ set collation_connection=big5_bin;
 --source include/weight_string_A1A1.inc
 
 --echo #
+--echo # Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+--echo # INET6_NTOA + MULTIBYTE CHARSET. 
+--echo #
+
+SET NAMES big5;
+--source include/ctype_inet.inc
+
+--echo #
 --echo # End of 5.6 tests
 --echo #

=== modified file 'mysql-test/t/ctype_binary.test'
--- a/mysql-test/t/ctype_binary.test	2010-02-11 04:17:25 +0000
+++ b/mysql-test/t/ctype_binary.test	2012-03-05 13:18:39 +0000
@@ -10,3 +10,19 @@ set names binary;
 --echo #
 --echo # End of 5.5 tests
 --echo #
+
+--echo #
+--echo # Start of 5.6 tests
+--echo #
+
+#
+# Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+# INET6_NTOA + MULTIBYTE CHARSET.
+#
+
+SET NAMES binary;
+--source include/ctype_inet.inc
+
+--echo #
+--echo # End of 5.6 tests
+--echo #

=== modified file 'mysql-test/t/ctype_cp1250_ch.test'
--- a/mysql-test/t/ctype_cp1250_ch.test	2011-02-17 11:58:08 +0000
+++ b/mysql-test/t/ctype_cp1250_ch.test	2012-03-05 13:18:39 +0000
@@ -110,6 +110,14 @@ set names cp1250 collate cp1250_czech_cs
 --source include/weight_string_l12.inc
 
 --echo #
+--echo # Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+--echo # INET6_NTOA + MULTIBYTE CHARSET.
+--echo #
+
+SET NAMES cp1250;
+--source include/ctype_inet.inc
+
+--echo #
 --echo # End of 5.6 tests
 --echo #
 

=== modified file 'mysql-test/t/ctype_cp1251.test'
--- a/mysql-test/t/ctype_cp1251.test	2011-02-18 07:43:02 +0000
+++ b/mysql-test/t/ctype_cp1251.test	2012-03-05 13:18:39 +0000
@@ -94,7 +94,22 @@ SELECT COALESCE(IF(test1=1, 1, NULL), te
 SELECT COALESCE(IF(test1=1, NULL, 1), test2) FROM t1;
 DROP TABLE t1;
 
-
 --echo #
 --echo # End of 5.5 tests
 --echo #
+
+--echo #
+--echo # Start of 5.6 tests
+--echo #
+
+#
+# Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+# INET6_NTOA + MULTIBYTE CHARSET.
+#
+
+SET NAMES cp1251; 
+--source include/ctype_inet.inc
+
+--echo #
+--echo # End of 5.6 tests
+--echo #

=== modified file 'mysql-test/t/ctype_eucjpms.test'
--- a/mysql-test/t/ctype_eucjpms.test	2011-02-17 11:58:08 +0000
+++ b/mysql-test/t/ctype_eucjpms.test	2012-03-05 13:18:39 +0000
@@ -517,6 +517,14 @@ set collation_connection=eucjpms_bin;
 --source include/weight_string_8EA1.inc
 --source include/weight_string_8FA2C3.inc
 
+#
+# Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+# INET6_NTOA + MULTIBYTE CHARSET.
+#
+
+SET NAMES eucjpms;
+--source include/ctype_inet.inc
+
 --echo #
 --echo # End of 5.6 tests
 --echo #

=== modified file 'mysql-test/t/ctype_euckr.test'
--- a/mysql-test/t/ctype_euckr.test	2010-03-22 09:13:41 +0000
+++ b/mysql-test/t/ctype_euckr.test	2012-03-05 13:18:39 +0000
@@ -191,6 +191,14 @@ set collation_connection=euckr_bin;
 --source include/weight_string_l1.inc
 --source include/weight_string_A1A1.inc
 
+#
+# Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+# INET6_NTOA + MULTIBYTE CHARSET.
+#
+
+SET NAMES euckr;
+--source include/ctype_inet.inc
+
 --echo #
 --echo # End of 5.6 tests
 --echo #

=== modified file 'mysql-test/t/ctype_gb2312.test'
--- a/mysql-test/t/ctype_gb2312.test	2010-03-22 09:13:41 +0000
+++ b/mysql-test/t/ctype_gb2312.test	2012-03-05 13:18:39 +0000
@@ -147,5 +147,13 @@ set collation_connection=gb2312_bin;
 --source include/weight_string_A1A1.inc
 
 --echo #
+--echo # Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+--echo # INET6_NTOA + MULTIBYTE CHARSET.
+--echo #
+
+SET NAMES gb2312;
+--source include/ctype_inet.inc
+
+--echo #
 --echo # End of 5.6 tests
 --echo #

=== modified file 'mysql-test/t/ctype_gbk.test'
--- a/mysql-test/t/ctype_gbk.test	2010-03-22 09:13:41 +0000
+++ b/mysql-test/t/ctype_gbk.test	2012-03-05 13:18:39 +0000
@@ -185,5 +185,13 @@ set collation_connection=gbk_bin;
 --source include/weight_string_8EA1.inc
 
 --echo #
+--echo # Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+--echo # INET6_NTOA + MULTIBYTE CHARSET.
+--echo #
+
+SET NAMES gbk; 
+--source include/ctype_inet.inc
+
+--echo #
 --echo # End of 5.6 tests
 --echo #

=== modified file 'mysql-test/t/ctype_latin1.test'
--- a/mysql-test/t/ctype_latin1.test	2011-03-04 15:55:18 +0000
+++ b/mysql-test/t/ctype_latin1.test	2012-03-05 13:18:39 +0000
@@ -194,5 +194,13 @@ set @@collation_connection=binary;
 set names latin1;
 
 --echo #
+--echo # Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+--echo # INET6_NTOA + MULTIBYTE CHARSET.
+--echo #
+
+SET NAMES latin1;
+--source include/ctype_inet.inc
+
+--echo #
 --echo # End of 5.6 tests
 --echo #

=== modified file 'mysql-test/t/ctype_latin2.test'
--- a/mysql-test/t/ctype_latin2.test	2010-03-22 09:13:41 +0000
+++ b/mysql-test/t/ctype_latin2.test	2012-03-05 13:18:39 +0000
@@ -71,5 +71,13 @@ set collation_connection=latin2_bin;
 --source include/weight_string_l1.inc
 
 --echo #
+--echo # Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+--echo # INET6_NTOA + MULTIBYTE CHARSET.
+--echo #
+
+SET NAMES latin2;
+--source include/ctype_inet.inc
+
+--echo #
 --echo # End of 5.6 tests
 --echo #

=== modified file 'mysql-test/t/ctype_sjis.test'
--- a/mysql-test/t/ctype_sjis.test	2011-03-04 14:59:32 +0000
+++ b/mysql-test/t/ctype_sjis.test	2012-03-05 13:18:39 +0000
@@ -212,7 +212,13 @@ set collation_connection=sjis_bin;
 --source include/weight_string_8140.inc
 
 --echo #
---echo # End of 5.6 tests
+--echo # Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+--echo # INET6_NTOA + MULTIBYTE CHARSET.
 --echo #
 
+SET NAMES sjis;
+--source include/ctype_inet.inc
 
+--echo #
+--echo # End of 5.6 tests
+--echo #

=== modified file 'mysql-test/t/ctype_tis620.test'
--- a/mysql-test/t/ctype_tis620.test	2010-03-22 09:13:41 +0000
+++ b/mysql-test/t/ctype_tis620.test	2012-03-05 13:18:39 +0000
@@ -186,5 +186,13 @@ select hex(weight_string(cast(0xE0A1 as
 select hex(weight_string(cast(0xE0A1 as char) as char(1)));
 
 --echo #
+--echo # Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+--echo # INET6_NTOA + MULTIBYTE CHARSET.
+--echo #
+
+SET NAMES tis620;
+--source include/ctype_inet.inc
+
+--echo #
 --echo # End of 5.6 tests
 --echo #

=== modified file 'mysql-test/t/ctype_ujis.test'
--- a/mysql-test/t/ctype_ujis.test	2010-11-11 12:05:22 +0000
+++ b/mysql-test/t/ctype_ujis.test	2012-03-05 13:18:39 +0000
@@ -1347,5 +1347,13 @@ set collation_connection=ujis_bin;
 --source include/weight_string_8FA2C3.inc
 
 --echo #
+--echo # Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+--echo # INET6_NTOA + MULTIBYTE CHARSET.
+--echo #
+
+SET NAMES ujis;
+--source include/ctype_inet.inc
+
+--echo #
 --echo # End of 5.6 tests
 --echo #

=== modified file 'mysql-test/t/ctype_utf8.test'
--- a/mysql-test/t/ctype_utf8.test	2012-01-23 10:02:54 +0000
+++ b/mysql-test/t/ctype_utf8.test	2012-03-05 13:18:39 +0000
@@ -1637,6 +1637,14 @@ drop table t1;
 set max_sort_length=default;
 
 --echo #
+--echo # Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+--echo # INET6_NTOA + MULTIBYTE CHARSET.
+--echo #
+
+SET NAMES utf8; 
+--source include/ctype_inet.inc
+
+--echo #
 --echo # End of 5.6 tests
 --echo #
 

=== modified file 'mysql-test/t/ctype_utf8mb4.test'
--- a/mysql-test/t/ctype_utf8mb4.test	2010-09-28 15:29:26 +0000
+++ b/mysql-test/t/ctype_utf8mb4.test	2012-03-05 13:18:39 +0000
@@ -1816,5 +1816,17 @@ DROP TABLE t1, t2;
 --echo #
 
 --echo #
---echo # End of tests
+--echo # Start of 5.6 tests
+--echo #
+
+--echo #
+--echo # Bugs#12635232: VALGRIND WARNINGS: IS_IPV6, IS_IPV4, INET6_ATON,
+--echo # INET6_NTOA + MULTIBYTE CHARSET.
+--echo #
+
+SET NAMES utf8mb4;
+--source include/ctype_inet.inc
+
+--echo #
+--echo # End of 5.6 tests
 --echo #

=== modified file 'sql/item_inetfunc.cc'
--- a/sql/item_inetfunc.cc	2011-06-02 14:01:33 +0000
+++ b/sql/item_inetfunc.cc	2012-03-05 13:18:39 +0000
@@ -242,7 +242,7 @@ static bool str_to_ipv4(const char *str,
   int dot_count= 0;
   char c= 0;
 
-  while (*p && ((p - str) < str_length))
+  while (((p - str) < str_length) && *p)
   {
     c= *p++;
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (brajmohan.saxena:3712 to 3713) brajmohan saxena5 Mar