diff options
author | Monty <monty@mariadb.org> | 2020-03-14 15:24:13 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-03-14 15:24:13 +0200 |
commit | 5754ea2eca0ffa191b4be46fdebf2d49c438f151 (patch) | |
tree | 46379a41fee07a5da2e206206efdc4919e66bf13 | |
parent | 41cba6c90b17c0f81642e532076d860487cf52c7 (diff) | |
download | mariadb-git-5754ea2eca0ffa191b4be46fdebf2d49c438f151.tar.gz |
Fixed compiler failures with gcc 7.4.1 and new my_malloc code
-rw-r--r-- | storage/innobase/buf/buf0buddy.cc | 4 | ||||
-rw-r--r-- | storage/maria/ha_s3.cc | 4 | ||||
-rw-r--r-- | storage/maria/s3_func.c | 20 |
3 files changed, 16 insertions, 12 deletions
diff --git a/storage/innobase/buf/buf0buddy.cc b/storage/innobase/buf/buf0buddy.cc index 7e3c06892a0..f660ff508c1 100644 --- a/storage/innobase/buf/buf0buddy.cc +++ b/storage/innobase/buf/buf0buddy.cc @@ -333,9 +333,9 @@ static buf_buddy_free_t* buf_buddy_alloc_zip(ulint i) if (buf) { /* Trash the page other than the BUF_BUDDY_STAMP_NONFREE. */ - UNIV_MEM_TRASH((void*) buf, ~i, BUF_BUDDY_STAMP_OFFSET); + UNIV_MEM_TRASH((void*) buf, (int) ~i, BUF_BUDDY_STAMP_OFFSET); UNIV_MEM_TRASH(BUF_BUDDY_STAMP_OFFSET + 4 - + buf->stamp.bytes, ~i, + + buf->stamp.bytes, (int) ~i, (BUF_BUDDY_LOW << i) - (BUF_BUDDY_STAMP_OFFSET + 4)); ut_ad(mach_read_from_4(buf->stamp.bytes diff --git a/storage/maria/ha_s3.cc b/storage/maria/ha_s3.cc index 5d37a681e9b..27edc3dad5e 100644 --- a/storage/maria/ha_s3.cc +++ b/storage/maria/ha_s3.cc @@ -94,7 +94,7 @@ static void update_access_key(MYSQL_THD thd, if (s3_tmp_access_key[0]) { s3_access_key= s3_tmp_access_key; - s3_tmp_access_key= my_strdup("*****", MYF(MY_WME)); + s3_tmp_access_key= my_strdup(PSI_NOT_INSTRUMENTED, "*****", MYF(MY_WME)); } } @@ -108,7 +108,7 @@ static void update_secret_key(MYSQL_THD thd, if (s3_tmp_secret_key[0]) { s3_secret_key= s3_tmp_secret_key; - s3_tmp_secret_key= my_strdup("*****", MYF(MY_WME)); + s3_tmp_secret_key= my_strdup(PSI_NOT_INSTRUMENTED, "*****", MYF(MY_WME)); } } diff --git a/storage/maria/s3_func.c b/storage/maria/s3_func.c index b0d23c8b6ac..7ff8447679f 100644 --- a/storage/maria/s3_func.c +++ b/storage/maria/s3_func.c @@ -50,22 +50,24 @@ TYPELIB s3_protocol_typelib= {array_elements(protocol_types)-1,"", static void *s3_wrap_malloc(size_t size) { - return my_malloc(size, MYF(MY_WME)); + return my_malloc(PSI_NOT_INSTRUMENTED, size, MYF(MY_WME)); } static void *s3_wrap_calloc(size_t nmemb, size_t size) { - return my_malloc(nmemb * size, MYF(MY_WME | MY_ZEROFILL)); + return my_malloc(PSI_NOT_INSTRUMENTED, nmemb * size, + MYF(MY_WME | MY_ZEROFILL)); } static void *s3_wrap_realloc(void *ptr, size_t size) { - return my_realloc(ptr, size, MYF(MY_WME | MY_ALLOW_ZERO_PTR)); + return my_realloc(PSI_NOT_INSTRUMENTED, ptr, size, + MYF(MY_WME | MY_ALLOW_ZERO_PTR)); } static char *s3_wrap_strdup(const char *str) { - return my_strdup(str, MYF(MY_WME)); + return my_strdup(PSI_NOT_INSTRUMENTED, str, MYF(MY_WME)); } static void s3_wrap_free(void *ptr) @@ -110,7 +112,7 @@ S3_INFO *s3_info_copy(S3_INFO *old) /* Copy lengths */ memcpy(&tmp, old, sizeof(tmp)); /* Allocate new buffers */ - if (!my_multi_malloc(MY_WME, &to, sizeof(S3_INFO), + if (!my_multi_malloc(PSI_NOT_INSTRUMENTED, MY_WME, &to, sizeof(S3_INFO), &tmp.access_key.str, old->access_key.length+1, &tmp.secret_key.str, old->secret_key.length+1, &tmp.region.str, old->region.length+1, @@ -379,7 +381,8 @@ int aria_copy_to_s3(ms3_st *s3_client, const char *aws_bucket, block_size= (block_size/cap.block_size)*cap.block_size; /* Allocate block for data + flag for compress header */ - if (!(alloc_block= (uchar*) my_malloc(block_size+ALIGN_SIZE(1), + if (!(alloc_block= (uchar*) my_malloc(PSI_NOT_INSTRUMENTED, + block_size+ALIGN_SIZE(1), MYF(MY_WME)))) goto err; /* Read/write data here, but with prefix space for compression flag */ @@ -871,7 +874,8 @@ my_bool s3_get_object(ms3_st *s3_client, const char *aws_bucket, length= uint3korr(block->str+1); - if (!(data= (uchar*) my_malloc(length, MYF(MY_WME | MY_THREAD_SPECIFIC)))) + if (!(data= (uchar*) my_malloc(PSI_NOT_INSTRUMENTED, + length, MYF(MY_WME | MY_THREAD_SPECIFIC)))) { s3_free(block); DBUG_RETURN(TRUE); @@ -1183,7 +1187,7 @@ static int s3_read_frm_from_disk(const char *filename, uchar **to, return(1); file_size= (size_t) my_seek(file, 0L, MY_SEEK_END, MYF(0)); - if (!(alloc_block= my_malloc(file_size, MYF(MY_WME)))) + if (!(alloc_block= my_malloc(PSI_NOT_INSTRUMENTED, file_size, MYF(MY_WME)))) goto err; if (my_pread(file, alloc_block, file_size, 0, MYF(MY_WME | MY_FNABP))) |