From 2ecd39c983a232289b863ba2c7bf8f70ebaa261f Mon Sep 17 00:00:00 2001 From: Nayuta Yanagisawa Date: Tue, 11 Jan 2022 21:57:11 +0900 Subject: MDEV-27240 SIGSEGV in ha_spider::store_lock on LOCK TABLE The commit e954d9de gave different lifetime to wide_share and partition_handler_share. This introduced the possibility that partition_handler_share could be accessed even after it was freed. We stop sharing partitoiin_handler_share and make it belong to a single wide_handler to fix the problem. --- storage/spider/spd_table.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'storage/spider/spd_table.h') diff --git a/storage/spider/spd_table.h b/storage/spider/spd_table.h index 2b40fb33d5a..61f9f04d543 100644 --- a/storage/spider/spd_table.h +++ b/storage/spider/spd_table.h @@ -1,5 +1,5 @@ /* Copyright (C) 2008-2019 Kentoku Shiba - Copyright (C) 2019 MariaDB corp + Copyright (C) 2019-2022 MariaDB corp This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -321,7 +321,7 @@ uchar *spider_wide_share_get_key( #ifdef WITH_PARTITION_STORAGE_ENGINE uchar *spider_pt_handler_share_get_key( - SPIDER_PARTITION_HANDLER_SHARE *share, + SPIDER_PARTITION_HANDLER *share, size_t *length, my_bool not_used __attribute__ ((unused)) ); -- cgit v1.2.1 From b7e4dc121a99e7d38ce2d50ad8f9f948152d7e17 Mon Sep 17 00:00:00 2001 From: Nayuta Yanagisawa Date: Sat, 15 Jan 2022 21:24:25 +0900 Subject: MDEV-27240 fixup: remove dead code --- storage/spider/spd_table.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'storage/spider/spd_table.h') diff --git a/storage/spider/spd_table.h b/storage/spider/spd_table.h index 61f9f04d543..dc351e73c61 100644 --- a/storage/spider/spd_table.h +++ b/storage/spider/spd_table.h @@ -319,14 +319,6 @@ uchar *spider_wide_share_get_key( my_bool not_used __attribute__ ((unused)) ); -#ifdef WITH_PARTITION_STORAGE_ENGINE -uchar *spider_pt_handler_share_get_key( - SPIDER_PARTITION_HANDLER *share, - size_t *length, - my_bool not_used __attribute__ ((unused)) -); -#endif - uchar *spider_link_get_key( SPIDER_LINK_FOR_HASH *link_for_hash, size_t *length, -- cgit v1.2.1