From fa490e8022e05e505f8f15481b848a2729337b16 Mon Sep 17 00:00:00 2001 From: Monty Date: Wed, 14 Aug 2019 23:46:47 +0300 Subject: 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. --- sql/handler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/handler.h') diff --git a/sql/handler.h b/sql/handler.h index cbde570483f..63d0bf2215c 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -212,7 +212,8 @@ enum enum_alter_inplace_result { #define HA_HAS_NEW_CHECKSUM (1ULL << 38) #define HA_CAN_VIRTUAL_COLUMNS (1ULL << 39) #define HA_MRR_CANT_SORT (1ULL << 40) -#define HA_RECORD_MUST_BE_CLEAN_ON_WRITE (1ULL << 41) /* unused */ +/* All of VARCHAR is stored, including bytes after real varchar data */ +#define HA_RECORD_MUST_BE_CLEAN_ON_WRITE (1ULL << 41) /* This storage engine supports condition pushdown -- cgit v1.2.1