List:Commits« Previous MessageNext Message »
From:marko.makela Date:January 26 2011 8:14am
Subject:bzr push into mysql-5.1-innodb branch (marko.makela:3691 to 3692) Bug#59585
View as plain text  
 3692 Marko Mäkelä	2011-01-25
      Bug#59585 Fix 58912 introduces compiler warning
      due to potentially uninitialized variable
      
      row_upd_changes_ord_field_binary(): Initialize dfield_len to suppress the
      warning. The compiler cannot know that row_ext_lookup() does initialize
      dfield_len for us, as it is defined in a different module.

    modified:
      storage/innodb_plugin/ChangeLog
      storage/innodb_plugin/row/row0upd.c
 3691 Marko Mäkelä	2011-01-25
      Bug#59486 Incorrect usage of UNIV_UNLIKELY() in mlog_parse_string()
      
      mlog_parse_string(): Enclose the comparison in UNIV_UNLIKELY,
      not the comparand.

    modified:
      storage/innodb_plugin/ChangeLog
      storage/innodb_plugin/mtr/mtr0log.c
=== modified file 'storage/innodb_plugin/ChangeLog'
--- a/storage/innodb_plugin/ChangeLog	revid:marko.makela@stripped
+++ b/storage/innodb_plugin/ChangeLog	revid:marko.makela@oracle.com-20110125134308-cle24ig6ukwe7zw2
@@ -1,5 +1,11 @@
 2011-01-25	The InnoDB Team
 
+	* row/row0upd.c:
+	Bug#59585 Fix 58912 introduces compiler warning
+	due to potentially uninitialized variable
+
+2011-01-25	The InnoDB Team
+
 	* mtr/mtr0log.c:
 	Bug#59486 Incorrect usage of UNIV_UNLIKELY() in mlog_parse_string()
 

=== modified file 'storage/innodb_plugin/row/row0upd.c'
--- a/storage/innodb_plugin/row/row0upd.c	revid:marko.makela@stripped0110125101728-5m22qrw5558pimj0
+++ b/storage/innodb_plugin/row/row0upd.c	revid:marko.makela@stripped308-cle24ig6ukwe7zw2
@@ -1252,6 +1252,10 @@ row_upd_changes_ord_field_binary(
 		    || dfield_is_null(dfield)) {
 			/* do nothing special */
 		} else if (UNIV_LIKELY_NULL(ext)) {
+			/* Silence a compiler warning without
+			silencing a Valgrind error. */
+			dfield_len = 0;
+			UNIV_MEM_INVALID(&dfield_len, sizeof dfield_len);
 			/* See if the column is stored externally. */
 			buf = row_ext_lookup(ext, col_no, &dfield_len);
 

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20110125134308-cle24ig6ukwe7zw2.bundle
Thread
bzr push into mysql-5.1-innodb branch (marko.makela:3691 to 3692) Bug#59585marko.makela26 Jan