mirror of
https://github.com/MariaDB/server.git
synced 2026-05-02 05:05:33 +02:00
MDEV-4425 Regexp enhancements
Clean-up: moving initialization of my_string_stack_guard and pcre_stack_guard into init_libstrings() and init_pcre().
This commit is contained in:
parent
30ad3354b9
commit
c8e6cb9643
1 changed files with 24 additions and 22 deletions
|
|
@ -3293,24 +3293,6 @@ void my_str_free_mysqld(void *ptr)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
Initialize my_str_malloc() and my_str_free()
|
||||
*/
|
||||
static void init_libstrings()
|
||||
{
|
||||
my_str_malloc= &my_str_malloc_mysqld;
|
||||
my_str_free= &my_str_free_mysqld;
|
||||
}
|
||||
|
||||
|
||||
static void init_pcre()
|
||||
{
|
||||
pcre_malloc= pcre_stack_malloc= my_str_malloc_mysqld;
|
||||
pcre_free= pcre_stack_free= my_str_free_mysqld;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef __WIN__
|
||||
|
||||
pthread_handler_t handle_shutdown(void *arg)
|
||||
|
|
@ -3368,6 +3350,30 @@ check_enough_stack_size(int recurse_level)
|
|||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Initialize my_str_malloc() and my_str_free()
|
||||
*/
|
||||
static void init_libstrings()
|
||||
{
|
||||
my_str_malloc= &my_str_malloc_mysqld;
|
||||
my_str_free= &my_str_free_mysqld;
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
my_string_stack_guard= check_enough_stack_size;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static void init_pcre()
|
||||
{
|
||||
pcre_malloc= pcre_stack_malloc= my_str_malloc_mysqld;
|
||||
pcre_free= pcre_stack_free= my_str_free_mysqld;
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
pcre_stack_guard= check_enough_stack_size_slow;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Initialize one of the global date/time format variables.
|
||||
|
||||
|
|
@ -3928,10 +3934,6 @@ static int init_common_variables()
|
|||
return 1;
|
||||
item_init();
|
||||
init_pcre();
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
my_string_stack_guard= check_enough_stack_size;
|
||||
pcre_stack_guard= check_enough_stack_size_slow;
|
||||
#endif
|
||||
/*
|
||||
Process a comma-separated character set list and choose
|
||||
the first available character set. This is mostly for
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue