mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-20279 Increase Aria index length limit
Limit increased from 1000 to 2000. Avoiding stack overflow by only storing keys and pages on the stack in recursive functions if there is plenty of space on it. Other things: - Use less stack space for b-tree operations as we now only allocate as much space as needed instead of always allocating HA_MAX_KEY_LENGTH. - Replaced most usage of my_safe_alloca() in Aria with the stack_alloc interface. - Moved my_setstacksize() to mysys/my_pthread.c
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
#ifndef _myisamchk_h
|
||||
#define _myisamchk_h
|
||||
|
||||
#include <my_stack_alloc.h>
|
||||
|
||||
/*
|
||||
Flags used by xxxxchk.c or/and ha_xxxx.cc that are NOT passed
|
||||
to xxxcheck.c follows:
|
||||
@@ -33,15 +35,6 @@
|
||||
#define O_NEW_DATA 2U
|
||||
#define O_DATA_LOST 4U
|
||||
|
||||
typedef struct st_sort_key_blocks /* Used when sorting */
|
||||
{
|
||||
uchar *buff, *end_pos;
|
||||
uchar lastkey[HA_MAX_POSSIBLE_KEY_BUFF];
|
||||
uint last_length;
|
||||
int inited;
|
||||
} SORT_KEY_BLOCKS;
|
||||
|
||||
|
||||
/*
|
||||
MARIA/MYISAM supports several statistics collection
|
||||
methods. Currently statistics collection method is not stored in
|
||||
@@ -111,6 +104,7 @@ typedef struct st_handler_check_param
|
||||
my_bool retry_repair, force_sort, calc_checksum, static_row_size;
|
||||
char temp_filename[FN_REFLEN];
|
||||
IO_CACHE read_cache;
|
||||
STACK_ALLOC stack_alloc;
|
||||
enum_handler_stats_method stats_method;
|
||||
/* For reporting progress */
|
||||
uint stage, max_stage;
|
||||
@@ -125,14 +119,6 @@ typedef struct st_handler_check_param
|
||||
} HA_CHECK;
|
||||
|
||||
|
||||
typedef struct st_sort_ftbuf
|
||||
{
|
||||
uchar *buf, *end;
|
||||
int count;
|
||||
uchar lastkey[HA_MAX_KEY_BUFF];
|
||||
} SORT_FT_BUF;
|
||||
|
||||
|
||||
typedef struct st_buffpek {
|
||||
my_off_t file_pos; /* Where we are in the sort file */
|
||||
uchar *base, *key; /* Key pointers */
|
||||
|
Reference in New Issue
Block a user