summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@oracle.com>2011-01-25 15:43:08 +0200
committerMarko Mäkelä <marko.makela@oracle.com>2011-01-25 15:43:08 +0200
commite44703db76e87fccbcc2e51606f04b18b55a0544 (patch)
treea53a03cac49662204bec295875fba72339d318d6 /storage
parent896e0ba4e0304fbd1b056022d8e27f6ce146a83e (diff)
downloadmariadb-git-e44703db76e87fccbcc2e51606f04b18b55a0544.tar.gz
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.
Diffstat (limited to 'storage')
-rw-r--r--storage/innodb_plugin/ChangeLog6
-rw-r--r--storage/innodb_plugin/row/row0upd.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog
index cac72fd3075..e2fdeecfcc1 100644
--- a/storage/innodb_plugin/ChangeLog
+++ b/storage/innodb_plugin/ChangeLog
@@ -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()
diff --git a/storage/innodb_plugin/row/row0upd.c b/storage/innodb_plugin/row/row0upd.c
index 4aa1474a25b..691d263e6ed 100644
--- a/storage/innodb_plugin/row/row0upd.c
+++ b/storage/innodb_plugin/row/row0upd.c
@@ -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);