~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
/* Copyright (C) 2000 MySQL AB
2
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; version 2 of the License.
6
7
   This program is distributed in the hope that it will be useful,
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
   GNU General Public License for more details.
11
12
   You should have received a copy of the GNU General Public License
13
   along with this program; if not, write to the Free Software
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
16
/*
17
  Static variables for mysys library. All definied here for easy making of
18
  a shared library
19
*/
20
21
#include "mysys_priv.h"
22
#include "my_static.h"
23
#include "my_alarm.h"
24
25
my_bool timed_mutexes= 0;
26
27
	/* from my_init */
28
char *	home_dir=0;
29
const char      *my_progname=0;
30
char curr_dir[FN_REFLEN]= {0},
31
     home_dir_buff[FN_REFLEN]= {0};
32
ulong		my_stream_opened=0,my_file_opened=0, my_tmp_file_created=0;
33
ulong           my_file_total_opened= 0;
34
int my_umask=0664, my_umask_dir=0777;
35
struct st_my_file_info my_file_info_default[MY_NFILE]= {{0,UNOPEN}};
36
uint   my_file_limit= MY_NFILE;
37
struct st_my_file_info *my_file_info= my_file_info_default;
38
39
	/* From mf_brkhant */
40
int my_dont_interrupt=0;
41
volatile int		_my_signals=0;
42
struct st_remember _my_sig_remember[MAX_SIGNALS]={{0,0}};
43
#ifdef THREAD
44
sigset_t my_signals;			/* signals blocked by mf_brkhant */
45
#endif
46
47
	/* from mf_reccache.c */
48
ulong my_default_record_cache_size=RECORD_CACHE_SIZE;
49
50
	/* from soundex.c */
51
				/* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
52
				/* :::::::::::::::::::::::::: */
53
const char *soundex_map=	  "01230120022455012623010202";
54
55
	/* from my_malloc */
56
USED_MEM* my_once_root_block=0;			/* pointer to first block */
57
uint	  my_once_extra=ONCE_ALLOC_INIT;	/* Memory to alloc / block */
58
59
	/* from my_largepage.c */
60
#ifdef HAVE_LARGE_PAGES
61
my_bool my_use_large_pages= 0;
62
uint    my_large_page_size= 0;
63
#endif
64
65
	/* from safe_malloc */
66
uint sf_malloc_prehunc=0,		/* If you have problem with core- */
67
     sf_malloc_endhunc=0,		/* dump when malloc-message.... */
68
					/* set theese to 64 or 128  */
69
     sf_malloc_quick=0;			/* set if no calls to sanity */
70
ulong sf_malloc_cur_memory= 0L;		/* Current memory usage */
71
ulong sf_malloc_max_memory= 0L;		/* Maximum memory usage */
72
uint  sf_malloc_count= 0;		/* Number of times NEW() was called */
73
uchar *sf_min_adress= (uchar*) ~(unsigned long) 0L,
74
     *sf_max_adress= (uchar*) 0L;
75
/* Root of the linked list of struct st_irem */
76
struct st_irem *sf_malloc_root = NULL;
77
78
	/* from my_alarm */
79
int volatile my_have_got_alarm=0;	/* declare variable to reset */
80
ulong my_time_to_wait_for_lock=2;	/* In seconds */
81
82
	/* from errors.c */
83
#ifdef SHARED_LIBRARY
84
char * globerrs[GLOBERRS];		/* my_error_messages is here */
85
#endif
86
void (*my_abort_hook)(int) = (void(*)(int)) exit;
87
void (*error_handler_hook)(uint error,const char *str,myf MyFlags)=
88
    my_message_no_curses;
89
void (*fatal_error_handler_hook)(uint error,const char *str,myf MyFlags)=
90
  my_message_no_curses;
91
92
	/* How to disable options */
93
my_bool my_disable_locking=0;
94
my_bool my_disable_async_io=0;
95
my_bool my_disable_flush_key_blocks=0;
96
my_bool my_disable_symlinks=0;
97
my_bool mysys_uses_curses=0;