Commit 2ff157db authored by unknown's avatar unknown
Browse files

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[]
parent a0672f06
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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 */