From 4649fb37e311a2b0e5d1a81ffc2f4ac4443e42e5 Mon Sep 17 00:00:00 2001 From: Monty Date: Mon, 7 Aug 2017 21:21:13 +0300 Subject: [PATCH] Get rid of valgrind warning for sql_sequence tests. Added extra memcpy to get rid of valgrind warning for sequence tables with InnoDB. When reading a row from InnoDB, some of the bytes in the row are marked as not initialized. Needs to be investigated later, but this is a safe patch for now. --- sql/sql_sequence.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql/sql_sequence.cc b/sql/sql_sequence.cc index d5e2e59de2b..eb9dfe012f7 100644 --- a/sql/sql_sequence.cc +++ b/sql/sql_sequence.cc @@ -595,6 +595,12 @@ int sequence_definition::write(TABLE *table, bool all_fields) else table->rpl_write_set= &table->s->all_set; + /* + The following is needed to fix comparison of rows in + ha_update_first_row() for InnoDB + */ + memcpy(table->record[1],table->s->default_values, table->s->reclength); + /* Update table */ save_write_set= table->write_set; save_read_set= table->read_set;