~ubuntu-branches/ubuntu/quantal/mysql-workbench/quantal

« back to all changes in this revision

Viewing changes to library/sql-parser/source/my_static.cpp

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2012-03-01 21:57:30 UTC
  • Revision ID: package-import@ubuntu.com-20120301215730-o7y8av8y38n162ro
Tags: upstream-5.2.38+dfsg
ImportĀ upstreamĀ versionĀ 5.2.38+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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; either version 2 of the License, or
 
6
   (at your option) any later version.
 
7
 
 
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.
 
12
 
 
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 */
 
16
 
 
17
/*
 
18
  Static variables for mysys library. All definied here for easy making of
 
19
  a shared library
 
20
*/
 
21
 
 
22
#if !defined(stdin) || defined(OS2)
 
23
#include "mysys_priv.h"
 
24
#include "my_static.h"
 
25
#include "my_alarm.h"
 
26
#endif
 
27
 
 
28
namespace mysql_parser
 
29
{
 
30
 
 
31
my_bool timed_mutexes= 0;
 
32
 
 
33
        /* from my_init */
 
34
my_string       home_dir=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;
 
40
#ifndef THREAD
 
41
int             NEAR my_errno=0;
 
42
#endif
 
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;
 
46
 
 
47
        /* From mf_brkhant */
 
48
int                     NEAR my_dont_interrupt=0;
 
49
volatile int            _my_signals=0;
 
50
struct st_remember _my_sig_remember[MAX_SIGNALS]={{0,0}};
 
51
#ifdef THREAD
 
52
sigset_t my_signals;                    /* signals blocked by mf_brkhant */
 
53
#endif
 
54
 
 
55
        /* from mf_keycache.c */
 
56
my_bool key_cache_inited=0;
 
57
 
 
58
        /* from mf_reccache.c */
 
59
ulong my_default_record_cache_size=RECORD_CACHE_SIZE;
 
60
 
 
61
        /* from soundex.c */
 
62
                                /* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
 
63
                                /* :::::::::::::::::::::::::: */
 
64
const char *soundex_map=          "01230120022455012623010202";
 
65
 
 
66
        /* from my_malloc */
 
67
#if 0
 
68
USED_MEM* my_once_root_block=0;                 /* pointer to first block */
 
69
#endif
 
70
uint      my_once_extra=ONCE_ALLOC_INIT;        /* Memory to alloc / block */
 
71
 
 
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;
 
76
#endif
 
77
 
 
78
        /* from my_tempnam */
 
79
#if !defined(HAVE_TEMPNAM) || defined(HPUX11)
 
80
int _my_tempnam_used=0;
 
81
#endif
 
82
 
 
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;
 
95
 
 
96
        /* from my_alarm */
 
97
int volatile my_have_got_alarm=0;       /* declare variable to reset */
 
98
ulong my_time_to_wait_for_lock=2;       /* In seconds */
 
99
 
 
100
        /* from errors.c */
 
101
#ifdef SHARED_LIBRARY
 
102
char * NEAR globerrs[GLOBERRS];         /* my_error_messages is here */
 
103
#endif
 
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;
 
109
 
 
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;
 
116
 
 
117
} // namespace mysql_parser