21
21
#include "mysys_priv.h"
22
#include <mysys/mysys_err.h>
23
22
#include "my_static.h"
25
bool timed_mutexes= 0;
25
my_bool timed_mutexes= 0;
29
29
const char *my_progname=0;
30
30
char curr_dir[FN_REFLEN]= {0},
31
31
home_dir_buff[FN_REFLEN]= {0};
32
uint32_t my_stream_opened=0,my_file_opened=0, my_tmp_file_created=0;
33
uint32_t my_file_total_opened= 0;
32
ulong my_stream_opened=0,my_file_opened=0, my_tmp_file_created=0;
33
ulong my_file_total_opened= 0;
34
34
int my_umask=0664, my_umask_dir=0777;
35
35
struct st_my_file_info my_file_info_default[MY_NFILE]= {{0,UNOPEN}};
36
uint32_t my_file_limit= MY_NFILE;
36
uint my_file_limit= MY_NFILE;
37
37
struct st_my_file_info *my_file_info= my_file_info_default;
39
39
/* From mf_brkhant */
40
40
int my_dont_interrupt=0;
41
41
volatile int _my_signals=0;
42
42
struct st_remember _my_sig_remember[MAX_SIGNALS]={{0,0}};
43
44
sigset_t my_signals; /* signals blocked by mf_brkhant */
45
47
/* from mf_reccache.c */
46
uint32_t my_default_record_cache_size=RECORD_CACHE_SIZE;
48
ulong my_default_record_cache_size=RECORD_CACHE_SIZE;
48
50
/* from soundex.c */
49
51
/* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
55
57
uint my_once_extra=ONCE_ALLOC_INIT; /* Memory to alloc / block */
57
59
/* from safe_malloc */
58
uint32_t sf_malloc_prehunc=0, /* If you have problem with core- */
60
uint sf_malloc_prehunc=0, /* If you have problem with core- */
59
61
sf_malloc_endhunc=0, /* dump when malloc-message.... */
60
62
/* set theese to 64 or 128 */
61
63
sf_malloc_quick=0; /* set if no calls to sanity */
62
uint32_t sf_malloc_cur_memory= 0L; /* Current memory usage */
63
uint32_t sf_malloc_max_memory= 0L; /* Maximum memory usage */
64
uint32_t sf_malloc_count= 0; /* Number of times NEW() was called */
65
unsigned char *sf_min_adress= (unsigned char*) ~(unsigned long) 0L,
66
*sf_max_adress= (unsigned char*) 0L;
64
ulong sf_malloc_cur_memory= 0L; /* Current memory usage */
65
ulong sf_malloc_max_memory= 0L; /* Maximum memory usage */
66
uint sf_malloc_count= 0; /* Number of times NEW() was called */
67
uchar *sf_min_adress= (uchar*) ~(unsigned long) 0L,
68
*sf_max_adress= (uchar*) 0L;
67
69
/* Root of the linked list of struct st_irem */
68
70
struct st_irem *sf_malloc_root = NULL;
70
72
/* from my_alarm */
71
73
int volatile my_have_got_alarm=0; /* declare variable to reset */
72
uint32_t my_time_to_wait_for_lock=2; /* In seconds */
74
ulong my_time_to_wait_for_lock=2; /* In seconds */
74
76
/* from errors.c */
78
char * globerrs[GLOBERRS]; /* my_error_messages is here */
75
80
void (*my_abort_hook)(int) = (void(*)(int)) exit;
76
void (*error_handler_hook)(uint32_t error,const char *str,myf MyFlags)=
81
void (*error_handler_hook)(uint error,const char *str,myf MyFlags)=
77
82
my_message_no_curses;
78
void (*fatal_error_handler_hook)(uint32_t error,const char *str,myf MyFlags)=
83
void (*fatal_error_handler_hook)(uint error,const char *str,myf MyFlags)=
79
84
my_message_no_curses;
81
86
/* How to disable options */
82
bool my_disable_async_io=0;
83
bool my_disable_flush_key_blocks=0;
84
bool my_disable_symlinks=0;
85
bool mysys_uses_curses=0;
87
my_bool my_disable_locking=0;
88
my_bool my_disable_async_io=0;
89
my_bool my_disable_flush_key_blocks=0;
90
my_bool my_disable_symlinks=0;
91
my_bool mysys_uses_curses=0;