390.1.2
by Monty Taylor
Fixed copyright headers in drizzled/ |
1 |
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
|
2 |
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
|
|
3 |
*
|
|
4 |
* Copyright (C) 2008 Sun Microsystems
|
|
5 |
*
|
|
6 |
* This program is free software; you can redistribute it and/or modify
|
|
7 |
* it under the terms of the GNU General Public License as published by
|
|
8 |
* the Free Software Foundation; version 2 of the License.
|
|
9 |
*
|
|
10 |
* This program is distributed in the hope that it will be useful,
|
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13 |
* GNU General Public License for more details.
|
|
14 |
*
|
|
15 |
* You should have received a copy of the GNU General Public License
|
|
16 |
* along with this program; if not, write to the Free Software
|
|
17 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
18 |
*/
|
|
1
by brian
clean slate |
19 |
|
575.1.6
by Monty Taylor
Cleaned up some headers for PCH. |
20 |
#ifndef DRIZZLED_ITEM_SET_H
|
21 |
#define DRIZZLED_ITEM_SET_H
|
|
22 |
||
670.1.20
by Monty Taylor
Renamed functions to function... everything else is singular. |
23 |
#include <drizzled/function/func.h> |
24 |
#include <drizzled/function/set_user_var.h> |
|
642.1.62
by Lee
more header file cleanup |
25 |
#include <drizzled/item/string.h> |
584.1.15
by Monty Taylor
The mega-patch from hell. Renamed sql_class to session (since that's what it is) and removed it and field and table from common_includes. |
26 |
|
656.1.34
by Monty Taylor
Got closer... |
27 |
#include <string> |
28 |
||
1
by brian
clean slate |
29 |
/* Classes to support the SET command */
|
30 |
||
31 |
||
32 |
/****************************************************************************
|
|
33 |
Variables that are changable runtime are declared using the
|
|
34 |
following classes
|
|
35 |
****************************************************************************/
|
|
36 |
||
37 |
class sys_var; |
|
38 |
class set_var; |
|
39 |
class sys_var_pluginvar; /* opaque */ |
|
584.1.15
by Monty Taylor
The mega-patch from hell. Renamed sql_class to session (since that's what it is) and removed it and field and table from common_includes. |
40 |
class Time_zone; |
1
by brian
clean slate |
41 |
typedef struct system_variables SV; |
42 |
typedef struct my_locale_st MY_LOCALE; |
|
43 |
||
44 |
extern TYPELIB bool_typelib, delay_key_write_typelib, sql_mode_typelib, |
|
617
by Brian Aker
ulong fixes |
45 |
optimizer_switch_typelib, slave_exec_mode_typelib; |
1
by brian
clean slate |
46 |
|
520.1.21
by Brian Aker
THD -> Session rename |
47 |
typedef int (*sys_check_func)(Session *, set_var *); |
48 |
typedef bool (*sys_update_func)(Session *, set_var *); |
|
49 |
typedef void (*sys_after_update_func)(Session *,enum_var_type); |
|
50 |
typedef void (*sys_set_default_func)(Session *, enum_var_type); |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
51 |
typedef unsigned char *(*sys_value_ptr_func)(Session *session); |
1
by brian
clean slate |
52 |
|
53 |
struct sys_var_chain |
|
54 |
{
|
|
55 |
sys_var *first; |
|
56 |
sys_var *last; |
|
57 |
};
|
|
58 |
||
59 |
class sys_var |
|
60 |
{
|
|
61 |
public: |
|
62 |
||
63 |
/**
|
|
64 |
Enumeration type to indicate for a system variable whether it will be written to the binlog or not.
|
|
65 |
*/
|
|
66 |
enum Binlog_status_enum |
|
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
67 |
{
|
1
by brian
clean slate |
68 |
/* The variable value is not in the binlog. */
|
69 |
NOT_IN_BINLOG, |
|
70 |
/* The value of the @@session variable is in the binlog. */
|
|
71 |
SESSION_VARIABLE_IN_BINLOG
|
|
72 |
/*
|
|
73 |
Currently, no @@global variable is ever in the binlog, so we
|
|
74 |
don't need an enumeration value for that.
|
|
75 |
*/
|
|
76 |
};
|
|
77 |
||
78 |
sys_var *next; |
|
79 |
struct my_option *option_limits; /* Updated by by set_var_init() */ |
|
482
by Brian Aker
Remove uint. |
80 |
uint32_t name_length; /* Updated by by set_var_init() */ |
1
by brian
clean slate |
81 |
const char *name; |
82 |
||
83 |
sys_after_update_func after_update; |
|
84 |
sys_var(const char *name_arg, sys_after_update_func func= NULL, |
|
85 |
Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) |
|
744
by Brian Aker
Removing dead code around one shot. |
86 |
:name(name_arg), after_update(func), |
1
by brian
clean slate |
87 |
binlog_status(binlog_status_arg), |
51.1.46
by Jay Pipes
Removed/replaced DBUG symbols and standardized TRUE/FALSE |
88 |
m_allow_empty_value(true) |
1
by brian
clean slate |
89 |
{}
|
90 |
virtual ~sys_var() {} |
|
91 |
void chain_sys_var(sys_var_chain *chain_arg) |
|
92 |
{
|
|
93 |
if (chain_arg->last) |
|
94 |
chain_arg->last->next= this; |
|
95 |
else
|
|
96 |
chain_arg->first= this; |
|
97 |
chain_arg->last= this; |
|
98 |
}
|
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
99 |
virtual bool check(Session *session, set_var *var); |
100 |
bool check_enum(Session *session, set_var *var, const TYPELIB *enum_names); |
|
101 |
bool check_set(Session *session, set_var *var, TYPELIB *enum_names); |
|
102 |
virtual bool update(Session *session, set_var *var)=0; |
|
644
by Brian Aker
Clean up warnings for Solaris. |
103 |
virtual void set_default(Session *, enum_var_type) |
77.1.7
by Monty Taylor
Heap builds clean. |
104 |
{}
|
1
by brian
clean slate |
105 |
virtual SHOW_TYPE show_type() { return SHOW_UNDEF; } |
779.3.10
by Monty Taylor
Turned on -Wshadow. |
106 |
virtual unsigned char *value_ptr(Session *, enum_var_type, const LEX_STRING *) |
1
by brian
clean slate |
107 |
{ return 0; } |
108 |
virtual bool check_type(enum_var_type type) |
|
109 |
{ return type != OPT_GLOBAL; } /* Error if not GLOBAL */ |
|
110 |
virtual bool check_update_type(Item_result type) |
|
111 |
{ return type != INT_RESULT; } /* Assume INT */ |
|
644
by Brian Aker
Clean up warnings for Solaris. |
112 |
virtual bool check_default(enum_var_type) |
1
by brian
clean slate |
113 |
{ return option_limits == 0; } |
779.3.10
by Monty Taylor
Turned on -Wshadow. |
114 |
Item *item(Session *session, enum_var_type type, const LEX_STRING *base); |
1
by brian
clean slate |
115 |
virtual bool is_struct() { return 0; } |
116 |
virtual bool is_readonly() const { return 0; } |
|
117 |
virtual sys_var_pluginvar *cast_pluginvar() { return 0; } |
|
118 |
||
119 |
protected: |
|
120 |
void set_allow_empty_value(bool allow_empty_value) |
|
121 |
{
|
|
122 |
m_allow_empty_value= allow_empty_value; |
|
123 |
}
|
|
124 |
||
125 |
private: |
|
126 |
const Binlog_status_enum binlog_status; |
|
127 |
||
128 |
bool m_allow_empty_value; |
|
129 |
};
|
|
130 |
||
131 |
||
132 |
/*
|
|
133 |
A base class for all variables that require its access to
|
|
134 |
be guarded with a mutex.
|
|
135 |
*/
|
|
136 |
||
137 |
class sys_var_global: public sys_var |
|
138 |
{
|
|
139 |
protected: |
|
140 |
pthread_mutex_t *guard; |
|
141 |
public: |
|
142 |
sys_var_global(const char *name_arg, sys_after_update_func after_update_arg, |
|
143 |
pthread_mutex_t *guard_arg) |
|
144 |
:sys_var(name_arg, after_update_arg), guard(guard_arg) {} |
|
145 |
};
|
|
146 |
||
147 |
||
148 |
/*
|
|
622
by Brian Aker
More ulong work. |
149 |
A global-only uint64_t variable that requires its access to be
|
1
by brian
clean slate |
150 |
protected with a mutex.
|
151 |
*/
|
|
152 |
||
153 |
class sys_var_long_ptr_global: public sys_var_global |
|
154 |
{
|
|
622
by Brian Aker
More ulong work. |
155 |
uint64_t *value; |
1
by brian
clean slate |
156 |
public: |
157 |
sys_var_long_ptr_global(sys_var_chain *chain, const char *name_arg, |
|
622
by Brian Aker
More ulong work. |
158 |
uint64_t *value_ptr_arg, |
1
by brian
clean slate |
159 |
pthread_mutex_t *guard_arg, |
160 |
sys_after_update_func after_update_arg= NULL) |
|
161 |
:sys_var_global(name_arg, after_update_arg, guard_arg), |
|
162 |
value(value_ptr_arg) |
|
163 |
{ chain_sys_var(chain); } |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
164 |
bool check(Session *session, set_var *var); |
165 |
bool update(Session *session, set_var *var); |
|
166 |
void set_default(Session *session, enum_var_type type); |
|
1
by brian
clean slate |
167 |
SHOW_TYPE show_type() { return SHOW_LONG; } |
779.3.10
by Monty Taylor
Turned on -Wshadow. |
168 |
unsigned char *value_ptr(Session *, enum_var_type, const LEX_STRING *) |
481
by Brian Aker
Remove all of uchar. |
169 |
{ return (unsigned char*) value; } |
1
by brian
clean slate |
170 |
};
|
171 |
||
172 |
||
173 |
/*
|
|
622
by Brian Aker
More ulong work. |
174 |
A global uint64_t variable that is protected by LOCK_global_system_variables
|
1
by brian
clean slate |
175 |
*/
|
176 |
||
177 |
class sys_var_long_ptr :public sys_var_long_ptr_global |
|
178 |
{
|
|
179 |
public: |
|
622
by Brian Aker
More ulong work. |
180 |
sys_var_long_ptr(sys_var_chain *chain, const char *name_arg, uint64_t *value_ptr, |
1
by brian
clean slate |
181 |
sys_after_update_func after_update_arg= NULL); |
182 |
};
|
|
183 |
||
184 |
||
520.4.14
by Monty Taylor
Removed korr.h and tztime.h from common_includes. Also removed the HAVE_DTRACE block and stuck it in autoconf. |
185 |
class sys_var_uint32_t_ptr :public sys_var |
186 |
{
|
|
187 |
uint32_t *value; |
|
188 |
public: |
|
189 |
sys_var_uint32_t_ptr(sys_var_chain *chain, const char *name_arg, |
|
190 |
uint32_t *value_ptr_arg) |
|
191 |
:sys_var(name_arg),value(value_ptr_arg) |
|
192 |
{ chain_sys_var(chain); } |
|
193 |
sys_var_uint32_t_ptr(sys_var_chain *chain, const char *name_arg, |
|
194 |
uint32_t *value_ptr_arg, |
|
195 |
sys_after_update_func func) |
|
196 |
:sys_var(name_arg,func), value(value_ptr_arg) |
|
197 |
{ chain_sys_var(chain); } |
|
198 |
bool update(Session *session, set_var *var); |
|
199 |
void set_default(Session *session, enum_var_type type); |
|
200 |
SHOW_TYPE show_type() { return SHOW_LONG; } |
|
779.3.10
by Monty Taylor
Turned on -Wshadow. |
201 |
unsigned char *value_ptr(Session *, enum_var_type, const LEX_STRING *) |
520.4.14
by Monty Taylor
Removed korr.h and tztime.h from common_includes. Also removed the HAVE_DTRACE block and stuck it in autoconf. |
202 |
{ return (unsigned char*) value; } |
203 |
};
|
|
204 |
||
205 |
||
151
by Brian Aker
Ulonglong to uint64_t |
206 |
class sys_var_uint64_t_ptr :public sys_var |
1
by brian
clean slate |
207 |
{
|
151
by Brian Aker
Ulonglong to uint64_t |
208 |
uint64_t *value; |
10
by Brian Aker
Start of var cleanup (really.... looking at this code the entire thing needs |
209 |
public: |
151
by Brian Aker
Ulonglong to uint64_t |
210 |
sys_var_uint64_t_ptr(sys_var_chain *chain, const char *name_arg, uint64_t *value_ptr_arg) |
1
by brian
clean slate |
211 |
:sys_var(name_arg),value(value_ptr_arg) |
212 |
{ chain_sys_var(chain); } |
|
151
by Brian Aker
Ulonglong to uint64_t |
213 |
sys_var_uint64_t_ptr(sys_var_chain *chain, const char *name_arg, uint64_t *value_ptr_arg, |
1
by brian
clean slate |
214 |
sys_after_update_func func) |
215 |
:sys_var(name_arg,func), value(value_ptr_arg) |
|
216 |
{ chain_sys_var(chain); } |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
217 |
bool update(Session *session, set_var *var); |
218 |
void set_default(Session *session, enum_var_type type); |
|
1
by brian
clean slate |
219 |
SHOW_TYPE show_type() { return SHOW_LONGLONG; } |
779.3.10
by Monty Taylor
Turned on -Wshadow. |
220 |
unsigned char *value_ptr(Session *, enum_var_type, |
221 |
const LEX_STRING *) |
|
481
by Brian Aker
Remove all of uchar. |
222 |
{ return (unsigned char*) value; } |
1
by brian
clean slate |
223 |
};
|
224 |
||
629.4.1
by Monty Taylor
First step in support size_t sys_var stuff. |
225 |
class sys_var_size_t_ptr :public sys_var |
226 |
{
|
|
227 |
size_t *value; |
|
228 |
public: |
|
229 |
sys_var_size_t_ptr(sys_var_chain *chain, const char *name_arg, size_t *value_ptr_arg) |
|
230 |
:sys_var(name_arg),value(value_ptr_arg) |
|
231 |
{ chain_sys_var(chain); } |
|
232 |
sys_var_size_t_ptr(sys_var_chain *chain, const char *name_arg, size_t *value_ptr_arg, |
|
233 |
sys_after_update_func func) |
|
234 |
:sys_var(name_arg,func), value(value_ptr_arg) |
|
235 |
{ chain_sys_var(chain); } |
|
236 |
bool update(Session *session, set_var *var); |
|
237 |
void set_default(Session *session, enum_var_type type); |
|
238 |
SHOW_TYPE show_type() { return SHOW_SIZE; } |
|
779.3.10
by Monty Taylor
Turned on -Wshadow. |
239 |
unsigned char *value_ptr(Session *, enum_var_type, const LEX_STRING *) |
629.4.1
by Monty Taylor
First step in support size_t sys_var stuff. |
240 |
{ return (unsigned char*) value; } |
241 |
};
|
|
1
by brian
clean slate |
242 |
|
243 |
class sys_var_bool_ptr :public sys_var |
|
244 |
{
|
|
245 |
public: |
|
146
by Brian Aker
my_bool cleanup. |
246 |
bool *value; |
147
by Brian Aker
More my_bool conversion. This time the set_var class. |
247 |
sys_var_bool_ptr(sys_var_chain *chain, const char *name_arg, bool *value_arg) |
146
by Brian Aker
my_bool cleanup. |
248 |
:sys_var(name_arg),value(value_arg) |
249 |
{ chain_sys_var(chain); } |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
250 |
bool check(Session *session, set_var *var) |
146
by Brian Aker
my_bool cleanup. |
251 |
{
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
252 |
return check_enum(session, var, &bool_typelib); |
146
by Brian Aker
my_bool cleanup. |
253 |
}
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
254 |
bool update(Session *session, set_var *var); |
255 |
void set_default(Session *session, enum_var_type type); |
|
146
by Brian Aker
my_bool cleanup. |
256 |
SHOW_TYPE show_type() { return SHOW_MY_BOOL; } |
779.3.10
by Monty Taylor
Turned on -Wshadow. |
257 |
unsigned char *value_ptr(Session *, enum_var_type, const LEX_STRING *) |
481
by Brian Aker
Remove all of uchar. |
258 |
{ return (unsigned char*) value; } |
644
by Brian Aker
Clean up warnings for Solaris. |
259 |
bool check_update_type(Item_result) |
146
by Brian Aker
my_bool cleanup. |
260 |
{ return 0; } |
261 |
};
|
|
262 |
||
1
by brian
clean slate |
263 |
class sys_var_bool_ptr_readonly :public sys_var_bool_ptr |
264 |
{
|
|
265 |
public: |
|
266 |
sys_var_bool_ptr_readonly(sys_var_chain *chain, const char *name_arg, |
|
147
by Brian Aker
More my_bool conversion. This time the set_var class. |
267 |
bool *value_arg) |
1
by brian
clean slate |
268 |
:sys_var_bool_ptr(chain, name_arg, value_arg) |
269 |
{}
|
|
270 |
bool is_readonly() const { return 1; } |
|
271 |
};
|
|
272 |
||
273 |
||
274 |
class sys_var_str :public sys_var |
|
275 |
{
|
|
276 |
public: |
|
277 |
char *value; // Pointer to allocated string |
|
482
by Brian Aker
Remove uint. |
278 |
uint32_t value_length; |
1
by brian
clean slate |
279 |
sys_check_func check_func; |
280 |
sys_update_func update_func; |
|
281 |
sys_set_default_func set_default_func; |
|
282 |
sys_var_str(sys_var_chain *chain, const char *name_arg, |
|
283 |
sys_check_func check_func_arg, |
|
284 |
sys_update_func update_func_arg, |
|
285 |
sys_set_default_func set_default_func_arg, |
|
286 |
char *value_arg) |
|
287 |
:sys_var(name_arg), value(value_arg), check_func(check_func_arg), |
|
288 |
update_func(update_func_arg),set_default_func(set_default_func_arg) |
|
289 |
{ chain_sys_var(chain); } |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
290 |
bool check(Session *session, set_var *var); |
291 |
bool update(Session *session, set_var *var) |
|
1
by brian
clean slate |
292 |
{
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
293 |
return (*update_func)(session, var); |
1
by brian
clean slate |
294 |
}
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
295 |
void set_default(Session *session, enum_var_type type) |
1
by brian
clean slate |
296 |
{
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
297 |
(*set_default_func)(session, type); |
1
by brian
clean slate |
298 |
}
|
299 |
SHOW_TYPE show_type() { return SHOW_CHAR; } |
|
779.3.10
by Monty Taylor
Turned on -Wshadow. |
300 |
unsigned char *value_ptr(Session *, enum_var_type, const LEX_STRING *) |
481
by Brian Aker
Remove all of uchar. |
301 |
{ return (unsigned char*) value; } |
1
by brian
clean slate |
302 |
bool check_update_type(Item_result type) |
303 |
{
|
|
304 |
return type != STRING_RESULT; /* Only accept strings */ |
|
305 |
}
|
|
644
by Brian Aker
Clean up warnings for Solaris. |
306 |
bool check_default(enum_var_type) |
77.1.7
by Monty Taylor
Heap builds clean. |
307 |
{ return 0; } |
1
by brian
clean slate |
308 |
};
|
309 |
||
310 |
||
311 |
class sys_var_const_str :public sys_var |
|
312 |
{
|
|
313 |
char *value; // Pointer to const value |
|
10
by Brian Aker
Start of var cleanup (really.... looking at this code the entire thing needs |
314 |
public: |
1
by brian
clean slate |
315 |
sys_var_const_str(sys_var_chain *chain, const char *name_arg, |
316 |
const char *value_arg) |
|
317 |
:sys_var(name_arg), value((char*) value_arg) |
|
318 |
{ chain_sys_var(chain); } |
|
10
by Brian Aker
Start of var cleanup (really.... looking at this code the entire thing needs |
319 |
inline void set (char *new_value) |
320 |
{
|
|
321 |
value= new_value; |
|
322 |
}
|
|
644
by Brian Aker
Clean up warnings for Solaris. |
323 |
bool check(Session *, set_var *) |
1
by brian
clean slate |
324 |
{
|
325 |
return 1; |
|
326 |
}
|
|
644
by Brian Aker
Clean up warnings for Solaris. |
327 |
bool update(Session *, set_var *) |
1
by brian
clean slate |
328 |
{
|
329 |
return 1; |
|
330 |
}
|
|
331 |
SHOW_TYPE show_type() { return SHOW_CHAR; } |
|
779.3.10
by Monty Taylor
Turned on -Wshadow. |
332 |
unsigned char *value_ptr(Session *, enum_var_type, const LEX_STRING *) |
1
by brian
clean slate |
333 |
{
|
481
by Brian Aker
Remove all of uchar. |
334 |
return (unsigned char*) value; |
1
by brian
clean slate |
335 |
}
|
644
by Brian Aker
Clean up warnings for Solaris. |
336 |
bool check_update_type(Item_result) |
1
by brian
clean slate |
337 |
{
|
338 |
return 1; |
|
339 |
}
|
|
644
by Brian Aker
Clean up warnings for Solaris. |
340 |
bool check_default(enum_var_type) |
77.1.7
by Monty Taylor
Heap builds clean. |
341 |
{ return 1; } |
1
by brian
clean slate |
342 |
bool is_readonly() const { return 1; } |
343 |
};
|
|
344 |
||
345 |
||
346 |
class sys_var_const_str_ptr :public sys_var |
|
347 |
{
|
|
348 |
char **value; // Pointer to const value |
|
10
by Brian Aker
Start of var cleanup (really.... looking at this code the entire thing needs |
349 |
public: |
1
by brian
clean slate |
350 |
sys_var_const_str_ptr(sys_var_chain *chain, const char *name_arg, char **value_arg) |
351 |
:sys_var(name_arg),value(value_arg) |
|
352 |
{ chain_sys_var(chain); } |
|
644
by Brian Aker
Clean up warnings for Solaris. |
353 |
bool check(Session *, set_var *) |
1
by brian
clean slate |
354 |
{
|
355 |
return 1; |
|
356 |
}
|
|
644
by Brian Aker
Clean up warnings for Solaris. |
357 |
bool update(Session *, set_var *) |
1
by brian
clean slate |
358 |
{
|
359 |
return 1; |
|
360 |
}
|
|
361 |
SHOW_TYPE show_type() { return SHOW_CHAR; } |
|
779.3.10
by Monty Taylor
Turned on -Wshadow. |
362 |
unsigned char *value_ptr(Session *, enum_var_type, const LEX_STRING *) |
1
by brian
clean slate |
363 |
{
|
481
by Brian Aker
Remove all of uchar. |
364 |
return (unsigned char*) *value; |
1
by brian
clean slate |
365 |
}
|
644
by Brian Aker
Clean up warnings for Solaris. |
366 |
bool check_update_type(Item_result) |
1
by brian
clean slate |
367 |
{
|
368 |
return 1; |
|
369 |
}
|
|
644
by Brian Aker
Clean up warnings for Solaris. |
370 |
bool check_default(enum_var_type) |
77.1.7
by Monty Taylor
Heap builds clean. |
371 |
{ return 1; } |
372 |
bool is_readonly(void) const { return 1; } |
|
1
by brian
clean slate |
373 |
};
|
374 |
||
375 |
||
376 |
class sys_var_enum :public sys_var |
|
377 |
{
|
|
482
by Brian Aker
Remove uint. |
378 |
uint32_t *value; |
1
by brian
clean slate |
379 |
TYPELIB *enum_names; |
380 |
public: |
|
482
by Brian Aker
Remove uint. |
381 |
sys_var_enum(sys_var_chain *chain, const char *name_arg, uint32_t *value_arg, |
1
by brian
clean slate |
382 |
TYPELIB *typelib, sys_after_update_func func) |
383 |
:sys_var(name_arg,func), value(value_arg), enum_names(typelib) |
|
384 |
{ chain_sys_var(chain); } |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
385 |
bool check(Session *session, set_var *var) |
1
by brian
clean slate |
386 |
{
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
387 |
return check_enum(session, var, enum_names); |
1
by brian
clean slate |
388 |
}
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
389 |
bool update(Session *session, set_var *var); |
1
by brian
clean slate |
390 |
SHOW_TYPE show_type() { return SHOW_CHAR; } |
779.3.10
by Monty Taylor
Turned on -Wshadow. |
391 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
392 |
const LEX_STRING *base); |
|
644
by Brian Aker
Clean up warnings for Solaris. |
393 |
bool check_update_type(Item_result) |
77.1.7
by Monty Taylor
Heap builds clean. |
394 |
{ return 0; } |
1
by brian
clean slate |
395 |
};
|
396 |
||
397 |
||
398 |
class sys_var_enum_const :public sys_var |
|
399 |
{
|
|
621
by Brian Aker
ulong fixes |
400 |
uint32_t SV::*offset; |
1
by brian
clean slate |
401 |
TYPELIB *enum_names; |
402 |
public: |
|
621
by Brian Aker
ulong fixes |
403 |
sys_var_enum_const(sys_var_chain *chain, const char *name_arg, uint32_t SV::*offset_arg, |
1
by brian
clean slate |
404 |
TYPELIB *typelib, sys_after_update_func func) |
405 |
:sys_var(name_arg,func), offset(offset_arg), enum_names(typelib) |
|
406 |
{ chain_sys_var(chain); } |
|
644
by Brian Aker
Clean up warnings for Solaris. |
407 |
bool check(Session *, set_var *) |
77.1.7
by Monty Taylor
Heap builds clean. |
408 |
{ return 1; } |
644
by Brian Aker
Clean up warnings for Solaris. |
409 |
bool update(Session *, set_var *) |
77.1.7
by Monty Taylor
Heap builds clean. |
410 |
{ return 1; } |
1
by brian
clean slate |
411 |
SHOW_TYPE show_type() { return SHOW_CHAR; } |
644
by Brian Aker
Clean up warnings for Solaris. |
412 |
bool check_update_type(Item_result) |
77.1.7
by Monty Taylor
Heap builds clean. |
413 |
{ return 1; } |
1
by brian
clean slate |
414 |
bool is_readonly() const { return 1; } |
779.3.10
by Monty Taylor
Turned on -Wshadow. |
415 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
416 |
const LEX_STRING *base); |
|
1
by brian
clean slate |
417 |
};
|
418 |
||
419 |
||
520.1.22
by Brian Aker
Second pass of thd cleanup |
420 |
class sys_var_session :public sys_var |
1
by brian
clean slate |
421 |
{
|
422 |
public: |
|
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
423 |
sys_var_session(const char *name_arg, |
1
by brian
clean slate |
424 |
sys_after_update_func func= NULL, |
801.1.1
by Brian Aker
Solaris build error fix. |
425 |
Binlog_status_enum bl_status= NOT_IN_BINLOG) |
426 |
:sys_var(name_arg, func, bl_status) |
|
1
by brian
clean slate |
427 |
{}
|
644
by Brian Aker
Clean up warnings for Solaris. |
428 |
bool check_type(enum_var_type) |
77.1.7
by Monty Taylor
Heap builds clean. |
429 |
{ return 0; } |
1
by brian
clean slate |
430 |
bool check_default(enum_var_type type) |
431 |
{
|
|
432 |
return type == OPT_GLOBAL && !option_limits; |
|
433 |
}
|
|
434 |
};
|
|
435 |
||
615
by Brian Aker
Added 32bit system variable support |
436 |
class sys_var_session_uint32_t :public sys_var_session |
437 |
{
|
|
438 |
sys_check_func check_func; |
|
439 |
public: |
|
440 |
uint32_t SV::*offset; |
|
441 |
sys_var_session_uint32_t(sys_var_chain *chain, const char *name_arg, |
|
442 |
uint32_t SV::*offset_arg, |
|
443 |
sys_check_func c_func= NULL, |
|
444 |
sys_after_update_func au_func= NULL, |
|
445 |
Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) |
|
446 |
:sys_var_session(name_arg, au_func, binlog_status_arg), check_func(c_func), |
|
447 |
offset(offset_arg) |
|
448 |
{ chain_sys_var(chain); } |
|
449 |
bool check(Session *session, set_var *var); |
|
450 |
bool update(Session *session, set_var *var); |
|
451 |
void set_default(Session *session, enum_var_type type); |
|
452 |
SHOW_TYPE show_type() { return SHOW_LONG; } |
|
779.3.10
by Monty Taylor
Turned on -Wshadow. |
453 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
454 |
const LEX_STRING *base); |
|
615
by Brian Aker
Added 32bit system variable support |
455 |
};
|
456 |
||
1
by brian
clean slate |
457 |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
458 |
class sys_var_session_ha_rows :public sys_var_session |
1
by brian
clean slate |
459 |
{
|
460 |
public: |
|
461 |
ha_rows SV::*offset; |
|
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
462 |
sys_var_session_ha_rows(sys_var_chain *chain, const char *name_arg, |
1
by brian
clean slate |
463 |
ha_rows SV::*offset_arg) |
520.1.22
by Brian Aker
Second pass of thd cleanup |
464 |
:sys_var_session(name_arg), offset(offset_arg) |
1
by brian
clean slate |
465 |
{ chain_sys_var(chain); } |
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
466 |
sys_var_session_ha_rows(sys_var_chain *chain, const char *name_arg, |
1
by brian
clean slate |
467 |
ha_rows SV::*offset_arg, |
468 |
sys_after_update_func func) |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
469 |
:sys_var_session(name_arg,func), offset(offset_arg) |
1
by brian
clean slate |
470 |
{ chain_sys_var(chain); } |
520.1.22
by Brian Aker
Second pass of thd cleanup |
471 |
bool update(Session *session, set_var *var); |
472 |
void set_default(Session *session, enum_var_type type); |
|
1
by brian
clean slate |
473 |
SHOW_TYPE show_type() { return SHOW_HA_ROWS; } |
779.3.10
by Monty Taylor
Turned on -Wshadow. |
474 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
475 |
const LEX_STRING *base); |
|
1
by brian
clean slate |
476 |
};
|
477 |
||
478 |
||
520.1.22
by Brian Aker
Second pass of thd cleanup |
479 |
class sys_var_session_uint64_t :public sys_var_session |
1
by brian
clean slate |
480 |
{
|
555
by Monty
Fixed 32-bit issues. |
481 |
sys_check_func check_func; |
1
by brian
clean slate |
482 |
public: |
151
by Brian Aker
Ulonglong to uint64_t |
483 |
uint64_t SV::*offset; |
1
by brian
clean slate |
484 |
bool only_global; |
555
by Monty
Fixed 32-bit issues. |
485 |
sys_var_session_uint64_t(sys_var_chain *chain, const char *name_arg, |
486 |
uint64_t SV::*offset_arg, |
|
487 |
sys_after_update_func au_func= NULL, |
|
488 |
sys_check_func c_func= NULL, |
|
489 |
Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) |
|
617
by Brian Aker
ulong fixes |
490 |
:sys_var_session(name_arg, au_func, binlog_status_arg), |
491 |
check_func(c_func), |
|
492 |
offset(offset_arg) |
|
493 |
{ chain_sys_var(chain); } |
|
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
494 |
sys_var_session_uint64_t(sys_var_chain *chain, |
495 |
const char *name_arg, |
|
496 |
uint64_t SV::*offset_arg, |
|
497 |
sys_after_update_func func, |
|
617
by Brian Aker
ulong fixes |
498 |
bool only_global_arg, |
499 |
sys_check_func cfunc= NULL) |
|
555
by Monty
Fixed 32-bit issues. |
500 |
:sys_var_session(name_arg, func), |
501 |
check_func(cfunc), |
|
502 |
offset(offset_arg), |
|
1
by brian
clean slate |
503 |
only_global(only_global_arg) |
504 |
{ chain_sys_var(chain); } |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
505 |
bool update(Session *session, set_var *var); |
506 |
void set_default(Session *session, enum_var_type type); |
|
1
by brian
clean slate |
507 |
SHOW_TYPE show_type() { return SHOW_LONGLONG; } |
779.3.10
by Monty Taylor
Turned on -Wshadow. |
508 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
509 |
const LEX_STRING *base); |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
510 |
bool check(Session *session, set_var *var); |
1
by brian
clean slate |
511 |
bool check_default(enum_var_type type) |
512 |
{
|
|
513 |
return type == OPT_GLOBAL && !option_limits; |
|
514 |
}
|
|
515 |
bool check_type(enum_var_type type) |
|
516 |
{
|
|
517 |
return (only_global && type != OPT_GLOBAL); |
|
518 |
}
|
|
519 |
};
|
|
520 |
||
629.4.1
by Monty Taylor
First step in support size_t sys_var stuff. |
521 |
class sys_var_session_size_t :public sys_var_session |
522 |
{
|
|
523 |
sys_check_func check_func; |
|
524 |
public: |
|
525 |
size_t SV::*offset; |
|
526 |
bool only_global; |
|
527 |
sys_var_session_size_t(sys_var_chain *chain, const char *name_arg, |
|
528 |
size_t SV::*offset_arg, |
|
529 |
sys_after_update_func au_func= NULL, |
|
530 |
sys_check_func c_func= NULL, |
|
531 |
Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) |
|
532 |
:sys_var_session(name_arg, au_func, binlog_status_arg), |
|
533 |
check_func(c_func), |
|
534 |
offset(offset_arg) |
|
535 |
{ chain_sys_var(chain); } |
|
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
536 |
sys_var_session_size_t(sys_var_chain *chain, |
537 |
const char *name_arg, |
|
538 |
size_t SV::*offset_arg, |
|
539 |
sys_after_update_func func, |
|
629.4.1
by Monty Taylor
First step in support size_t sys_var stuff. |
540 |
bool only_global_arg, |
541 |
sys_check_func cfunc= NULL) |
|
542 |
:sys_var_session(name_arg, func), |
|
543 |
check_func(cfunc), |
|
544 |
offset(offset_arg), |
|
545 |
only_global(only_global_arg) |
|
546 |
{ chain_sys_var(chain); } |
|
547 |
bool update(Session *session, set_var *var); |
|
548 |
void set_default(Session *session, enum_var_type type); |
|
549 |
SHOW_TYPE show_type() { return SHOW_SIZE; } |
|
779.3.10
by Monty Taylor
Turned on -Wshadow. |
550 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
551 |
const LEX_STRING *base); |
|
629.4.1
by Monty Taylor
First step in support size_t sys_var stuff. |
552 |
bool check(Session *session, set_var *var); |
553 |
bool check_default(enum_var_type type) |
|
554 |
{
|
|
555 |
return type == OPT_GLOBAL && !option_limits; |
|
556 |
}
|
|
557 |
bool check_type(enum_var_type type) |
|
558 |
{
|
|
559 |
return (only_global && type != OPT_GLOBAL); |
|
560 |
}
|
|
561 |
};
|
|
562 |
||
1
by brian
clean slate |
563 |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
564 |
class sys_var_session_bool :public sys_var_session |
1
by brian
clean slate |
565 |
{
|
566 |
public: |
|
200
by Brian Aker
my_bool from handler and set_var |
567 |
bool SV::*offset; |
520.1.22
by Brian Aker
Second pass of thd cleanup |
568 |
sys_var_session_bool(sys_var_chain *chain, const char *name_arg, bool SV::*offset_arg) |
569 |
:sys_var_session(name_arg), offset(offset_arg) |
|
1
by brian
clean slate |
570 |
{ chain_sys_var(chain); } |
520.1.22
by Brian Aker
Second pass of thd cleanup |
571 |
sys_var_session_bool(sys_var_chain *chain, const char *name_arg, bool SV::*offset_arg, |
1
by brian
clean slate |
572 |
sys_after_update_func func) |
520.1.22
by Brian Aker
Second pass of thd cleanup |
573 |
:sys_var_session(name_arg,func), offset(offset_arg) |
1
by brian
clean slate |
574 |
{ chain_sys_var(chain); } |
520.1.22
by Brian Aker
Second pass of thd cleanup |
575 |
bool update(Session *session, set_var *var); |
576 |
void set_default(Session *session, enum_var_type type); |
|
1
by brian
clean slate |
577 |
SHOW_TYPE show_type() { return SHOW_MY_BOOL; } |
779.3.10
by Monty Taylor
Turned on -Wshadow. |
578 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
579 |
const LEX_STRING *base); |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
580 |
bool check(Session *session, set_var *var) |
1
by brian
clean slate |
581 |
{
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
582 |
return check_enum(session, var, &bool_typelib); |
1
by brian
clean slate |
583 |
}
|
644
by Brian Aker
Clean up warnings for Solaris. |
584 |
bool check_update_type(Item_result) |
77.1.7
by Monty Taylor
Heap builds clean. |
585 |
{ return 0; } |
1
by brian
clean slate |
586 |
};
|
587 |
||
588 |
||
520.1.22
by Brian Aker
Second pass of thd cleanup |
589 |
class sys_var_session_enum :public sys_var_session |
1
by brian
clean slate |
590 |
{
|
591 |
protected: |
|
617
by Brian Aker
ulong fixes |
592 |
uint32_t SV::*offset; |
1
by brian
clean slate |
593 |
TYPELIB *enum_names; |
594 |
sys_check_func check_func; |
|
595 |
public: |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
596 |
sys_var_session_enum(sys_var_chain *chain, const char *name_arg, |
617
by Brian Aker
ulong fixes |
597 |
uint32_t SV::*offset_arg, TYPELIB *typelib, |
1
by brian
clean slate |
598 |
sys_after_update_func func= NULL, |
801.1.1
by Brian Aker
Solaris build error fix. |
599 |
sys_check_func check_f= NULL) |
520.1.22
by Brian Aker
Second pass of thd cleanup |
600 |
:sys_var_session(name_arg, func), offset(offset_arg), |
801.1.1
by Brian Aker
Solaris build error fix. |
601 |
enum_names(typelib), check_func(check_f) |
1
by brian
clean slate |
602 |
{ chain_sys_var(chain); } |
520.1.22
by Brian Aker
Second pass of thd cleanup |
603 |
bool check(Session *session, set_var *var) |
1
by brian
clean slate |
604 |
{
|
605 |
int ret= 0; |
|
606 |
if (check_func) |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
607 |
ret= (*check_func)(session, var); |
608 |
return ret ? ret : check_enum(session, var, enum_names); |
|
1
by brian
clean slate |
609 |
}
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
610 |
bool update(Session *session, set_var *var); |
611 |
void set_default(Session *session, enum_var_type type); |
|
1
by brian
clean slate |
612 |
SHOW_TYPE show_type() { return SHOW_CHAR; } |
779.3.10
by Monty Taylor
Turned on -Wshadow. |
613 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
614 |
const LEX_STRING *base); |
|
644
by Brian Aker
Clean up warnings for Solaris. |
615 |
bool check_update_type(Item_result) |
77.1.7
by Monty Taylor
Heap builds clean. |
616 |
{ return 0; } |
1
by brian
clean slate |
617 |
};
|
618 |
||
619 |
||
620 |
||
520.1.22
by Brian Aker
Second pass of thd cleanup |
621 |
class sys_var_session_optimizer_switch :public sys_var_session_enum |
1
by brian
clean slate |
622 |
{
|
623 |
public: |
|
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
624 |
sys_var_session_optimizer_switch(sys_var_chain *chain, const char *name_arg, |
617
by Brian Aker
ulong fixes |
625 |
uint32_t SV::*offset_arg) |
520.1.22
by Brian Aker
Second pass of thd cleanup |
626 |
:sys_var_session_enum(chain, name_arg, offset_arg, &optimizer_switch_typelib) |
1
by brian
clean slate |
627 |
{}
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
628 |
bool check(Session *session, set_var *var) |
1
by brian
clean slate |
629 |
{
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
630 |
return check_set(session, var, enum_names); |
1
by brian
clean slate |
631 |
}
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
632 |
void set_default(Session *session, enum_var_type type); |
779.3.10
by Monty Taylor
Turned on -Wshadow. |
633 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
634 |
const LEX_STRING *base); |
|
617
by Brian Aker
ulong fixes |
635 |
static bool symbolic_mode_representation(Session *session, uint32_t sql_mode, |
1
by brian
clean slate |
636 |
LEX_STRING *rep); |
637 |
};
|
|
638 |
||
639 |
||
520.1.22
by Brian Aker
Second pass of thd cleanup |
640 |
class sys_var_session_storage_engine :public sys_var_session |
1
by brian
clean slate |
641 |
{
|
642 |
protected: |
|
643 |
plugin_ref SV::*offset; |
|
644 |
public: |
|
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
645 |
sys_var_session_storage_engine(sys_var_chain *chain, const char *name_arg, |
1
by brian
clean slate |
646 |
plugin_ref SV::*offset_arg) |
520.1.22
by Brian Aker
Second pass of thd cleanup |
647 |
:sys_var_session(name_arg), offset(offset_arg) |
1
by brian
clean slate |
648 |
{ chain_sys_var(chain); } |
520.1.22
by Brian Aker
Second pass of thd cleanup |
649 |
bool check(Session *session, set_var *var); |
1
by brian
clean slate |
650 |
SHOW_TYPE show_type() { return SHOW_CHAR; } |
651 |
bool check_update_type(Item_result type) |
|
652 |
{
|
|
653 |
return type != STRING_RESULT; /* Only accept strings */ |
|
654 |
}
|
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
655 |
void set_default(Session *session, enum_var_type type); |
656 |
bool update(Session *session, set_var *var); |
|
779.3.10
by Monty Taylor
Turned on -Wshadow. |
657 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
658 |
const LEX_STRING *base); |
|
1
by brian
clean slate |
659 |
};
|
660 |
||
520.1.22
by Brian Aker
Second pass of thd cleanup |
661 |
class sys_var_session_bit :public sys_var_session |
1
by brian
clean slate |
662 |
{
|
663 |
sys_check_func check_func; |
|
664 |
sys_update_func update_func; |
|
665 |
public: |
|
151
by Brian Aker
Ulonglong to uint64_t |
666 |
uint64_t bit_flag; |
1
by brian
clean slate |
667 |
bool reverse; |
520.1.22
by Brian Aker
Second pass of thd cleanup |
668 |
sys_var_session_bit(sys_var_chain *chain, const char *name_arg, |
1
by brian
clean slate |
669 |
sys_check_func c_func, sys_update_func u_func, |
151
by Brian Aker
Ulonglong to uint64_t |
670 |
uint64_t bit, bool reverse_arg=0, |
1
by brian
clean slate |
671 |
Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) |
520.1.22
by Brian Aker
Second pass of thd cleanup |
672 |
:sys_var_session(name_arg, NULL, binlog_status_arg), check_func(c_func), |
1
by brian
clean slate |
673 |
update_func(u_func), bit_flag(bit), reverse(reverse_arg) |
674 |
{ chain_sys_var(chain); } |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
675 |
bool check(Session *session, set_var *var); |
676 |
bool update(Session *session, set_var *var); |
|
644
by Brian Aker
Clean up warnings for Solaris. |
677 |
bool check_update_type(Item_result) |
77.1.7
by Monty Taylor
Heap builds clean. |
678 |
{ return 0; } |
1
by brian
clean slate |
679 |
bool check_type(enum_var_type type) { return type == OPT_GLOBAL; } |
680 |
SHOW_TYPE show_type() { return SHOW_MY_BOOL; } |
|
779.3.10
by Monty Taylor
Turned on -Wshadow. |
681 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
682 |
const LEX_STRING *base); |
|
1
by brian
clean slate |
683 |
};
|
684 |
||
685 |
/* some variables that require special handling */
|
|
686 |
||
687 |
class sys_var_timestamp :public sys_var |
|
688 |
{
|
|
689 |
public: |
|
690 |
sys_var_timestamp(sys_var_chain *chain, const char *name_arg, |
|
691 |
Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) |
|
692 |
:sys_var(name_arg, NULL, binlog_status_arg) |
|
693 |
{ chain_sys_var(chain); } |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
694 |
bool update(Session *session, set_var *var); |
695 |
void set_default(Session *session, enum_var_type type); |
|
1
by brian
clean slate |
696 |
bool check_type(enum_var_type type) { return type == OPT_GLOBAL; } |
644
by Brian Aker
Clean up warnings for Solaris. |
697 |
bool check_default(enum_var_type) |
77.1.7
by Monty Taylor
Heap builds clean. |
698 |
{ return 0; } |
699 |
SHOW_TYPE show_type(void) { return SHOW_LONG; } |
|
779.3.10
by Monty Taylor
Turned on -Wshadow. |
700 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
701 |
const LEX_STRING *base); |
|
1
by brian
clean slate |
702 |
};
|
703 |
||
704 |
||
705 |
class sys_var_last_insert_id :public sys_var |
|
706 |
{
|
|
707 |
public: |
|
708 |
sys_var_last_insert_id(sys_var_chain *chain, const char *name_arg, |
|
709 |
Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) |
|
710 |
:sys_var(name_arg, NULL, binlog_status_arg) |
|
711 |
{ chain_sys_var(chain); } |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
712 |
bool update(Session *session, set_var *var); |
1
by brian
clean slate |
713 |
bool check_type(enum_var_type type) { return type == OPT_GLOBAL; } |
714 |
SHOW_TYPE show_type() { return SHOW_LONGLONG; } |
|
779.3.10
by Monty Taylor
Turned on -Wshadow. |
715 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
716 |
const LEX_STRING *base); |
|
1
by brian
clean slate |
717 |
};
|
718 |
||
719 |
||
520.1.22
by Brian Aker
Second pass of thd cleanup |
720 |
class sys_var_collation :public sys_var_session |
1
by brian
clean slate |
721 |
{
|
722 |
public: |
|
723 |
sys_var_collation(const char *name_arg, |
|
724 |
Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
725 |
:sys_var_session(name_arg, NULL, binlog_status_arg) |
744
by Brian Aker
Removing dead code around one shot. |
726 |
{ } |
520.1.22
by Brian Aker
Second pass of thd cleanup |
727 |
bool check(Session *session, set_var *var); |
1
by brian
clean slate |
728 |
SHOW_TYPE show_type() { return SHOW_CHAR; } |
729 |
bool check_update_type(Item_result type) |
|
730 |
{
|
|
731 |
return ((type != STRING_RESULT) && (type != INT_RESULT)); |
|
732 |
}
|
|
644
by Brian Aker
Clean up warnings for Solaris. |
733 |
bool check_default(enum_var_type) { return 0; } |
520.1.22
by Brian Aker
Second pass of thd cleanup |
734 |
virtual void set_default(Session *session, enum_var_type type)= 0; |
1
by brian
clean slate |
735 |
};
|
736 |
||
737 |
class sys_var_collation_sv :public sys_var_collation |
|
738 |
{
|
|
264.2.6
by Andrey Hristov
Constify the usage of CHARSET_INFO almost to the last place in the code. |
739 |
const CHARSET_INFO *SV::*offset; |
740 |
const CHARSET_INFO **global_default; |
|
1
by brian
clean slate |
741 |
public: |
742 |
sys_var_collation_sv(sys_var_chain *chain, const char *name_arg, |
|
264.2.6
by Andrey Hristov
Constify the usage of CHARSET_INFO almost to the last place in the code. |
743 |
const CHARSET_INFO *SV::*offset_arg, |
744 |
const CHARSET_INFO **global_default_arg, |
|
1
by brian
clean slate |
745 |
Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) |
746 |
:sys_var_collation(name_arg, binlog_status_arg), |
|
747 |
offset(offset_arg), global_default(global_default_arg) |
|
748 |
{
|
|
749 |
chain_sys_var(chain); |
|
750 |
}
|
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
751 |
bool update(Session *session, set_var *var); |
752 |
void set_default(Session *session, enum_var_type type); |
|
779.3.10
by Monty Taylor
Turned on -Wshadow. |
753 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
754 |
const LEX_STRING *base); |
|
1
by brian
clean slate |
755 |
};
|
756 |
||
757 |
||
758 |
class sys_var_key_cache_param :public sys_var |
|
759 |
{
|
|
760 |
protected: |
|
761 |
size_t offset; |
|
762 |
public: |
|
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
763 |
sys_var_key_cache_param(sys_var_chain *chain, const char *name_arg, |
1
by brian
clean slate |
764 |
size_t offset_arg) |
765 |
:sys_var(name_arg), offset(offset_arg) |
|
766 |
{ chain_sys_var(chain); } |
|
779.3.10
by Monty Taylor
Turned on -Wshadow. |
767 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
768 |
const LEX_STRING *base); |
|
644
by Brian Aker
Clean up warnings for Solaris. |
769 |
bool check_default(enum_var_type) |
77.1.7
by Monty Taylor
Heap builds clean. |
770 |
{ return 1; } |
1
by brian
clean slate |
771 |
bool is_struct() { return 1; } |
772 |
};
|
|
773 |
||
774 |
||
775 |
class sys_var_key_buffer_size :public sys_var_key_cache_param |
|
776 |
{
|
|
777 |
public: |
|
778 |
sys_var_key_buffer_size(sys_var_chain *chain, const char *name_arg) |
|
779 |
:sys_var_key_cache_param(chain, name_arg, |
|
780 |
offsetof(KEY_CACHE, param_buff_size)) |
|
781 |
{}
|
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
782 |
bool update(Session *session, set_var *var); |
1
by brian
clean slate |
783 |
SHOW_TYPE show_type() { return SHOW_LONGLONG; } |
784 |
};
|
|
785 |
||
786 |
||
787 |
class sys_var_key_cache_long :public sys_var_key_cache_param |
|
788 |
{
|
|
789 |
public: |
|
790 |
sys_var_key_cache_long(sys_var_chain *chain, const char *name_arg, size_t offset_arg) |
|
791 |
:sys_var_key_cache_param(chain, name_arg, offset_arg) |
|
792 |
{}
|
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
793 |
bool update(Session *session, set_var *var); |
1
by brian
clean slate |
794 |
SHOW_TYPE show_type() { return SHOW_LONG; } |
795 |
};
|
|
796 |
||
797 |
||
520.1.22
by Brian Aker
Second pass of thd cleanup |
798 |
class sys_var_session_date_time_format :public sys_var_session |
1
by brian
clean slate |
799 |
{
|
800 |
DATE_TIME_FORMAT *SV::*offset; |
|
398.1.1
by Monty Taylor
Remove typedef enum enum_drizzle_timestamp_type timestamp_type; |
801 |
enum enum_drizzle_timestamp_type date_time_type; |
1
by brian
clean slate |
802 |
public: |
520.1.22
by Brian Aker
Second pass of thd cleanup |
803 |
sys_var_session_date_time_format(sys_var_chain *chain, const char *name_arg, |
1
by brian
clean slate |
804 |
DATE_TIME_FORMAT *SV::*offset_arg, |
398.1.1
by Monty Taylor
Remove typedef enum enum_drizzle_timestamp_type timestamp_type; |
805 |
enum enum_drizzle_timestamp_type date_time_type_arg) |
520.1.22
by Brian Aker
Second pass of thd cleanup |
806 |
:sys_var_session(name_arg), offset(offset_arg), |
1
by brian
clean slate |
807 |
date_time_type(date_time_type_arg) |
808 |
{ chain_sys_var(chain); } |
|
809 |
SHOW_TYPE show_type() { return SHOW_CHAR; } |
|
810 |
bool check_update_type(Item_result type) |
|
811 |
{
|
|
812 |
return type != STRING_RESULT; /* Only accept strings */ |
|
813 |
}
|
|
644
by Brian Aker
Clean up warnings for Solaris. |
814 |
bool check_default(enum_var_type) |
77.1.7
by Monty Taylor
Heap builds clean. |
815 |
{ return 0; } |
520.1.22
by Brian Aker
Second pass of thd cleanup |
816 |
bool check(Session *session, set_var *var); |
817 |
bool update(Session *session, set_var *var); |
|
818 |
void update2(Session *session, enum_var_type type, DATE_TIME_FORMAT *new_value); |
|
779.3.10
by Monty Taylor
Turned on -Wshadow. |
819 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
820 |
const LEX_STRING *base); |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
821 |
void set_default(Session *session, enum_var_type type); |
1
by brian
clean slate |
822 |
};
|
823 |
||
824 |
||
825 |
/* Variable that you can only read from */
|
|
826 |
||
827 |
class sys_var_readonly: public sys_var |
|
828 |
{
|
|
829 |
public: |
|
830 |
enum_var_type var_type; |
|
831 |
SHOW_TYPE show_type_value; |
|
832 |
sys_value_ptr_func value_ptr_func; |
|
833 |
sys_var_readonly(sys_var_chain *chain, const char *name_arg, enum_var_type type, |
|
834 |
SHOW_TYPE show_type_arg, |
|
835 |
sys_value_ptr_func value_ptr_func_arg) |
|
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
836 |
:sys_var(name_arg), var_type(type), |
1
by brian
clean slate |
837 |
show_type_value(show_type_arg), value_ptr_func(value_ptr_func_arg) |
838 |
{ chain_sys_var(chain); } |
|
644
by Brian Aker
Clean up warnings for Solaris. |
839 |
bool update(Session *, set_var *) |
77.1.7
by Monty Taylor
Heap builds clean. |
840 |
{ return 1; } |
644
by Brian Aker
Clean up warnings for Solaris. |
841 |
bool check_default(enum_var_type) |
77.1.7
by Monty Taylor
Heap builds clean. |
842 |
{ return 1; } |
1
by brian
clean slate |
843 |
bool check_type(enum_var_type type) { return type != var_type; } |
644
by Brian Aker
Clean up warnings for Solaris. |
844 |
bool check_update_type(Item_result) |
77.1.7
by Monty Taylor
Heap builds clean. |
845 |
{ return 1; } |
779.3.10
by Monty Taylor
Turned on -Wshadow. |
846 |
unsigned char *value_ptr(Session *session, enum_var_type, |
847 |
const LEX_STRING *) |
|
1
by brian
clean slate |
848 |
{
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
849 |
return (*value_ptr_func)(session); |
1
by brian
clean slate |
850 |
}
|
77.1.7
by Monty Taylor
Heap builds clean. |
851 |
SHOW_TYPE show_type(void) { return show_type_value; } |
852 |
bool is_readonly(void) const { return 1; } |
|
1
by brian
clean slate |
853 |
};
|
854 |
||
855 |
||
856 |
class sys_var_have_option: public sys_var |
|
857 |
{
|
|
858 |
protected: |
|
859 |
virtual SHOW_COMP_OPTION get_option() = 0; |
|
860 |
public: |
|
861 |
sys_var_have_option(sys_var_chain *chain, const char *variable_name): |
|
862 |
sys_var(variable_name) |
|
863 |
{ chain_sys_var(chain); } |
|
779.3.10
by Monty Taylor
Turned on -Wshadow. |
864 |
unsigned char *value_ptr(Session *, enum_var_type, |
865 |
const LEX_STRING *) |
|
1
by brian
clean slate |
866 |
{
|
481
by Brian Aker
Remove all of uchar. |
867 |
return (unsigned char*) show_comp_option_name[get_option()]; |
1
by brian
clean slate |
868 |
}
|
644
by Brian Aker
Clean up warnings for Solaris. |
869 |
bool update(Session *, set_var *) { return 1; } |
870 |
bool check_default(enum_var_type) |
|
77.1.7
by Monty Taylor
Heap builds clean. |
871 |
{ return 1; } |
1
by brian
clean slate |
872 |
bool check_type(enum_var_type type) { return type != OPT_GLOBAL; } |
644
by Brian Aker
Clean up warnings for Solaris. |
873 |
bool check_update_type(Item_result) |
77.1.7
by Monty Taylor
Heap builds clean. |
874 |
{ return 1; } |
1
by brian
clean slate |
875 |
SHOW_TYPE show_type() { return SHOW_CHAR; } |
876 |
bool is_readonly() const { return 1; } |
|
877 |
};
|
|
878 |
||
879 |
||
880 |
class sys_var_have_variable: public sys_var_have_option |
|
881 |
{
|
|
882 |
SHOW_COMP_OPTION *have_variable; |
|
883 |
||
884 |
public: |
|
885 |
sys_var_have_variable(sys_var_chain *chain, const char *variable_name, |
|
886 |
SHOW_COMP_OPTION *have_variable_arg): |
|
887 |
sys_var_have_option(chain, variable_name), |
|
888 |
have_variable(have_variable_arg) |
|
889 |
{ } |
|
890 |
SHOW_COMP_OPTION get_option() { return *have_variable; } |
|
891 |
};
|
|
892 |
||
893 |
||
894 |
class sys_var_have_plugin: public sys_var_have_option |
|
895 |
{
|
|
896 |
const char *plugin_name_str; |
|
482
by Brian Aker
Remove uint. |
897 |
const uint32_t plugin_name_len; |
1
by brian
clean slate |
898 |
const int plugin_type; |
899 |
||
900 |
public: |
|
901 |
sys_var_have_plugin(sys_var_chain *chain, const char *variable_name, |
|
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
902 |
const char *plugin_name_str_arg, uint32_t plugin_name_len_arg, |
1
by brian
clean slate |
903 |
int plugin_type_arg): |
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
904 |
sys_var_have_option(chain, variable_name), |
1
by brian
clean slate |
905 |
plugin_name_str(plugin_name_str_arg), plugin_name_len(plugin_name_len_arg), |
906 |
plugin_type(plugin_type_arg) |
|
907 |
{ } |
|
908 |
/* the following method is declared in sql_plugin.cc */
|
|
909 |
SHOW_COMP_OPTION get_option(); |
|
910 |
};
|
|
911 |
||
912 |
||
520.1.22
by Brian Aker
Second pass of thd cleanup |
913 |
class sys_var_session_time_zone :public sys_var_session |
1
by brian
clean slate |
914 |
{
|
915 |
public: |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
916 |
sys_var_session_time_zone(sys_var_chain *chain, const char *name_arg, |
1
by brian
clean slate |
917 |
Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) |
520.1.22
by Brian Aker
Second pass of thd cleanup |
918 |
:sys_var_session(name_arg, NULL, binlog_status_arg) |
1
by brian
clean slate |
919 |
{
|
920 |
chain_sys_var(chain); |
|
921 |
}
|
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
922 |
bool check(Session *session, set_var *var); |
1
by brian
clean slate |
923 |
SHOW_TYPE show_type() { return SHOW_CHAR; } |
924 |
bool check_update_type(Item_result type) |
|
925 |
{
|
|
926 |
return type != STRING_RESULT; /* Only accept strings */ |
|
927 |
}
|
|
644
by Brian Aker
Clean up warnings for Solaris. |
928 |
bool check_default(enum_var_type) |
77.1.7
by Monty Taylor
Heap builds clean. |
929 |
{ return 0; } |
520.1.22
by Brian Aker
Second pass of thd cleanup |
930 |
bool update(Session *session, set_var *var); |
779.3.10
by Monty Taylor
Turned on -Wshadow. |
931 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
932 |
const LEX_STRING *base); |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
933 |
virtual void set_default(Session *session, enum_var_type type); |
1
by brian
clean slate |
934 |
};
|
935 |
||
936 |
||
520.1.22
by Brian Aker
Second pass of thd cleanup |
937 |
class sys_var_microseconds :public sys_var_session |
1
by brian
clean slate |
938 |
{
|
151
by Brian Aker
Ulonglong to uint64_t |
939 |
uint64_t SV::*offset; |
1
by brian
clean slate |
940 |
public: |
941 |
sys_var_microseconds(sys_var_chain *chain, const char *name_arg, |
|
151
by Brian Aker
Ulonglong to uint64_t |
942 |
uint64_t SV::*offset_arg): |
520.1.22
by Brian Aker
Second pass of thd cleanup |
943 |
sys_var_session(name_arg), offset(offset_arg) |
1
by brian
clean slate |
944 |
{ chain_sys_var(chain); } |
644
by Brian Aker
Clean up warnings for Solaris. |
945 |
bool check(Session *, set_var *) {return 0;} |
520.1.22
by Brian Aker
Second pass of thd cleanup |
946 |
bool update(Session *session, set_var *var); |
947 |
void set_default(Session *session, enum_var_type type); |
|
1
by brian
clean slate |
948 |
SHOW_TYPE show_type() { return SHOW_DOUBLE; } |
949 |
bool check_update_type(Item_result type) |
|
950 |
{
|
|
951 |
return (type != INT_RESULT && type != REAL_RESULT && type != DECIMAL_RESULT); |
|
952 |
}
|
|
779.3.10
by Monty Taylor
Turned on -Wshadow. |
953 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
954 |
const LEX_STRING *base); |
|
1
by brian
clean slate |
955 |
};
|
956 |
||
520.1.22
by Brian Aker
Second pass of thd cleanup |
957 |
class sys_var_session_lc_time_names :public sys_var_session |
1
by brian
clean slate |
958 |
{
|
959 |
public: |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
960 |
sys_var_session_lc_time_names(sys_var_chain *chain, const char *name_arg, |
1
by brian
clean slate |
961 |
Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) |
520.1.22
by Brian Aker
Second pass of thd cleanup |
962 |
: sys_var_session(name_arg, NULL, binlog_status_arg) |
1
by brian
clean slate |
963 |
{
|
964 |
chain_sys_var(chain); |
|
965 |
}
|
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
966 |
bool check(Session *session, set_var *var); |
1
by brian
clean slate |
967 |
SHOW_TYPE show_type() { return SHOW_CHAR; } |
968 |
bool check_update_type(Item_result type) |
|
969 |
{
|
|
970 |
return ((type != STRING_RESULT) && (type != INT_RESULT)); |
|
971 |
}
|
|
644
by Brian Aker
Clean up warnings for Solaris. |
972 |
bool check_default(enum_var_type) |
77.1.7
by Monty Taylor
Heap builds clean. |
973 |
{ return 0; } |
520.1.22
by Brian Aker
Second pass of thd cleanup |
974 |
bool update(Session *session, set_var *var); |
779.3.10
by Monty Taylor
Turned on -Wshadow. |
975 |
unsigned char *value_ptr(Session *session, enum_var_type type, |
976 |
const LEX_STRING *base); |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
977 |
virtual void set_default(Session *session, enum_var_type type); |
1
by brian
clean slate |
978 |
};
|
979 |
||
980 |
||
981 |
/****************************************************************************
|
|
982 |
Classes for parsing of the SET command
|
|
983 |
****************************************************************************/
|
|
984 |
||
985 |
class set_var_base :public Sql_alloc |
|
986 |
{
|
|
987 |
public: |
|
988 |
set_var_base() {} |
|
989 |
virtual ~set_var_base() {} |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
990 |
virtual int check(Session *session)=0; /* To check privileges etc. */ |
991 |
virtual int update(Session *session)=0; /* To set the value */ |
|
1
by brian
clean slate |
992 |
/* light check for PS */
|
993 |
};
|
|
994 |
||
995 |
||
141
by Brian Aker
Code cleanup. Mainly dead stuff :) |
996 |
/* MySQL internal variables */
|
1
by brian
clean slate |
997 |
|
998 |
class set_var :public set_var_base |
|
999 |
{
|
|
1000 |
public: |
|
1001 |
sys_var *var; |
|
1002 |
Item *value; |
|
1003 |
enum_var_type type; |
|
1004 |
union
|
|
1005 |
{
|
|
264.2.6
by Andrey Hristov
Constify the usage of CHARSET_INFO almost to the last place in the code. |
1006 |
const CHARSET_INFO *charset; |
520.4.14
by Monty Taylor
Removed korr.h and tztime.h from common_includes. Also removed the HAVE_DTRACE block and stuck it in autoconf. |
1007 |
uint32_t uint32_t_value; |
151
by Brian Aker
Ulonglong to uint64_t |
1008 |
uint64_t uint64_t_value; |
629.4.1
by Monty Taylor
First step in support size_t sys_var stuff. |
1009 |
size_t size_t_value; |
1
by brian
clean slate |
1010 |
plugin_ref plugin; |
1011 |
DATE_TIME_FORMAT *date_time_format; |
|
1012 |
Time_zone *time_zone; |
|
1013 |
MY_LOCALE *locale_value; |
|
1014 |
} save_result; |
|
1015 |
LEX_STRING base; /* for structs */ |
|
1016 |
||
1017 |
set_var(enum_var_type type_arg, sys_var *var_arg, |
|
1018 |
const LEX_STRING *base_name_arg, Item *value_arg) |
|
1019 |
:var(var_arg), type(type_arg), base(*base_name_arg) |
|
1020 |
{
|
|
1021 |
/*
|
|
1022 |
If the set value is a field, change it to a string to allow things like
|
|
1023 |
SET table_type=MYISAM;
|
|
1024 |
*/
|
|
1025 |
if (value_arg && value_arg->type() == Item::FIELD_ITEM) |
|
1026 |
{
|
|
1027 |
Item_field *item= (Item_field*) value_arg; |
|
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
1028 |
if (!(value=new Item_string(item->field_name, |
1
by brian
clean slate |
1029 |
(uint) strlen(item->field_name), |
1030 |
item->collation.collation))) |
|
1031 |
value=value_arg; /* Give error message later */ |
|
1032 |
}
|
|
1033 |
else
|
|
1034 |
value=value_arg; |
|
1035 |
}
|
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
1036 |
int check(Session *session); |
1037 |
int update(Session *session); |
|
1
by brian
clean slate |
1038 |
};
|
1039 |
||
1040 |
||
1041 |
/* User variables like @my_own_variable */
|
|
1042 |
||
1043 |
class set_var_user: public set_var_base |
|
1044 |
{
|
|
1045 |
Item_func_set_user_var *user_var_item; |
|
1046 |
public: |
|
1047 |
set_var_user(Item_func_set_user_var *item) |
|
1048 |
:user_var_item(item) |
|
1049 |
{}
|
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
1050 |
int check(Session *session); |
1051 |
int update(Session *session); |
|
1
by brian
clean slate |
1052 |
};
|
1053 |
||
1054 |
||
1055 |
extern "C" |
|
1056 |
{
|
|
1057 |
typedef int (*process_key_cache_t) (const char *, KEY_CACHE *); |
|
1058 |
}
|
|
1059 |
||
1060 |
/* Named lists (used for keycaches) */
|
|
1061 |
||
1062 |
class NAMED_LIST :public ilink |
|
1063 |
{
|
|
656.1.34
by Monty Taylor
Got closer... |
1064 |
std::string name; |
1
by brian
clean slate |
1065 |
public: |
481
by Brian Aker
Remove all of uchar. |
1066 |
unsigned char* data; |
1
by brian
clean slate |
1067 |
|
1068 |
NAMED_LIST(I_List<NAMED_LIST> *links, const char *name_arg, |
|
656.1.34
by Monty Taylor
Got closer... |
1069 |
uint32_t name_length_arg, unsigned char* data_arg); |
1070 |
bool cmp(const char *name_cmp, uint32_t length); |
|
1
by brian
clean slate |
1071 |
friend bool process_key_caches(process_key_cache_t func); |
1072 |
friend void delete_elements(I_List<NAMED_LIST> *list, |
|
656.1.34
by Monty Taylor
Got closer... |
1073 |
void (*free_element)(const char*, |
1074 |
unsigned char*)); |
|
1
by brian
clean slate |
1075 |
};
|
1076 |
||
1077 |
/* updated in sql_acl.cc */
|
|
1078 |
||
520.1.22
by Brian Aker
Second pass of thd cleanup |
1079 |
extern sys_var_session_bool sys_old_alter_table; |
1
by brian
clean slate |
1080 |
extern LEX_STRING default_key_cache_base; |
1081 |
||
1082 |
/* For sql_yacc */
|
|
1083 |
struct sys_var_with_base |
|
1084 |
{
|
|
1085 |
sys_var *var; |
|
1086 |
LEX_STRING base_name; |
|
1087 |
};
|
|
1088 |
||
1089 |
/*
|
|
1090 |
Prototypes for helper functions
|
|
1091 |
*/
|
|
1092 |
||
1093 |
int set_var_init(); |
|
1094 |
void set_var_free(); |
|
482
by Brian Aker
Remove uint. |
1095 |
int mysql_append_static_vars(const SHOW_VAR *show_vars, uint32_t count); |
520.1.22
by Brian Aker
Second pass of thd cleanup |
1096 |
SHOW_VAR* enumerate_sys_vars(Session *session, bool sorted); |
1
by brian
clean slate |
1097 |
int mysql_add_sys_var_chain(sys_var *chain, struct my_option *long_options); |
1098 |
int mysql_del_sys_var_chain(sys_var *chain); |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
1099 |
sys_var *find_sys_var(Session *session, const char *str, uint32_t length=0); |
1100 |
int sql_set_variables(Session *session, List<set_var_base> *var_list); |
|
1
by brian
clean slate |
1101 |
bool not_all_support_one_shot(List<set_var_base> *var_list); |
520.1.22
by Brian Aker
Second pass of thd cleanup |
1102 |
void fix_delay_key_write(Session *session, enum_var_type type); |
1
by brian
clean slate |
1103 |
void fix_slave_exec_mode(enum_var_type type); |
1104 |
extern sys_var_str sys_init_connect; |
|
1105 |
extern sys_var_str sys_init_slave; |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
1106 |
extern sys_var_session_time_zone sys_time_zone; |
1107 |
extern sys_var_session_bit sys_autocommit; |
|
264.2.6
by Andrey Hristov
Constify the usage of CHARSET_INFO almost to the last place in the code. |
1108 |
const CHARSET_INFO *get_old_charset_by_name(const char *old_name); |
482
by Brian Aker
Remove uint. |
1109 |
unsigned char* find_named(I_List<NAMED_LIST> *list, const char *name, uint32_t length, |
1
by brian
clean slate |
1110 |
NAMED_LIST **found); |
1111 |
||
1112 |
extern sys_var_str sys_var_general_log_path, sys_var_slow_log_path; |
|
1113 |
||
1114 |
/* key_cache functions */
|
|
779.3.10
by Monty Taylor
Turned on -Wshadow. |
1115 |
KEY_CACHE *get_key_cache(const LEX_STRING *cache_name); |
482
by Brian Aker
Remove uint. |
1116 |
KEY_CACHE *get_or_create_key_cache(const char *name, uint32_t length); |
1
by brian
clean slate |
1117 |
void free_key_cache(const char *name, KEY_CACHE *key_cache); |
1118 |
bool process_key_caches(process_key_cache_t func); |
|
1119 |
void delete_elements(I_List<NAMED_LIST> *list, |
|
481
by Brian Aker
Remove all of uchar. |
1120 |
void (*free_element)(const char*, unsigned char*)); |
575.1.6
by Monty Taylor
Cleaned up some headers for PCH. |
1121 |
|
1122 |
#endif /* DRIZZLED_ITEM_SET_H */ |