1
/* Copyright (C) 2000 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; either version 2 of the License, or
6
(at your option) any later version.
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
GNU General Public License for more details.
13
You should have received a copy of the GNU General Public License
14
along with this program; if not, write to the Free Software
15
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
18
Static variables for mysys library. All definied here for easy making of
22
#if !defined(stdin) || defined(OS2)
23
#include "mysys_priv.h"
24
#include "my_static.h"
28
namespace mysql_parser
31
my_bool timed_mutexes= 0;
35
const char *my_progname=0;
36
char NEAR curr_dir[FN_REFLEN]= {0},
37
NEAR home_dir_buff[FN_REFLEN]= {0};
38
ulong my_stream_opened=0,my_file_opened=0, my_tmp_file_created=0;
39
int NEAR my_umask=0664, NEAR my_umask_dir=0777;
43
struct st_my_file_info my_file_info_default[MY_NFILE]= {{0,UNOPEN}};
44
uint my_file_limit= MY_NFILE;
45
struct st_my_file_info *my_file_info= my_file_info_default;
48
int NEAR my_dont_interrupt=0;
49
volatile int _my_signals=0;
50
struct st_remember _my_sig_remember[MAX_SIGNALS]={{0,0}};
52
sigset_t my_signals; /* signals blocked by mf_brkhant */
55
/* from mf_keycache.c */
56
my_bool key_cache_inited=0;
58
/* from mf_reccache.c */
59
ulong my_default_record_cache_size=RECORD_CACHE_SIZE;
62
/* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
63
/* :::::::::::::::::::::::::: */
64
const char *soundex_map= "01230120022455012623010202";
68
USED_MEM* my_once_root_block=0; /* pointer to first block */
70
uint my_once_extra=ONCE_ALLOC_INIT; /* Memory to alloc / block */
72
/* from my_largepage.c */
73
#ifdef HAVE_LARGE_PAGES
74
my_bool my_use_large_pages= 0;
75
uint my_large_page_size= 0;
79
#if !defined(HAVE_TEMPNAM) || defined(HPUX11)
80
int _my_tempnam_used=0;
83
/* from safe_malloc */
84
uint sf_malloc_prehunc=0, /* If you have problem with core- */
85
sf_malloc_endhunc=0, /* dump when malloc-message.... */
86
/* set theese to 64 or 128 */
87
sf_malloc_quick=0; /* set if no calls to sanity */
88
ulong sf_malloc_cur_memory= 0L; /* Current memory usage */
89
ulong sf_malloc_max_memory= 0L; /* Maximum memory usage */
90
uint sf_malloc_count= 0; /* Number of times NEW() was called */
91
byte *sf_min_adress= (byte*) ~(unsigned long) 0L,
92
*sf_max_adress= (byte*) 0L;
93
/* Root of the linked list of struct st_irem */
94
struct st_irem *sf_malloc_root = NULL;
97
int volatile my_have_got_alarm=0; /* declare variable to reset */
98
ulong my_time_to_wait_for_lock=2; /* In seconds */
101
#ifdef SHARED_LIBRARY
102
char * NEAR globerrs[GLOBERRS]; /* my_error_messages is here */
104
void (*my_abort_hook)(int) = (void(*)(int)) exit;
105
int (*error_handler_hook)(uint error,const char *str,myf MyFlags)=
106
my_message_no_curses;
107
int (*fatal_error_handler_hook)(uint error,const char *str,myf MyFlags)=
108
my_message_no_curses;
110
/* How to disable options */
111
my_bool NEAR my_disable_locking=0;
112
my_bool NEAR my_disable_async_io=0;
113
my_bool NEAR my_disable_flush_key_blocks=0;
114
my_bool NEAR my_disable_symlinks=0;
115
my_bool NEAR mysys_uses_curses=0;
117
} // namespace mysql_parser