summaryrefslogtreecommitdiff
path: root/storage/perfschema
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-11-03 16:24:47 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-11-03 16:24:47 +0200
commit133b4b46fefde402542214d8226262534dc3601a (patch)
tree51bbdc0ee35a4af61e5af6d97948963ae9354f39 /storage/perfschema
parent44836bcd12e3974e79c928be747955bfb3b73910 (diff)
parent533a13af069d8c9e6c5f4e1a72851497185ade03 (diff)
downloadmariadb-git-133b4b46fefde402542214d8226262534dc3601a.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'storage/perfschema')
-rw-r--r--storage/perfschema/pfs_setup_object.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/storage/perfschema/pfs_setup_object.cc b/storage/perfschema/pfs_setup_object.cc
index 9325b84997f..47afd130761 100644
--- a/storage/perfschema/pfs_setup_object.cc
+++ b/storage/perfschema/pfs_setup_object.cc
@@ -126,12 +126,18 @@ static void set_setup_object_key(PFS_setup_object_key *key,
char *ptr= &key->m_hash_key[0];
ptr[0]= (char) object_type;
ptr++;
- memcpy(ptr, schema, schema_length);
- ptr+= schema_length;
+ if (schema_length)
+ {
+ memcpy(ptr, schema, schema_length);
+ ptr+= schema_length;
+ }
ptr[0]= 0;
ptr++;
- memcpy(ptr, object, object_length);
- ptr+= object_length;
+ if (object_length)
+ {
+ memcpy(ptr, object, object_length);
+ ptr+= object_length;
+ }
ptr[0]= 0;
ptr++;
key->m_key_length= (uint)(ptr - &key->m_hash_key[0]);