summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2019-08-14 23:46:47 +0300
committerMonty <monty@mariadb.org>2019-08-15 00:42:56 +0300
commitfa490e8022e05e505f8f15481b848a2729337b16 (patch)
tree5816b20209b704aec95702f7d4b5a18ddc5796a0 /sql/handler.h
parentafe6eb499d7d5d9b4ba9de5746e78b43f25e31a4 (diff)
downloadmariadb-git-fa490e8022e05e505f8f15481b848a2729337b16.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 'sql/handler.h')
-rw-r--r--sql/handler.h3
1 files changed, 2 insertions, 1 deletions
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