diff options
author | Monty <monty@mariadb.org> | 2019-08-14 23:46:47 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-07-02 14:25:41 +0300 |
commit | 29f9e679adc90adf5d3c6e08da947789c9c2ac8b (patch) | |
tree | f15a3530548b3b0c7c9efd34386302fd63ec6c73 /storage/maria | |
parent | 3f2044ae99633ce6d9c756bb6b045efc0707b4b5 (diff) | |
download | mariadb-git-29f9e679adc90adf5d3c6e08da947789c9c2ac8b.tar.gz |
Don't copy uninitialized bytes when copying varstrings
When using field_conv(), which is called in case of field1=field2 copy in
fill_records(), full varstring's was copied, including unitialized bytes.
This caused valgrind to compilain about usage of unitialized bytes when
using Aria static length records.
Fixed by not using memcpy when copying varstrings but instead just copy
the real bytes.
Diffstat (limited to 'storage/maria')
-rw-r--r-- | storage/maria/ha_maria.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index ec2a88de4df..c0163473f3a 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -1162,7 +1162,7 @@ int ha_maria::open(const char *name, int mode, uint test_if_locked) that all bytes in the row is properly reset. */ if (file->s->data_file_type == STATIC_RECORD && - (file->s->has_varchar_fields | file->s->has_null_fields)) + (file->s->has_varchar_fields || file->s->has_null_fields)) int_table_flags|= HA_RECORD_MUST_BE_CLEAN_ON_WRITE; for (i= 0; i < table->s->keys; i++) |