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 |
|
20 |
/**
|
|
21 |
@file
|
|
22 |
||
23 |
@details
|
|
24 |
Mostly this file is used in the server. But a little part of it is used in
|
|
812
by Brian Aker
Merge and fix for scheduler.h |
25 |
definition of SELECT_DISTINCT and others.
|
243.1.11
by Jay Pipes
* Added include guards in a couple places, and removed unecessary |
26 |
|
27 |
@TODO Name this file better. "priv" could mean private, privileged, privileges.
|
|
1
by brian
clean slate |
28 |
*/
|
29 |
||
575.4.7
by Monty Taylor
More header cleanup. |
30 |
#ifndef DRIZZLED_SERVER_INCLUDES_H
|
31 |
#define DRIZZLED_SERVER_INCLUDES_H
|
|
1
by brian
clean slate |
32 |
|
670.2.2
by Monty Taylor
Got rid of the rest of common_includes. Now on to server_includes. |
33 |
/* Cross-platform portability code and standard includes */
|
34 |
#include <drizzled/global.h> |
|
35 |
/* Contains system-wide constants and #defines */
|
|
36 |
#include <drizzled/definitions.h> |
|
37 |
||
38 |
/* Lots of system-wide struct definitions like IO_CACHE,
|
|
39 |
prototypes for all my_* functions */
|
|
40 |
#include <mysys/my_sys.h> |
|
41 |
/* Custom C string functions */
|
|
42 |
#include <mystrings/m_string.h> |
|
43 |
||
44 |
/* The <strong>INTERNAL</strong> plugin API - not the external, or public, server plugin API */
|
|
45 |
#include <drizzled/sql_plugin.h> |
|
243.1.16
by Jay Pipes
minor cleanup and final removal of all client and server prepared statement declarations and definitions |
46 |
/* Range optimization API/library */
|
47 |
#include <drizzled/opt_range.h> |
|
48 |
/* Simple error injection (crash) module */
|
|
49 |
#include <drizzled/error_injection.h> |
|
243.1.17
by Jay Pipes
FINAL PHASE removal of mysql_priv.h (Bye, bye my friend.) |
50 |
/* Routines for dropping, repairing, checking schema tables */
|
51 |
#include <drizzled/sql_table.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. |
52 |
|
722.4.1
by Mark Atwood
integrate errmsg plugin into sql_print_* functions |
53 |
/* Routines for printing error messages */
|
54 |
#include <drizzled/errmsg_print.h> |
|
55 |
||
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. |
56 |
#include <string> |
670.3.1
by Toru Maesaka
Replaced MySQL's my_stpncpy() with libc and c++ calls |
57 |
#include <sstream> |
602.2.1
by Yoshinori Sano
The global variable sql_command_flags uses std::bitset. |
58 |
#include <bitset> |
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. |
59 |
|
670.2.1
by Monty Taylor
Moved pthread keys |
60 |
|
670.2.2
by Monty Taylor
Got rid of the rest of common_includes. Now on to server_includes. |
61 |
extern const CHARSET_INFO *system_charset_info, *files_charset_info ; |
62 |
extern const CHARSET_INFO *national_charset_info, *table_alias_charset; |
|
670.2.1
by Monty Taylor
Moved pthread keys |
63 |
|
851
by Brian Aker
Class rewrite of Session (aka get all of the junk out) |
64 |
typedef struct drizzled_lock_st DRIZZLE_LOCK; |
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. |
65 |
typedef struct st_ha_create_information HA_CREATE_INFO; |
243.1.17
by Jay Pipes
FINAL PHASE removal of mysql_priv.h (Bye, bye my friend.) |
66 |
|
1
by brian
clean slate |
67 |
/* information schema */
|
575.4.7
by Monty Taylor
More header cleanup. |
68 |
static const std::string INFORMATION_SCHEMA_NAME("information_schema"); |
1
by brian
clean slate |
69 |
|
70 |
||
71 |
||
72 |
/* mysqld.cc */
|
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
73 |
void refresh_status(Session *session); |
575.4.4
by Yoshinori Sano
Rename mysql to drizzle. |
74 |
bool drizzle_rm_tmp_tables(void); |
520.1.22
by Brian Aker
Second pass of thd cleanup |
75 |
void handle_connection_in_main_thread(Session *session); |
76 |
void create_thread_to_handle_connection(Session *session); |
|
77 |
void unlink_session(Session *session); |
|
78 |
bool one_thread_per_connection_end(Session *session, bool put_in_cache); |
|
1
by brian
clean slate |
79 |
void flush_thread_cache(); |
80 |
||
81 |
/* item_func.cc */
|
|
82 |
extern bool check_reserved_words(LEX_STRING *name); |
|
482
by Brian Aker
Remove uint. |
83 |
extern enum_field_types agg_field_type(Item **items, uint32_t nitems); |
1
by brian
clean slate |
84 |
|
85 |
/* strfunc.cc */
|
|
482
by Brian Aker
Remove uint. |
86 |
uint64_t find_set(TYPELIB *lib, const char *x, uint32_t length, const CHARSET_INFO * const cs, |
87 |
char **err_pos, uint32_t *err_len, bool *set_warning); |
|
88 |
uint32_t find_type(const TYPELIB *lib, const char *find, uint32_t length, |
|
1
by brian
clean slate |
89 |
bool part_match); |
482
by Brian Aker
Remove uint. |
90 |
uint32_t find_type2(const TYPELIB *lib, const char *find, uint32_t length, |
264.2.6
by Andrey Hristov
Constify the usage of CHARSET_INFO almost to the last place in the code. |
91 |
const CHARSET_INFO *cs); |
1
by brian
clean slate |
92 |
void unhex_type2(TYPELIB *lib); |
482
by Brian Aker
Remove uint. |
93 |
uint32_t check_word(TYPELIB *lib, const char *val, const char *end, |
1
by brian
clean slate |
94 |
const char **end_of_word); |
95 |
int find_string_in_array(LEX_STRING * const haystack, LEX_STRING * const needle, |
|
264.2.6
by Andrey Hristov
Constify the usage of CHARSET_INFO almost to the last place in the code. |
96 |
const CHARSET_INFO * const cs); |
1
by brian
clean slate |
97 |
|
98 |
||
99 |
/*
|
|
100 |
External variables
|
|
101 |
*/
|
|
102 |
||
680
by Brian Aker
Remove locks around temp tables for searching tmp directory path. |
103 |
extern char *drizzle_tmpdir; |
1
by brian
clean slate |
104 |
extern const LEX_STRING command_name[]; |
105 |
extern const char *first_keyword, *my_localhost, *delayed_user, *binary_keyword; |
|
106 |
extern const char *myisam_recover_options_str; |
|
107 |
extern const char *in_left_expr_name, *in_additional_cond, *in_having_cond; |
|
108 |
extern const char * const TRG_EXT; |
|
109 |
extern const char * const TRN_EXT; |
|
110 |
extern char language[FN_REFLEN]; |
|
575.4.1
by ysano
Rename mysql to drizzle. |
111 |
extern char glob_hostname[FN_REFLEN], drizzle_home[FN_REFLEN]; |
1
by brian
clean slate |
112 |
extern char pidfile_name[FN_REFLEN], system_time_zone[30], *opt_init_file; |
722.4.1
by Mark Atwood
integrate errmsg plugin into sql_print_* functions |
113 |
extern char *opt_tc_log_file; |
1
by brian
clean slate |
114 |
extern const double log_10[309]; |
151
by Brian Aker
Ulonglong to uint64_t |
115 |
extern uint64_t log_10_int[20]; |
116 |
extern uint64_t keybuff_size; |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
117 |
extern uint64_t session_startup_options; |
1
by brian
clean slate |
118 |
extern ulong thread_id; |
625
by Brian Aker
ulong/64 bit straighten out. |
119 |
extern uint64_t aborted_threads; |
120 |
extern uint64_t aborted_connects; |
|
626
by Brian Aker
More of the same (ulong/64) |
121 |
extern uint64_t slow_launch_threads; |
622.1.1
by Brian Aker
32bit fixes around vars |
122 |
extern uint64_t slow_launch_time; |
123 |
extern uint64_t table_cache_size; |
|
124 |
extern uint64_t table_def_size; |
|
125 |
extern uint64_t max_connect_errors; |
|
126 |
extern uint64_t connect_timeout; |
|
626
by Brian Aker
More of the same (ulong/64) |
127 |
extern uint32_t back_log; |
606
by Brian Aker
Remove dead lex structure and clean up use of pid_t |
128 |
extern pid_t current_pid; |
622.1.1
by Brian Aker
32bit fixes around vars |
129 |
extern uint64_t expire_logs_days; |
625
by Brian Aker
ulong/64 bit straighten out. |
130 |
extern uint64_t tc_log_max_pages_used; |
131 |
extern uint64_t tc_log_page_size; |
|
132 |
extern uint64_t opt_tc_log_size; |
|
133 |
extern uint64_t tc_log_page_waits; |
|
812
by Brian Aker
Merge and fix for scheduler.h |
134 |
extern bool opt_innodb; |
482
by Brian Aker
Remove uint. |
135 |
extern uint32_t test_flags,select_errors,ha_open_options; |
574.2.1
by ysano
Rename mysql to drizzle. |
136 |
extern uint32_t protocol_version, drizzled_port, dropping_tables; |
482
by Brian Aker
Remove uint. |
137 |
extern uint32_t delay_key_write_options; |
1
by brian
clean slate |
138 |
extern bool opt_endinfo, using_udf_functions; |
150
by Brian Aker
More bool removal. More cow bell! |
139 |
extern bool locked_in_memory; |
1
by brian
clean slate |
140 |
extern bool opt_using_transactions; |
30
by Brian Aker
Large file and ftruncate() support |
141 |
extern bool using_update_log, server_id_supplied; |
722.4.1
by Mark Atwood
integrate errmsg plugin into sql_print_* functions |
142 |
extern bool opt_update_log, opt_bin_log; |
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
143 |
extern bool opt_log; |
1
by brian
clean slate |
144 |
extern ulong log_output_options; |
150
by Brian Aker
More bool removal. More cow bell! |
145 |
extern bool opt_character_set_client_handshake; |
1
by brian
clean slate |
146 |
extern bool volatile abort_loop, shutdown_in_progress; |
482
by Brian Aker
Remove uint. |
147 |
extern uint32_t volatile thread_count, thread_running, global_read_lock; |
148 |
extern uint32_t connection_count; |
|
150
by Brian Aker
More bool removal. More cow bell! |
149 |
extern bool opt_sql_bin_update; |
150 |
extern bool opt_safe_user_create; |
|
198
by Brian Aker
More my_bool... man am I getting tired of writing this. |
151 |
extern bool opt_no_mix_types; |
152 |
extern bool opt_safe_show_db, opt_myisam_use_mmap; |
|
147
by Brian Aker
More my_bool conversion. This time the set_var class. |
153 |
extern bool opt_local_infile; |
150
by Brian Aker
More bool removal. More cow bell! |
154 |
extern bool use_temp_pool; |
147
by Brian Aker
More my_bool conversion. This time the set_var class. |
155 |
extern bool opt_readonly; |
1
by brian
clean slate |
156 |
extern char* opt_secure_file_priv; |
150
by Brian Aker
More bool removal. More cow bell! |
157 |
extern bool opt_noacl; |
158 |
extern bool opt_old_style_user_limits; |
|
1
by brian
clean slate |
159 |
extern char *default_tz_name; |
160 |
extern char *opt_logname, *opt_slow_logname; |
|
161 |
extern const char *log_output_str; |
|
162 |
||
327.2.4
by Brian Aker
Refactoring table.h |
163 |
extern TableList general_log, slow_log; |
1
by brian
clean slate |
164 |
extern FILE *stderror_file; |
840.1.21
by Monty Taylor
ZOMG. Renamed all the rest of the stuff in libdrizzleclient to be drizzleclient_*. I love commandline perl. |
165 |
extern pthread_mutex_t LOCK_drizzleclient_create_db,LOCK_open, LOCK_lock_db, |
327.2.2
by Brian Aker
Removed dead/not used code. |
166 |
LOCK_thread_count,LOCK_user_locks, LOCK_status, |
808
by Brian Aker
Move number of threads to use for pool of threads to module. Removed slave |
167 |
LOCK_timezone, |
168 |
LOCK_global_read_lock, |
|
1
by brian
clean slate |
169 |
LOCK_global_system_variables, LOCK_user_conn, |
170 |
LOCK_bytes_sent, LOCK_bytes_received, LOCK_connection_count; |
|
171 |
extern pthread_mutex_t LOCK_server_started; |
|
658
by Brian Aker
Part removal of my_pthread.h |
172 |
extern pthread_rwlock_t LOCK_sys_init_connect; |
173 |
extern pthread_rwlock_t LOCK_system_variables_hash; |
|
1
by brian
clean slate |
174 |
extern pthread_cond_t COND_refresh, COND_thread_count, COND_manager; |
175 |
extern pthread_cond_t COND_global_read_lock; |
|
176 |
extern pthread_attr_t connection_attrib; |
|
520.1.21
by Brian Aker
THD -> Session rename |
177 |
extern I_List<Session> threads; |
1
by brian
clean slate |
178 |
extern MY_BITMAP temp_pool; |
179 |
extern String my_empty_string; |
|
180 |
extern const String my_null_string; |
|
181 |
extern SHOW_VAR status_vars[]; |
|
182 |
extern struct system_variables max_system_variables; |
|
183 |
extern struct system_status_var global_status_var; |
|
184 |
extern struct rand_struct sql_rand; |
|
185 |
||
186 |
extern const char *opt_date_time_formats[]; |
|
187 |
extern KNOWN_DATE_TIME_FORMAT known_date_time_formats[]; |
|
188 |
||
327.1.5
by Brian Aker
Refactor around classes. TABLE_LIST has been factored out of table.h |
189 |
extern Table *unused_tables; |
1
by brian
clean slate |
190 |
extern const char* any_db; |
191 |
extern struct my_option my_long_options[]; |
|
192 |
extern const LEX_STRING view_type; |
|
193 |
extern TYPELIB thread_handling_typelib; |
|
206
by Brian Aker
Removed final uint dead types. |
194 |
extern uint8_t uc_update_queries[SQLCOM_END+1]; |
590.2.18
by Monty Taylor
Changed the bitset<32> to a bitset<5>. Made the int constants into bitset constants. |
195 |
extern std::bitset<5> sql_command_flags[]; |
1
by brian
clean slate |
196 |
extern TYPELIB log_output_typelib; |
197 |
||
198 |
/* optional things, have_* variables */
|
|
199 |
extern SHOW_COMP_OPTION have_community_features; |
|
200 |
||
201 |
extern handlerton *myisam_hton; |
|
202 |
extern handlerton *heap_hton; |
|
203 |
||
177.3.1
by mark
remove ifdef HAVE_DLOPEN, make configure require dlopen() |
204 |
extern SHOW_COMP_OPTION have_symlink; |
1
by brian
clean slate |
205 |
|
206 |
extern pthread_t signal_thread; |
|
207 |
||
208 |
||
209 |
/* table.cc */
|
|
327.2.4
by Brian Aker
Refactoring table.h |
210 |
TABLE_SHARE *alloc_table_share(TableList *table_list, char *key, |
482
by Brian Aker
Remove uint. |
211 |
uint32_t key_length); |
520.1.22
by Brian Aker
Second pass of thd cleanup |
212 |
void init_tmp_table_share(Session *session, TABLE_SHARE *share, const char *key, |
482
by Brian Aker
Remove uint. |
213 |
uint32_t key_length, |
1
by brian
clean slate |
214 |
const char *table_name, const char *path); |
215 |
void free_table_share(TABLE_SHARE *share); |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
216 |
int open_table_def(Session *session, TABLE_SHARE *share, uint32_t db_flags); |
1
by brian
clean slate |
217 |
void open_table_error(TABLE_SHARE *share, int error, int db_errno, int errarg); |
520.1.22
by Brian Aker
Second pass of thd cleanup |
218 |
int open_table_from_share(Session *session, TABLE_SHARE *share, const char *alias, |
482
by Brian Aker
Remove uint. |
219 |
uint32_t db_stat, uint32_t prgflag, uint32_t ha_open_flags, |
327.1.5
by Brian Aker
Refactor around classes. TABLE_LIST has been factored out of table.h |
220 |
Table *outparam, open_table_mode open_mode); |
481
by Brian Aker
Remove all of uchar. |
221 |
int readfrm(const char *name, unsigned char **data, size_t *length); |
222 |
int writefrm(const char* name, const unsigned char* data, size_t len); |
|
223 |
int read_string(File file, unsigned char* *to, size_t length); |
|
327.1.5
by Brian Aker
Refactor around classes. TABLE_LIST has been factored out of table.h |
224 |
void free_blobs(Table *table); |
1
by brian
clean slate |
225 |
int set_zone(int nr,int min_zone,int max_zone); |
520.1.6
by Brian Aker
Fixed ulong in time calculation. |
226 |
uint32_t convert_period_to_month(uint32_t period); |
227 |
uint32_t convert_month_to_period(uint32_t month); |
|
482
by Brian Aker
Remove uint. |
228 |
void get_date_from_daynr(long daynr,uint32_t *year, uint32_t *month, |
229 |
uint32_t *day); |
|
722.1.8
by Monty Taylor
Merged from Toru - removal of my_time_t. |
230 |
time_t TIME_to_timestamp(Session *session, const DRIZZLE_TIME *t, bool *not_exist); |
482
by Brian Aker
Remove uint. |
231 |
bool str_to_time_with_warn(const char *str,uint32_t length,DRIZZLE_TIME *l_time); |
232 |
enum enum_drizzle_timestamp_type str_to_datetime_with_warn(const char *str, uint32_t length, |
|
233 |
DRIZZLE_TIME *l_time, uint32_t flags); |
|
236.1.24
by Monty Taylor
Renamed MYSQL_TIME to DRIZZLE_TIME. |
234 |
void localtime_to_TIME(DRIZZLE_TIME *to, struct tm *from); |
235 |
void calc_time_from_sec(DRIZZLE_TIME *to, long seconds, long microseconds); |
|
1
by brian
clean slate |
236 |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
237 |
void make_truncated_value_warning(Session *session, DRIZZLE_ERROR::enum_warning_level level, |
1
by brian
clean slate |
238 |
const char *str_val, |
482
by Brian Aker
Remove uint. |
239 |
uint32_t str_length, enum enum_drizzle_timestamp_type time_type, |
1
by brian
clean slate |
240 |
const char *field_name); |
241 |
||
236.1.24
by Monty Taylor
Renamed MYSQL_TIME to DRIZZLE_TIME. |
242 |
bool date_add_interval(DRIZZLE_TIME *ltime, interval_type int_type, INTERVAL interval); |
243 |
bool calc_time_diff(DRIZZLE_TIME *l_time1, DRIZZLE_TIME *l_time2, int l_sign, |
|
152
by Brian Aker
longlong replacement |
244 |
int64_t *seconds_out, long *microseconds_out); |
1
by brian
clean slate |
245 |
|
246 |
extern LEX_STRING interval_type_to_name[]; |
|
247 |
||
398.1.1
by Monty Taylor
Remove typedef enum enum_drizzle_timestamp_type timestamp_type; |
248 |
extern DATE_TIME_FORMAT *date_time_format_make(enum enum_drizzle_timestamp_type format_type, |
1
by brian
clean slate |
249 |
const char *format_str, |
482
by Brian Aker
Remove uint. |
250 |
uint32_t format_length); |
520.1.22
by Brian Aker
Second pass of thd cleanup |
251 |
extern DATE_TIME_FORMAT *date_time_format_copy(Session *session, |
1
by brian
clean slate |
252 |
DATE_TIME_FORMAT *format); |
253 |
const char *get_date_time_format_str(KNOWN_DATE_TIME_FORMAT *format, |
|
398.1.1
by Monty Taylor
Remove typedef enum enum_drizzle_timestamp_type timestamp_type; |
254 |
enum enum_drizzle_timestamp_type type); |
236.1.24
by Monty Taylor
Renamed MYSQL_TIME to DRIZZLE_TIME. |
255 |
void make_datetime(const DATE_TIME_FORMAT *format, const DRIZZLE_TIME *l_time, |
1
by brian
clean slate |
256 |
String *str); |
236.1.24
by Monty Taylor
Renamed MYSQL_TIME to DRIZZLE_TIME. |
257 |
void make_date(const DATE_TIME_FORMAT *format, const DRIZZLE_TIME *l_time, |
258 |
String *str); |
|
259 |
void make_time(const DATE_TIME_FORMAT *format, const DRIZZLE_TIME *l_time, |
|
260 |
String *str); |
|
261 |
int my_time_compare(DRIZZLE_TIME *a, DRIZZLE_TIME *b); |
|
520.1.22
by Brian Aker
Second pass of thd cleanup |
262 |
uint64_t get_datetime_value(Session *session, Item ***item_arg, Item **cache_arg, |
1
by brian
clean slate |
263 |
Item *warn_item, bool *is_null); |
264 |
||
265 |
int test_if_number(char *str,int *res,bool allow_wildcards); |
|
481
by Brian Aker
Remove all of uchar. |
266 |
void change_byte(unsigned char *,uint,char,char); |
520.1.22
by Brian Aker
Second pass of thd cleanup |
267 |
void init_read_record(READ_RECORD *info, Session *session, Table *reg_form, |
1
by brian
clean slate |
268 |
SQL_SELECT *select, |
269 |
int use_record_cache, bool print_errors); |
|
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
270 |
void init_read_record_idx(READ_RECORD *info, Session *session, Table *table, |
482
by Brian Aker
Remove uint. |
271 |
bool print_error, uint32_t idx); |
1
by brian
clean slate |
272 |
void end_read_record(READ_RECORD *info); |
520.1.22
by Brian Aker
Second pass of thd cleanup |
273 |
ha_rows filesort(Session *session, Table *form,struct st_sort_field *sortorder, |
482
by Brian Aker
Remove uint. |
274 |
uint32_t s_length, SQL_SELECT *select, |
1
by brian
clean slate |
275 |
ha_rows max_rows, bool sort_positions, |
276 |
ha_rows *examined_rows); |
|
327.1.5
by Brian Aker
Refactor around classes. TABLE_LIST has been factored out of table.h |
277 |
void filesort_free_buffers(Table *table, bool full); |
481
by Brian Aker
Remove all of uchar. |
278 |
void change_double_for_sort(double nr,unsigned char *to); |
152
by Brian Aker
longlong replacement |
279 |
double my_double_round(double value, int64_t dec, bool dec_unsigned, |
1
by brian
clean slate |
280 |
bool truncate); |
281 |
int get_quick_record(SQL_SELECT *select); |
|
282 |
||
283 |
int calc_weekday(long daynr,bool sunday_first_day_of_week); |
|
482
by Brian Aker
Remove uint. |
284 |
uint32_t calc_week(DRIZZLE_TIME *l_time, uint32_t week_behaviour, uint32_t *year); |
285 |
void find_date(char *pos,uint32_t *vek,uint32_t flag); |
|
1
by brian
clean slate |
286 |
TYPELIB *convert_strings_to_array_type(char * *typelibs, char * *end); |
287 |
TYPELIB *typelib(MEM_ROOT *mem_root, List<String> &strings); |
|
481
by Brian Aker
Remove all of uchar. |
288 |
ulong get_form_pos(File file, unsigned char *head, TYPELIB *save_names); |
779.3.53
by Monty Taylor
Revert the fail. |
289 |
ulong make_new_entry(File file,unsigned char *fileinfo,TYPELIB *formnames, |
290 |
const char *newname); |
|
1
by brian
clean slate |
291 |
ulong next_io_size(ulong pos); |
482
by Brian Aker
Remove uint. |
292 |
void append_unescaped(String *res, const char *pos, uint32_t length); |
520.1.22
by Brian Aker
Second pass of thd cleanup |
293 |
int create_frm(Session *session, const char *name, const char *db, const char *table, |
482
by Brian Aker
Remove uint. |
294 |
uint32_t reclength, unsigned char *fileinfo, |
295 |
HA_CREATE_INFO *create_info, uint32_t keys, KEY *key_info); |
|
584.2.7
by Stewart Smith
rename and delete tabledefinition protobuf file |
296 |
int rename_table_proto_file(const char *from, const char* to); |
813.5.3
by Stewart Smith
fix bug on failing to create table in rea_create_table. |
297 |
int delete_table_proto_file(const char *file_name); |
1
by brian
clean slate |
298 |
int rename_file_ext(const char * from,const char * to,const char * ext); |
299 |
bool check_db_name(LEX_STRING *db); |
|
300 |
bool check_column_name(const char *name); |
|
482
by Brian Aker
Remove uint. |
301 |
bool check_table_name(const char *name, uint32_t length); |
1
by brian
clean slate |
302 |
char *get_field(MEM_ROOT *mem, Field *field); |
303 |
bool get_field(MEM_ROOT *mem, Field *field, class String *res); |
|
304 |
char *fn_rext(char *name); |
|
305 |
||
306 |
/* Conversion functions */
|
|
482
by Brian Aker
Remove uint. |
307 |
uint32_t build_table_filename(char *buff, size_t bufflen, const char *db, |
308 |
const char *table, const char *ext, uint32_t flags); |
|
1
by brian
clean slate |
309 |
|
310 |
#define MYSQL50_TABLE_NAME_PREFIX "#mysql50#"
|
|
534
by Monty Taylor
Removed stxnmov. Also deleted strstr which had already been removed. |
311 |
#define MYSQL50_TABLE_NAME_PREFIX_LENGTH sizeof(MYSQL50_TABLE_NAME_PREFIX)
|
1
by brian
clean slate |
312 |
|
313 |
/* Flags for conversion functions. */
|
|
314 |
#define FN_FROM_IS_TMP (1 << 0)
|
|
315 |
#define FN_TO_IS_TMP (1 << 1)
|
|
316 |
#define FN_IS_TMP (FN_FROM_IS_TMP | FN_TO_IS_TMP)
|
|
317 |
#define NO_FRM_RENAME (1 << 2)
|
|
318 |
||
319 |
||
251
by Brian Aker
Cleanup around rand. |
320 |
inline ulong sql_rnd() |
1
by brian
clean slate |
321 |
{
|
251
by Brian Aker
Cleanup around rand. |
322 |
ulong tmp= (ulong) (rand() * 0xffffffff); /* make all bits random */ |
323 |
||
1
by brian
clean slate |
324 |
return tmp; |
325 |
}
|
|
326 |
||
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. |
327 |
|
1
by brian
clean slate |
328 |
|
329 |
/**
|
|
330 |
convert a hex digit into number.
|
|
331 |
*/
|
|
332 |
||
333 |
inline int hexchar_to_int(char c) |
|
334 |
{
|
|
335 |
if (c <= '9' && c >= '0') |
|
336 |
return c-'0'; |
|
337 |
c|=32; |
|
338 |
if (c <= 'f' && c >= 'a') |
|
339 |
return c-'a'+10; |
|
340 |
return -1; |
|
341 |
}
|
|
342 |
||
343 |
||
243.1.17
by Jay Pipes
FINAL PHASE removal of mysql_priv.h (Bye, bye my friend.) |
344 |
#endif /* DRIZZLE_SERVER_SERVER_INCLUDES_H */ |