summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <aelkin/elkin@dsl-hkibras-fe30f900-107.dhcp.inet.fi>2006-11-17 23:44:14 +0200
committerunknown <aelkin/elkin@dsl-hkibras-fe30f900-107.dhcp.inet.fi>2006-11-17 23:44:14 +0200
commit2ff157dbeee9b175471f6f63084abe799de10562 (patch)
tree7cc9c9171acf77c61cc1dfa6f422ff68921084a1
parenta0672f0674a03125498b345cb8e562982ff1e258 (diff)
downloadmariadb-git-2ff157dbeee9b175471f6f63084abe799de10562.tar.gz
Bug #24403 valgrind complained on uninited st_table, rbr + innodb
open_table_from_share did not initialize table->record members. that was interpreted as the error by valgrind. Fixed with bzero-ing the members if compilation with -DHAVE_purify. sql/table.cc: zeroing memory allocated for table->record[]
-rw-r--r--sql/table.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 7f80b95c954..c74f72e2539 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1377,7 +1377,9 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias,
if (!(record= (byte*) alloc_root(&outparam->mem_root,
share->rec_buff_length * records)))
goto err; /* purecov: inspected */
-
+#ifdef HAVE_purify
+ bzero(record, share->rec_buff_length * records);
+#endif
if (records == 0)
{
/* We are probably in hard repair, and the buffers should not be used */