List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:May 10 2012 9:35am
Subject:bzr push into mysql-trunk branch (tor.didriksen:3813 to 3814) Bug#14040277
View as plain text  
 3814 Tor Didriksen	2012-05-10
      Bug#14040277 UNINITIALIZED VALUE REFERENCED IN STR_TO_IPV6
      
      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.
      
      The patch for Bug#12635232 fixed it for str_to_ipv4()
      This patch fixes it for str_to_ipv6()

    modified:
      mysql-test/include/ctype_inet.inc
      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
      sql/item_inetfunc.cc
 3813 Marko Mäkelä	2012-05-10
      Bug#14006907 FOREIGN KEY problems after DROP INDEX
      
      dict_index_t: Add the to_be_dropped flag to incidate when an index
      is about to be dropped.
      
      dict_foreign_find_index(): Assert that the caller is holding the
      dict_sys->mutex. Skip indexes that are flagged as to-be-dropped.
      
      dict_foreign_replace_index(): Assert that the index is to-be-dropped.
      
      ha_innobase::prepare_inplace_alter_table(): Lock the data dictionary
      while checking if any foreign key constraints depend on the indexes
      that are to be dropped. Flag them as such in the data dictionary cache.
      
      ha_innobase::inplace_alter_table(): Add a debug sync point for the
      DEBUG_SYNC test.
      
      rollback_inplace_alter_table(): Clear the index->to_be_dropped flag in
      the data dictionary cache.
      
      rb:1049 approved by Jimmy Yang

    added:
      mysql-test/suite/innodb/r/innodb_bug14006907.result
      mysql-test/suite/innodb/t/innodb_bug14006907.test
    modified:
      storage/innobase/dict/dict0dict.cc
      storage/innobase/handler/handler0alter.cc
      storage/innobase/include/dict0dict.h
      storage/innobase/include/dict0mem.h
=== modified file 'mysql-test/include/ctype_inet.inc'
--- a/mysql-test/include/ctype_inet.inc	2012-03-05 13:18:39 +0000
+++ b/mysql-test/include/ctype_inet.inc	2012-05-10 09:34:16 +0000
@@ -2,3 +2,8 @@ SELECT is_ipv4(inet_ntoa('1'));
 SELECT is_ipv6(inet_ntoa('1'));
 SELECT inet6_aton(inet_ntoa('1'));
 SELECT inet6_ntoa(inet_ntoa('1'));
+
+--echo #
+--echo # Bug#14040277 UNINITIALIZED VALUE REFERENCED IN STR_TO_IPV6
+--echo #
+SELECT inet6_aton(soundex('a'));

=== modified file 'mysql-test/r/ctype_ascii.result'
Binary files a/mysql-test/r/ctype_ascii.result	2012-03-05 13:18:39 +0000 and b/mysql-test/r/ctype_ascii.result	2012-05-10 09:34:16 +0000 differ

=== modified file 'mysql-test/r/ctype_big5.result'
--- a/mysql-test/r/ctype_big5.result	2012-03-05 13:18:39 +0000
+++ b/mysql-test/r/ctype_big5.result	2012-05-10 09:34:16 +0000
@@ -1045,5 +1045,11 @@ SELECT inet6_ntoa(inet_ntoa('1'));
 inet6_ntoa(inet_ntoa('1'))
 NULL
 #
