1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-33623 Partitioning is broken on big endian architectures

MDEV-33502 Slowdown when running nested statement with many partitions
caused this error as I failed to take into account bigendian architectures.

This patch also introduces bitmap_import() and bitmap_export() to be used
when one wants to store bitmaps in files/logs in a portable way.

Reviewed-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
Monty
2024-03-08 15:18:21 +02:00
parent 9a132d423a
commit f838b2d799
10 changed files with 202 additions and 118 deletions

View File

@@ -8591,7 +8591,7 @@ int spider_mbase_handler::init()
&link_for_hash,
sizeof(SPIDER_LINK_FOR_HASH) * share->link_count,
&minimum_select_bitmap,
table ? sizeof(uchar) * no_bytes_in_map(table->read_set) : 0,
table ? sizeof(uchar) * my_bitmap_buffer_size(table->read_set) : 0,
NullS))
) {
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
@@ -15750,7 +15750,7 @@ void spider_mbase_handler::minimum_select_bitmap_create()
Field **field_p;
DBUG_ENTER("spider_mbase_handler::minimum_select_bitmap_create");
DBUG_PRINT("info",("spider this=%p", this));
memset(minimum_select_bitmap, 0, no_bytes_in_map(table->read_set));
memset(minimum_select_bitmap, 0, my_bitmap_buffer_size(table->read_set));
if (
spider->use_index_merge ||
#ifdef HA_CAN_BULK_ACCESS
@@ -15765,7 +15765,7 @@ void spider_mbase_handler::minimum_select_bitmap_create()
table_share->primary_key == MAX_KEY
) {
/* need all columns */
memset(minimum_select_bitmap, 0xFF, no_bytes_in_map(table->read_set));
memset(minimum_select_bitmap, 0xFF, my_bitmap_buffer_size(table->read_set));
DBUG_VOID_RETURN;
} else {
/* need primary key columns */