MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
my_static.c
1 /* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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 
36 struct st_my_file_info my_file_info_default[MY_NFILE];
37 uint my_file_limit= MY_NFILE;
38 struct st_my_file_info *my_file_info= my_file_info_default;
39 
40  /* From mf_brkhant */
41 int my_dont_interrupt=0;
42 volatile int _my_signals=0;
43 struct st_remember _my_sig_remember[MAX_SIGNALS]={{0,0}};
44 
45  /* from mf_reccache.c */
46 ulong my_default_record_cache_size=RECORD_CACHE_SIZE;
47 
48  /* from soundex.c */
49  /* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
50  /* :::::::::::::::::::::::::: */
51 const char *soundex_map= "01230120022455012623010202";
52 
53  /* from my_malloc */
54 USED_MEM* my_once_root_block=0; /* pointer to first block */
55 uint my_once_extra=ONCE_ALLOC_INIT; /* Memory to alloc / block */
56 
57  /* from my_largepage.c */
58 #ifdef HAVE_LARGE_PAGES
59 my_bool my_use_large_pages= 0;
60 uint my_large_page_size= 0;
61 #endif
62 
63  /* from my_alarm */
64 int volatile my_have_got_alarm=0; /* declare variable to reset */
65 ulong my_time_to_wait_for_lock=2; /* In seconds */
66 
67  /* from errors.c */
68 #ifdef SHARED_LIBRARY
69 const char *globerrs[GLOBERRS]; /* my_error_messages is here */
70 #endif
71 void (*my_abort_hook)(int) = (void(*)(int)) exit;
72 void (*error_handler_hook)(uint error, const char *str, myf MyFlags)=
73  my_message_stderr;
74 void (*fatal_error_handler_hook)(uint error, const char *str, myf MyFlags)=
75  my_message_stderr;
76 
77 static void proc_info_dummy(void *a __attribute__((unused)),
78  const PSI_stage_info *b __attribute__((unused)),
79  PSI_stage_info *c __attribute__((unused)),
80  const char *d __attribute__((unused)),
81  const char *e __attribute__((unused)),
82  const unsigned int f __attribute__((unused)))
83 {
84  return;
85 }
86 
87 /* this is to be able to call set_thd_proc_info from the C code */
88 void (*proc_info_hook)(void *, const PSI_stage_info *, PSI_stage_info *,
89  const char *, const char *, const unsigned int)= proc_info_dummy;
90 
91 #if defined(ENABLED_DEBUG_SYNC)
92 
96 void (*debug_sync_C_callback_ptr)(const char *, size_t);
97 #endif /* defined(ENABLED_DEBUG_SYNC) */
98 
99 #ifdef __WIN__
100 /* from my_getsystime.c */
101 ulonglong query_performance_frequency, query_performance_offset;
102 #endif
103 
104  /* How to disable options */
105 my_bool my_disable_locking=0;
106 my_bool my_disable_async_io=0;
107 my_bool my_disable_flush_key_blocks=0;
108 my_bool my_disable_symlinks=0;
109