+# Bug#14040277 UNINITIALIZED VALUE REFERENCED IN STR_TO_IPV6
+#
+SELECT inet6_aton(soundex('a'));
+inet6_aton(soundex('a'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_binary.result'
--- a/mysql-test/r/ctype_binary.result	2012-03-05 13:18:39 +0000
+++ b/mysql-test/r/ctype_binary.result	2012-05-10 09:34:16 +0000
@@ -2895,5 +2895,11 @@ SELECT inet6_ntoa(inet_ntoa('1'));
 inet6_ntoa(inet_ntoa('1'))
 NULL
 #
+# Bug#14040277 UNINITIALIZED VALUE REFERENCED IN STR_TO_IPV6
+#
+SELECT inet6_aton(soundex('a'));
+inet6_aton(soundex('a'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_cp1250_ch.result'
--- a/mysql-test/r/ctype_cp1250_ch.result	2012-03-05 13:18:39 +0000
+++ b/mysql-test/r/ctype_cp1250_ch.result	2012-05-10 09:34:16 +0000
@@ -655,5 +655,11 @@ SELECT inet6_ntoa(inet_ntoa('1'));
 inet6_ntoa(inet_ntoa('1'))
 NULL
 #
+# Bug#14040277 UNINITIALIZED VALUE REFERENCED IN STR_TO_IPV6
+#
+SELECT inet6_aton(soundex('a'));
+inet6_aton(soundex('a'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_cp1251.result'
--- a/mysql-test/r/ctype_cp1251.result	2012-03-05 13:18:39 +0000
+++ b/mysql-test/r/ctype_cp1251.result	2012-05-10 09:34:16 +0000
@@ -3302,5 +3302,11 @@ SELECT inet6_ntoa(inet_ntoa('1'));
 inet6_ntoa(inet_ntoa('1'))
 NULL
 #
+# Bug#14040277 UNINITIALIZED VALUE REFERENCED IN STR_TO_IPV6
+#
+SELECT inet6_aton(soundex('a'));
+inet6_aton(soundex('a'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_eucjpms.result'
--- a/mysql-test/r/ctype_eucjpms.result	2012-03-05 13:18:39 +0000
+++ b/mysql-test/r/ctype_eucjpms.result	2012-05-10 09:34:16 +0000
@@ -33365,5 +33365,11 @@ SELECT inet6_ntoa(inet_ntoa('1'));
 inet6_ntoa(inet_ntoa('1'))
 NULL
 #
+# Bug#14040277 UNINITIALIZED VALUE REFERENCED IN STR_TO_IPV6
+#
+SELECT inet6_aton(soundex('a'));
+inet6_aton(soundex('a'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_euckr.result'
--- a/mysql-test/r/ctype_euckr.result	2012-03-05 13:18:39 +0000
+++ b/mysql-test/r/ctype_euckr.result	2012-05-10 09:34:16 +0000
@@ -25008,5 +25008,11 @@ SELECT inet6_ntoa(inet_ntoa('1'));
 inet6_ntoa(inet_ntoa('1'))
 NULL
 #
+# Bug#14040277 UNINITIALIZED VALUE REFERENCED IN STR_TO_IPV6
+#
+SELECT inet6_aton(soundex('a'));
+inet6_aton(soundex('a'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_gb2312.result'
--- a/mysql-test/r/ctype_gb2312.result	2012-03-05 13:18:39 +0000
+++ b/mysql-test/r/ctype_gb2312.result	2012-05-10 09:34:16 +0000
@@ -1039,5 +1039,11 @@ SELECT inet6_ntoa(inet_ntoa('1'));
 inet6_ntoa(inet_ntoa('1'))
 NULL
 #
+# Bug#14040277 UNINITIALIZED VALUE REFERENCED IN STR_TO_IPV6
+#
+SELECT inet6_aton(soundex('a'));
+inet6_aton(soundex('a'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_gbk.result'
--- a/mysql-test/r/ctype_gbk.result	2012-03-05 13:18:39 +0000
+++ b/mysql-test/r/ctype_gbk.result	2012-05-10 09:34:16 +0000
@@ -1419,5 +1419,11 @@ SELECT inet6_ntoa(inet_ntoa('1'));
 inet6_ntoa(inet_ntoa('1'))
 NULL
 #
+# Bug#14040277 UNINITIALIZED VALUE REFERENCED IN STR_TO_IPV6
+#
+SELECT inet6_aton(soundex('a'));
+inet6_aton(soundex('a'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_latin1.result'
--- a/mysql-test/r/ctype_latin1.result	2012-03-05 13:18:39 +0000
+++ b/mysql-test/r/ctype_latin1.result	2012-05-10 09:34:16 +0000
@@ -4049,5 +4049,11 @@ SELECT inet6_ntoa(inet_ntoa('1'));
 inet6_ntoa(inet_ntoa('1'))
 NULL
 #
+# Bug#14040277 UNINITIALIZED VALUE REFERENCED IN STR_TO_IPV6
+#
+SELECT inet6_aton(soundex('a'));
+inet6_aton(soundex('a'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_latin2.result'
--- a/mysql-test/r/ctype_latin2.result	2012-03-05 13:18:39 +0000
+++ b/mysql-test/r/ctype_latin2.result	2012-05-10 09:34:16 +0000
@@ -618,5 +618,11 @@ SELECT inet6_ntoa(inet_ntoa('1'));
 inet6_ntoa(inet_ntoa('1'))
 NULL
 #
+# Bug#14040277 UNINITIALIZED VALUE REFERENCED IN STR_TO_IPV6
+#
+SELECT inet6_aton(soundex('a'));
+inet6_aton(soundex('a'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_sjis.result'
--- a/mysql-test/r/ctype_sjis.result	2012-03-05 13:18:39 +0000
+++ b/mysql-test/r/ctype_sjis.result	2012-05-10 09:34:16 +0000
@@ -14972,5 +14972,11 @@ SELECT inet6_ntoa(inet_ntoa('1'));
 inet6_ntoa(inet_ntoa('1'))
 NULL
 #
+# Bug#14040277 UNINITIALIZED VALUE REFERENCED IN STR_TO_IPV6
+#
+SELECT inet6_aton(soundex('a'));
+inet6_aton(soundex('a'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_tis620.result'
--- a/mysql-test/r/ctype_tis620.result	2012-03-05 13:18:39 +0000
+++ b/mysql-test/r/ctype_tis620.result	2012-05-10 09:34:16 +0000
@@ -3324,5 +3324,11 @@ SELECT inet6_ntoa(inet_ntoa('1'));
 inet6_ntoa(inet_ntoa('1'))
 NULL
 #
+# Bug#14040277 UNINITIALIZED VALUE REFERENCED IN STR_TO_IPV6
+#
+SELECT inet6_aton(soundex('a'));
+inet6_aton(soundex('a'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_ujis.result'
--- a/mysql-test/r/ctype_ujis.result	2012-03-05 13:18:39 +0000
+++ b/mysql-test/r/ctype_ujis.result	2012-05-10 09:34:16 +0000
@@ -25675,5 +25675,11 @@ SELECT inet6_ntoa(inet_ntoa('1'));
 inet6_ntoa(inet_ntoa('1'))
 NULL
 #
+# Bug#14040277 UNINITIALIZED VALUE REFERENCED IN STR_TO_IPV6
+#
+SELECT inet6_aton(soundex('a'));
+inet6_aton(soundex('a'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_utf8.result'
--- a/mysql-test/r/ctype_utf8.result	2012-03-05 13:18:39 +0000
+++ b/mysql-test/r/ctype_utf8.result	2012-05-10 09:34:16 +0000
@@ -5566,5 +5566,11 @@ SELECT inet6_ntoa(inet_ntoa('1'));
 inet6_ntoa(inet_ntoa('1'))
 NULL
 #
+# Bug#14040277 UNINITIALIZED VALUE REFERENCED IN STR_TO_IPV6
+#
+SELECT inet6_aton(soundex('a'));
+inet6_aton(soundex('a'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'mysql-test/r/ctype_utf8mb4.result'
--- a/mysql-test/r/ctype_utf8mb4.result	2012-04-24 07:35:13 +0000
+++ b/mysql-test/r/ctype_utf8mb4.result	2012-05-10 09:34:16 +0000
@@ -2639,5 +2639,11 @@ SELECT inet6_ntoa(inet_ntoa('1'));
 inet6_ntoa(inet_ntoa('1'))
 NULL
 #
+# Bug#14040277 UNINITIALIZED VALUE REFERENCED IN STR_TO_IPV6
+#
+SELECT inet6_aton(soundex('a'));
+inet6_aton(soundex('a'))
+NULL
+#
 # End of 5.6 tests
 #

=== modified file 'sql/item_inetfunc.cc'
--- a/sql/item_inetfunc.cc	2012-03-05 13:18:39 +0000
+++ b/sql/item_inetfunc.cc	2012-05-10 09:34:16 +0000
@@ -382,7 +382,7 @@ static bool str_to_ipv6(const char *str,
   int chars_in_group= 0;
   int group_value= 0;
 
-  while (*p && ((p - str) < str_length))
+  while (((p - str) < str_length) && *p)
   {
     char c= *p++;
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (tor.didriksen:3813 to 3814) Bug#14040277Tor Didriksen7 Jun