summaryrefslogtreecommitdiff
path: root/sql/sql_sequence.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2017-08-07 21:21:13 +0300
committerMonty <monty@mariadb.org>2017-08-07 21:22:21 +0300
commit4649fb37e311a2b0e5d1a81ffc2f4ac4443e42e5 (patch)
tree10274cc41d46ecee80970399936eac50e14e94e6 /sql/sql_sequence.cc
parent213af08d9951c340e0db9e3d2802aa112dc47b53 (diff)
downloadmariadb-git-4649fb37e311a2b0e5d1a81ffc2f4ac4443e42e5.tar.gz
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.
Diffstat (limited to 'sql/sql_sequence.cc')
-rw-r--r--sql/sql_sequence.cc6
1 files changed, 6 insertions, 0 deletions
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;