Merge lp:~mordred/drizzle/drizzled-as-lib into lp:~drizzle-trunk/drizzle/development
- drizzled-as-lib
- Merge into development
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~mordred/drizzle/drizzled-as-lib |
Merge into: | lp:~drizzle-trunk/drizzle/development |
Prerequisite: | lp:~mordred/drizzle/use-std-unordered |
Diff against target: |
3341 lines (+1195/-1142) 44 files modified
Makefile.am (+2/-1) drizzled/cursor.cc (+24/-0) drizzled/cursor.h (+9/-6) drizzled/data_home.h (+5/-3) drizzled/drizzled.cc (+45/-484) drizzled/drizzled.h (+65/-0) drizzled/function/str/load_file.cc (+1/-1) drizzled/include.am (+353/-341) drizzled/internal/include.am (+2/-1) drizzled/internal/my_pthread.h (+0/-24) drizzled/main.cc (+328/-0) drizzled/message/include.am (+4/-3) drizzled/optimizer/range.cc (+0/-181) drizzled/pthread_globals.h (+1/-0) drizzled/schema_identifier.cc (+1/-1) drizzled/session.cc (+4/-5) drizzled/session_list.cc (+1/-1) drizzled/set_var.cc (+1/-1) drizzled/signal_handler.cc (+212/-0) drizzled/signal_handler.h (+55/-0) drizzled/sql_base.cc (+1/-2) drizzled/sql_load.cc (+3/-3) drizzled/sql_table.cc (+1/-6) drizzled/sql_table.h (+0/-4) drizzled/stacktrace.cc (+11/-2) drizzled/stacktrace.h (+0/-4) drizzled/statement/alter_table.cc (+5/-5) drizzled/statement/rename_table.cc (+1/-1) drizzled/table.cc (+0/-26) drizzled/table_identifier.cc (+3/-4) extra/include.am (+1/-4) plugin/archive/ha_archive.cc (+2/-11) plugin/archive/ha_archive.h (+0/-4) plugin/innobase/handler/ha_innodb.cc (+1/-1) plugin/myisam/plugin.ini (+1/-1) plugin/pbxt/src/ha_pbxt.h (+5/-5) plugin/pbxt/src/myxt_xt.cc (+1/-1) plugin/pbxt/src/table_xt.cc (+8/-0) plugin/pbxt/src/xt_defs.h (+1/-1) plugin/schema_engine/schema.cc (+2/-2) plugin/signal_handler/signal_handler.cc (+2/-1) support-files/drizzle.spec.in (+6/-0) tests/test-run.pl (+3/-1) tests/valgrind.supp (+24/-0) |
To merge this branch: | bzr merge lp:~mordred/drizzle/drizzled-as-lib |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Eric Day | Pending | ||
Brian Aker | Pending | ||
Review via email: mp+23590@code.launchpad.net |
This proposal supersedes a proposal from 2010-04-01.
Commit message
Description of the change
Changed the build to build most of the code as a shared lib and then link that into the drizzled binary. This does _NOT_ make it any sort of embedded server or make the lib particularly useful - except for pre-linking plugins against for link-time symbol resolution checking. It will also make it easier for us to start applying visibility structures to objects. YAY ABI!
Eric Day (eday) wrote : Posted in a previous version of this proposal | # |
Monty Taylor (mordred) wrote : Posted in a previous version of this proposal | # |
Slight issue with the gdbinit file when starting from mtr I need to fix...
Monty Taylor (mordred) wrote : Posted in a previous version of this proposal | # |
Got it.
Brian Aker (brianaker) wrote : Posted in a previous version of this proposal | # |
Hi!
This has some of the DRIZZLE_
Cheers,
-Brian
Monty Taylor (mordred) wrote : Posted in a previous version of this proposal | # |
Merged up with latest in trunk and removed the drizzle-
- 1475. By Monty Taylor
-
Merged trunk.
- 1476. By Monty Taylor
-
Fixed a symbol oops.
Jay Pipes (jaypipes) wrote : | # |
Note that this also has the latest pandora build merged in as well...
- 1477. By Monty Taylor
-
Merged up with build.
- 1478. By Monty Taylor
-
We need to launch drizzled via libtool now.
Preview Diff
1 | === modified file 'Makefile.am' | |||
2 | --- Makefile.am 2010-04-16 00:08:16 +0000 | |||
3 | +++ Makefile.am 2010-04-19 20:33:26 +0000 | |||
4 | @@ -22,6 +22,7 @@ | |||
5 | 22 | noinst_HEADERS = | 22 | noinst_HEADERS = |
6 | 23 | nobase_nodist_include_HEADERS = | 23 | nobase_nodist_include_HEADERS = |
7 | 24 | nobase_dist_include_HEADERS = | 24 | nobase_dist_include_HEADERS = |
8 | 25 | sbin_PROGRAMS = | ||
9 | 25 | lib_LTLIBRARIES = | 26 | lib_LTLIBRARIES = |
10 | 26 | noinst_LTLIBRARIES = | 27 | noinst_LTLIBRARIES = |
11 | 27 | noinst_PROGRAMS = | 28 | noinst_PROGRAMS = |
12 | @@ -124,11 +125,11 @@ | |||
13 | 124 | 125 | ||
14 | 125 | include config/lint-source.am | 126 | include config/lint-source.am |
15 | 126 | 127 | ||
16 | 128 | include drizzled/message/include.am | ||
17 | 127 | include drizzled/include.am | 129 | include drizzled/include.am |
18 | 128 | include drizzled/internal/include.am | 130 | include drizzled/internal/include.am |
19 | 129 | include drizzled/algorithm/include.am | 131 | include drizzled/algorithm/include.am |
20 | 130 | include drizzled/util/include.am | 132 | include drizzled/util/include.am |
21 | 131 | include drizzled/message/include.am | ||
22 | 132 | include client/include.am | 133 | include client/include.am |
23 | 133 | include extra/include.am | 134 | include extra/include.am |
24 | 134 | include support-files/include.am | 135 | include support-files/include.am |
25 | 135 | 136 | ||
26 | === modified file 'drizzled/cursor.cc' | |||
27 | --- drizzled/cursor.cc 2010-04-08 16:25:53 +0000 | |||
28 | +++ drizzled/cursor.cc 2010-04-19 20:33:26 +0000 | |||
29 | @@ -90,6 +90,30 @@ | |||
30 | 90 | return NULL; | 90 | return NULL; |
31 | 91 | } | 91 | } |
32 | 92 | 92 | ||
33 | 93 | /* | ||
34 | 94 | DESCRIPTION | ||
35 | 95 | given a buffer with a key value, and a map of keyparts | ||
36 | 96 | that are present in this value, returns the length of the value | ||
37 | 97 | */ | ||
38 | 98 | uint32_t Cursor::calculate_key_len(uint32_t key_position, key_part_map keypart_map_arg) | ||
39 | 99 | { | ||
40 | 100 | /* works only with key prefixes */ | ||
41 | 101 | assert(((keypart_map_arg + 1) & keypart_map_arg) == 0); | ||
42 | 102 | |||
43 | 103 | KEY *key_info_found= table->s->key_info + key_position; | ||
44 | 104 | KEY_PART_INFO *key_part_found= key_info_found->key_part; | ||
45 | 105 | KEY_PART_INFO *end_key_part_found= key_part_found + key_info_found->key_parts; | ||
46 | 106 | uint32_t length= 0; | ||
47 | 107 | |||
48 | 108 | while (key_part_found < end_key_part_found && keypart_map_arg) | ||
49 | 109 | { | ||
50 | 110 | length+= key_part_found->store_length; | ||
51 | 111 | keypart_map_arg >>= 1; | ||
52 | 112 | key_part_found++; | ||
53 | 113 | } | ||
54 | 114 | return length; | ||
55 | 115 | } | ||
56 | 116 | |||
57 | 93 | int Cursor::ha_index_init(uint32_t idx, bool sorted) | 117 | int Cursor::ha_index_init(uint32_t idx, bool sorted) |
58 | 94 | { | 118 | { |
59 | 95 | int result; | 119 | int result; |
60 | 96 | 120 | ||
61 | === modified file 'drizzled/cursor.h' | |||
62 | --- drizzled/cursor.h 2010-04-09 11:55:54 +0000 | |||
63 | +++ drizzled/cursor.h 2010-04-19 20:33:26 +0000 | |||
64 | @@ -92,7 +92,6 @@ | |||
65 | 92 | class CostVector; | 92 | class CostVector; |
66 | 93 | } | 93 | } |
67 | 94 | 94 | ||
68 | 95 | uint32_t calculate_key_len(Table *, uint, const unsigned char *, key_part_map); | ||
69 | 96 | /* | 95 | /* |
70 | 97 | bitmap with first N+1 bits set | 96 | bitmap with first N+1 bits set |
71 | 98 | (keypart_map for a key prefix of [0..N] keyparts) | 97 | (keypart_map for a key prefix of [0..N] keyparts) |
72 | @@ -357,11 +356,11 @@ | |||
73 | 357 | row if available. If the key value is null, begin at the first key of the | 356 | row if available. If the key value is null, begin at the first key of the |
74 | 358 | index. | 357 | index. |
75 | 359 | */ | 358 | */ |
77 | 360 | virtual int index_read_map(unsigned char * buf, const unsigned char * key, | 359 | virtual int index_read_map(unsigned char * buf, const unsigned char *key, |
78 | 361 | key_part_map keypart_map, | 360 | key_part_map keypart_map, |
79 | 362 | enum ha_rkey_function find_flag) | 361 | enum ha_rkey_function find_flag) |
80 | 363 | { | 362 | { |
82 | 364 | uint32_t key_len= calculate_key_len(table, active_index, key, keypart_map); | 363 | uint32_t key_len= calculate_key_len(active_index, keypart_map); |
83 | 365 | return index_read(buf, key, key_len, find_flag); | 364 | return index_read(buf, key, key_len, find_flag); |
84 | 366 | } | 365 | } |
85 | 367 | /** | 366 | /** |
86 | @@ -383,6 +382,11 @@ | |||
87 | 383 | virtual int index_last(unsigned char *) | 382 | virtual int index_last(unsigned char *) |
88 | 384 | { return HA_ERR_WRONG_COMMAND; } | 383 | { return HA_ERR_WRONG_COMMAND; } |
89 | 385 | virtual int index_next_same(unsigned char *, const unsigned char *, uint32_t); | 384 | virtual int index_next_same(unsigned char *, const unsigned char *, uint32_t); |
90 | 385 | |||
91 | 386 | private: | ||
92 | 387 | uint32_t calculate_key_len(uint32_t key_position, key_part_map keypart_map_arg); | ||
93 | 388 | public: | ||
94 | 389 | |||
95 | 386 | /** | 390 | /** |
96 | 387 | @brief | 391 | @brief |
97 | 388 | The following functions works like index_read, but it find the last | 392 | The following functions works like index_read, but it find the last |
98 | @@ -391,7 +395,7 @@ | |||
99 | 391 | virtual int index_read_last_map(unsigned char * buf, const unsigned char * key, | 395 | virtual int index_read_last_map(unsigned char * buf, const unsigned char * key, |
100 | 392 | key_part_map keypart_map) | 396 | key_part_map keypart_map) |
101 | 393 | { | 397 | { |
103 | 394 | uint32_t key_len= calculate_key_len(table, active_index, key, keypart_map); | 398 | uint32_t key_len= calculate_key_len(active_index, keypart_map); |
104 | 395 | return index_read_last(buf, key, key_len); | 399 | return index_read_last(buf, key, key_len); |
105 | 396 | } | 400 | } |
106 | 397 | virtual int read_range_first(const key_range *start_key, | 401 | virtual int read_range_first(const key_range *start_key, |
107 | @@ -733,8 +737,7 @@ | |||
108 | 733 | 737 | ||
109 | 734 | bool mysql_rename_table(plugin::StorageEngine *base, | 738 | bool mysql_rename_table(plugin::StorageEngine *base, |
110 | 735 | TableIdentifier &old_identifier, | 739 | TableIdentifier &old_identifier, |
113 | 736 | TableIdentifier &new_identifier, | 740 | TableIdentifier &new_identifier); |
112 | 737 | uint32_t flags); | ||
114 | 738 | 741 | ||
115 | 739 | bool mysql_prepare_update(Session *session, TableList *table_list, | 742 | bool mysql_prepare_update(Session *session, TableList *table_list, |
116 | 740 | Item **conds, uint32_t order_num, order_st *order); | 743 | Item **conds, uint32_t order_num, order_st *order); |
117 | 741 | 744 | ||
118 | === modified file 'drizzled/data_home.h' | |||
119 | --- drizzled/data_home.h 2010-02-04 08:14:46 +0000 | |||
120 | +++ drizzled/data_home.h 2010-04-19 20:33:26 +0000 | |||
121 | @@ -23,9 +23,11 @@ | |||
122 | 23 | namespace drizzled | 23 | namespace drizzled |
123 | 24 | { | 24 | { |
124 | 25 | 25 | ||
128 | 26 | extern uint32_t drizzle_data_home_len; | 26 | extern char *data_home; |
129 | 27 | extern char *drizzle_data_home, | 27 | extern uint32_t data_home_len; |
130 | 28 | drizzle_real_data_home[], drizzle_unpacked_real_data_home[]; | 28 | extern char data_home_real[]; |
131 | 29 | extern char data_home_real_unpacked[]; | ||
132 | 30 | extern char data_home_buff[]; | ||
133 | 29 | 31 | ||
134 | 30 | } /* namespace drizzled */ | 32 | } /* namespace drizzled */ |
135 | 31 | 33 | ||
136 | 32 | 34 | ||
137 | === modified file 'drizzled/drizzled.cc' | |||
138 | --- drizzled/drizzled.cc 2010-04-07 15:56:28 +0000 | |||
139 | +++ drizzled/drizzled.cc 2010-04-19 20:33:26 +0000 | |||
140 | @@ -31,7 +31,6 @@ | |||
141 | 31 | #include "drizzled/internal/my_sys.h" | 31 | #include "drizzled/internal/my_sys.h" |
142 | 32 | #include "drizzled/internal/my_bit.h" | 32 | #include "drizzled/internal/my_bit.h" |
143 | 33 | #include <drizzled/my_hash.h> | 33 | #include <drizzled/my_hash.h> |
144 | 34 | #include <drizzled/stacktrace.h> | ||
145 | 35 | #include <drizzled/error.h> | 34 | #include <drizzled/error.h> |
146 | 36 | #include <drizzled/errmsg_print.h> | 35 | #include <drizzled/errmsg_print.h> |
147 | 37 | #include <drizzled/tztime.h> | 36 | #include <drizzled/tztime.h> |
148 | @@ -54,6 +53,7 @@ | |||
149 | 54 | #include "drizzled/session_list.h" | 53 | #include "drizzled/session_list.h" |
150 | 55 | #include "drizzled/charset.h" | 54 | #include "drizzled/charset.h" |
151 | 56 | #include "plugin/myisam/myisam.h" | 55 | #include "plugin/myisam/myisam.h" |
152 | 56 | #include "drizzled/drizzled.h" | ||
153 | 57 | 57 | ||
154 | 58 | #include <google/protobuf/stubs/common.h> | 58 | #include <google/protobuf/stubs/common.h> |
155 | 59 | 59 | ||
156 | @@ -73,8 +73,6 @@ | |||
157 | 73 | #endif | 73 | #endif |
158 | 74 | #include <sys/socket.h> | 74 | #include <sys/socket.h> |
159 | 75 | 75 | ||
160 | 76 | #include <locale.h> | ||
161 | 77 | |||
162 | 78 | 76 | ||
163 | 79 | #include <errno.h> | 77 | #include <errno.h> |
164 | 80 | #include <sys/stat.h> | 78 | #include <sys/stat.h> |
165 | @@ -85,8 +83,6 @@ | |||
166 | 85 | #include <pwd.h> // For getpwent | 83 | #include <pwd.h> // For getpwent |
167 | 86 | #include <grp.h> | 84 | #include <grp.h> |
168 | 87 | 85 | ||
169 | 88 | #include <sys/resource.h> | ||
170 | 89 | |||
171 | 90 | #ifdef HAVE_SELECT_H | 86 | #ifdef HAVE_SELECT_H |
172 | 91 | # include <select.h> | 87 | # include <select.h> |
173 | 92 | #endif | 88 | #endif |
174 | @@ -191,8 +187,8 @@ | |||
175 | 191 | /* | 187 | /* |
176 | 192 | Used with --help for detailed option | 188 | Used with --help for detailed option |
177 | 193 | */ | 189 | */ |
180 | 194 | static bool opt_help= false; | 190 | bool opt_help= false; |
181 | 195 | static bool opt_help_extended= false; | 191 | bool opt_help_extended= false; |
182 | 196 | 192 | ||
183 | 197 | arg_cmp_func Arg_comparator::comparator_matrix[5][2] = | 193 | arg_cmp_func Arg_comparator::comparator_matrix[5][2] = |
184 | 198 | {{&Arg_comparator::compare_string, &Arg_comparator::compare_e_string}, | 194 | {{&Arg_comparator::compare_string, &Arg_comparator::compare_e_string}, |
185 | @@ -203,12 +199,9 @@ | |||
186 | 203 | 199 | ||
187 | 204 | /* static variables */ | 200 | /* static variables */ |
188 | 205 | 201 | ||
189 | 206 | static bool volatile select_thread_in_use; | ||
190 | 207 | static bool volatile ready_to_exit; | ||
191 | 208 | static bool opt_debugging= 0; | 202 | static bool opt_debugging= 0; |
192 | 209 | static uint32_t wake_thread; | 203 | static uint32_t wake_thread; |
195 | 210 | static uint32_t killed_threads; | 204 | static char *drizzled_chroot; |
194 | 211 | static char *drizzled_user, *drizzled_chroot; | ||
196 | 212 | static char *language_ptr; | 205 | static char *language_ptr; |
197 | 213 | static const char *default_character_set_name; | 206 | static const char *default_character_set_name; |
198 | 214 | static const char *character_set_filesystem_name; | 207 | static const char *character_set_filesystem_name; |
199 | @@ -219,6 +212,9 @@ | |||
200 | 219 | 212 | ||
201 | 220 | /* Global variables */ | 213 | /* Global variables */ |
202 | 221 | 214 | ||
203 | 215 | bool volatile ready_to_exit; | ||
204 | 216 | char *drizzled_user; | ||
205 | 217 | bool volatile select_thread_in_use; | ||
206 | 222 | bool volatile abort_loop; | 218 | bool volatile abort_loop; |
207 | 223 | bool volatile shutdown_in_progress; | 219 | bool volatile shutdown_in_progress; |
208 | 224 | uint32_t max_used_connections; | 220 | uint32_t max_used_connections; |
209 | @@ -235,7 +231,7 @@ | |||
210 | 235 | 231 | ||
211 | 236 | char* opt_secure_file_priv= 0; | 232 | char* opt_secure_file_priv= 0; |
212 | 237 | 233 | ||
214 | 238 | static bool calling_initgroups= false; /**< Used in SIGSEGV handler. */ | 234 | bool calling_initgroups= false; /**< Used in SIGSEGV handler. */ |
215 | 239 | 235 | ||
216 | 240 | uint32_t drizzled_bind_timeout; | 236 | uint32_t drizzled_bind_timeout; |
217 | 241 | std::bitset<12> test_flags; | 237 | std::bitset<12> test_flags; |
218 | @@ -294,15 +290,15 @@ | |||
219 | 294 | char drizzle_home[FN_REFLEN], pidfile_name[FN_REFLEN], system_time_zone[30]; | 290 | char drizzle_home[FN_REFLEN], pidfile_name[FN_REFLEN], system_time_zone[30]; |
220 | 295 | char *default_tz_name; | 291 | char *default_tz_name; |
221 | 296 | char glob_hostname[FN_REFLEN]; | 292 | char glob_hostname[FN_REFLEN]; |
223 | 297 | char drizzle_real_data_home[FN_REFLEN], | 293 | char data_home_real[FN_REFLEN], |
224 | 298 | language[FN_REFLEN], | 294 | language[FN_REFLEN], |
225 | 299 | *opt_tc_log_file; | 295 | *opt_tc_log_file; |
227 | 300 | char drizzle_unpacked_real_data_home[FN_REFLEN]; | 296 | char data_home_real_unpacked[FN_REFLEN]; |
228 | 301 | const key_map key_map_empty(0); | 297 | const key_map key_map_empty(0); |
229 | 302 | key_map key_map_full(0); // Will be initialized later | 298 | key_map key_map_full(0); // Will be initialized later |
230 | 303 | 299 | ||
233 | 304 | uint32_t drizzle_data_home_len; | 300 | uint32_t data_home_len; |
234 | 305 | char drizzle_data_home_buff[2], *drizzle_data_home=drizzle_real_data_home; | 301 | char data_home_buff[2], *data_home=data_home_real; |
235 | 306 | char *drizzle_tmpdir= NULL; | 302 | char *drizzle_tmpdir= NULL; |
236 | 307 | char *opt_drizzle_tmpdir= NULL; | 303 | char *opt_drizzle_tmpdir= NULL; |
237 | 308 | 304 | ||
238 | @@ -347,15 +343,12 @@ | |||
239 | 347 | 343 | ||
240 | 348 | /* Static variables */ | 344 | /* Static variables */ |
241 | 349 | 345 | ||
242 | 350 | static bool segfaulted; | ||
243 | 351 | int cleanup_done; | 346 | int cleanup_done; |
244 | 352 | static char *drizzle_home_ptr, *pidfile_name_ptr; | 347 | static char *drizzle_home_ptr, *pidfile_name_ptr; |
245 | 353 | static int defaults_argc; | 348 | static int defaults_argc; |
246 | 354 | static char **defaults_argv; | 349 | static char **defaults_argv; |
247 | 355 | 350 | ||
251 | 356 | struct passwd *user_info; | 351 | passwd *user_info; |
249 | 357 | static pthread_t select_thread; | ||
250 | 358 | static uint32_t thr_kill_signal; | ||
252 | 359 | 352 | ||
253 | 360 | /** | 353 | /** |
254 | 361 | Number of currently active user connections. The variable is protected by | 354 | Number of currently active user connections. The variable is protected by |
255 | @@ -379,10 +372,8 @@ | |||
256 | 379 | static const char *get_relative_path(const char *path); | 372 | static const char *get_relative_path(const char *path); |
257 | 380 | static void fix_paths(string &progname); | 373 | static void fix_paths(string &progname); |
258 | 381 | extern "C" pthread_handler_t handle_slave(void *arg); | 374 | extern "C" pthread_handler_t handle_slave(void *arg); |
259 | 382 | static void clean_up(bool print_message); | ||
260 | 383 | 375 | ||
261 | 384 | static void usage(void); | 376 | static void usage(void); |
262 | 385 | static void clean_up_mutexes(void); | ||
263 | 386 | void close_connections(void); | 377 | void close_connections(void); |
264 | 387 | 378 | ||
265 | 388 | /**************************************************************************** | 379 | /**************************************************************************** |
266 | @@ -467,20 +458,6 @@ | |||
267 | 467 | } | 458 | } |
268 | 468 | } | 459 | } |
269 | 469 | 460 | ||
270 | 470 | extern "C" void print_signal_warning(int sig); | ||
271 | 471 | |||
272 | 472 | extern "C" void print_signal_warning(int sig) | ||
273 | 473 | { | ||
274 | 474 | if (global_system_variables.log_warnings) | ||
275 | 475 | errmsg_printf(ERRMSG_LVL_WARN, _("Got signal %d from thread %"PRIu64), | ||
276 | 476 | sig, global_thread_id); | ||
277 | 477 | #ifndef HAVE_BSD_SIGNALS | ||
278 | 478 | my_sigset(sig,print_signal_warning); /* int. thread system calls */ | ||
279 | 479 | #endif | ||
280 | 480 | if (sig == SIGALRM) | ||
281 | 481 | alarm(2); /* reschedule alarm */ | ||
282 | 482 | } | ||
283 | 483 | |||
284 | 484 | /** | 461 | /** |
285 | 485 | cleanup all memory and end program nicely. | 462 | cleanup all memory and end program nicely. |
286 | 486 | 463 | ||
287 | @@ -517,7 +494,7 @@ | |||
288 | 517 | } | 494 | } |
289 | 518 | 495 | ||
290 | 519 | 496 | ||
292 | 520 | static void clean_up(bool print_message) | 497 | void clean_up(bool print_message) |
293 | 521 | { | 498 | { |
294 | 522 | if (cleanup_done++) | 499 | if (cleanup_done++) |
295 | 523 | return; | 500 | return; |
296 | @@ -559,7 +536,7 @@ | |||
297 | 559 | } /* clean_up */ | 536 | } /* clean_up */ |
298 | 560 | 537 | ||
299 | 561 | 538 | ||
301 | 562 | static void clean_up_mutexes() | 539 | void clean_up_mutexes() |
302 | 563 | { | 540 | { |
303 | 564 | (void) pthread_mutex_destroy(&LOCK_create_db); | 541 | (void) pthread_mutex_destroy(&LOCK_create_db); |
304 | 565 | (void) pthread_mutex_destroy(&LOCK_open); | 542 | (void) pthread_mutex_destroy(&LOCK_open); |
305 | @@ -577,9 +554,9 @@ | |||
306 | 577 | 554 | ||
307 | 578 | /* Change to run as another user if started with --user */ | 555 | /* Change to run as another user if started with --user */ |
308 | 579 | 556 | ||
310 | 580 | static struct passwd *check_user(const char *user) | 557 | passwd *check_user(const char *user) |
311 | 581 | { | 558 | { |
313 | 582 | struct passwd *tmp_user_info; | 559 | passwd *tmp_user_info; |
314 | 583 | uid_t user_id= geteuid(); | 560 | uid_t user_id= geteuid(); |
315 | 584 | 561 | ||
316 | 585 | // Don't bother if we aren't superuser | 562 | // Don't bother if we aren't superuser |
317 | @@ -637,7 +614,7 @@ | |||
318 | 637 | 614 | ||
319 | 638 | } | 615 | } |
320 | 639 | 616 | ||
322 | 640 | static void set_user(const char *user, struct passwd *user_info_arg) | 617 | void set_user(const char *user, passwd *user_info_arg) |
323 | 641 | { | 618 | { |
324 | 642 | assert(user_info_arg != 0); | 619 | assert(user_info_arg != 0); |
325 | 643 | /* | 620 | /* |
326 | @@ -662,6 +639,7 @@ | |||
327 | 662 | } | 639 | } |
328 | 663 | 640 | ||
329 | 664 | 641 | ||
330 | 642 | |||
331 | 665 | /** Change root user if started with @c --chroot . */ | 643 | /** Change root user if started with @c --chroot . */ |
332 | 666 | static void set_root(const char *path) | 644 | static void set_root(const char *path) |
333 | 667 | { | 645 | { |
334 | @@ -672,21 +650,6 @@ | |||
335 | 672 | } | 650 | } |
336 | 673 | } | 651 | } |
337 | 674 | 652 | ||
338 | 675 | extern "C" void end_thread_signal(int ); | ||
339 | 676 | |||
340 | 677 | /** Called when a thread is aborted. */ | ||
341 | 678 | extern "C" void end_thread_signal(int ) | ||
342 | 679 | { | ||
343 | 680 | Session *session=current_session; | ||
344 | 681 | if (session) | ||
345 | 682 | { | ||
346 | 683 | statistic_increment(killed_threads, &LOCK_status); | ||
347 | 684 | session->scheduler->killSessionNow(session); | ||
348 | 685 | DRIZZLE_CONNECTION_DONE(session->thread_id); | ||
349 | 686 | } | ||
350 | 687 | return; | ||
351 | 688 | } | ||
352 | 689 | |||
353 | 690 | 653 | ||
354 | 691 | /* | 654 | /* |
355 | 692 | Unlink session from global list of available connections and free session | 655 | Unlink session from global list of available connections and free session |
356 | @@ -734,148 +697,6 @@ | |||
357 | 734 | } | 697 | } |
358 | 735 | #endif | 698 | #endif |
359 | 736 | 699 | ||
360 | 737 | #if defined(BACKTRACE_DEMANGLE) | ||
361 | 738 | #include <cxxabi.h> | ||
362 | 739 | extern "C" char *my_demangle(const char *mangled_name, int *status) | ||
363 | 740 | { | ||
364 | 741 | return abi::__cxa_demangle(mangled_name, NULL, NULL, status); | ||
365 | 742 | } | ||
366 | 743 | #endif | ||
367 | 744 | |||
368 | 745 | extern "C" void handle_segfault(int sig); | ||
369 | 746 | |||
370 | 747 | extern "C" void handle_segfault(int sig) | ||
371 | 748 | { | ||
372 | 749 | time_t curr_time; | ||
373 | 750 | struct tm tm; | ||
374 | 751 | |||
375 | 752 | /* | ||
376 | 753 | Strictly speaking, one needs a mutex here | ||
377 | 754 | but since we have got SIGSEGV already, things are a mess | ||
378 | 755 | so not having the mutex is not as bad as possibly using a buggy | ||
379 | 756 | mutex - so we keep things simple | ||
380 | 757 | */ | ||
381 | 758 | if (segfaulted) | ||
382 | 759 | { | ||
383 | 760 | fprintf(stderr, _("Fatal signal %d while backtracing\n"), sig); | ||
384 | 761 | exit(1); | ||
385 | 762 | } | ||
386 | 763 | |||
387 | 764 | segfaulted = 1; | ||
388 | 765 | |||
389 | 766 | curr_time= time(NULL); | ||
390 | 767 | if(curr_time == (time_t)-1) | ||
391 | 768 | { | ||
392 | 769 | fprintf(stderr, "Fetal: time() call failed\n"); | ||
393 | 770 | exit(1); | ||
394 | 771 | } | ||
395 | 772 | |||
396 | 773 | localtime_r(&curr_time, &tm); | ||
397 | 774 | |||
398 | 775 | fprintf(stderr,"%02d%02d%02d %2d:%02d:%02d - drizzled got signal %d;\n" | ||
399 | 776 | "This could be because you hit a bug. It is also possible that " | ||
400 | 777 | "this binary\n or one of the libraries it was linked against is " | ||
401 | 778 | "corrupt, improperly built,\n or misconfigured. This error can " | ||
402 | 779 | "also be caused by malfunctioning hardware.\n", | ||
403 | 780 | tm.tm_year % 100, tm.tm_mon+1, tm.tm_mday, | ||
404 | 781 | tm.tm_hour, tm.tm_min, tm.tm_sec, | ||
405 | 782 | sig); | ||
406 | 783 | fprintf(stderr, _("We will try our best to scrape up some info that " | ||
407 | 784 | "will hopefully help diagnose\n" | ||
408 | 785 | "the problem, but since we have already crashed, " | ||
409 | 786 | "something is definitely wrong\nand this may fail.\n\n")); | ||
410 | 787 | fprintf(stderr, "key_buffer_size=%u\n", | ||
411 | 788 | (uint32_t) dflt_key_cache->key_cache_mem_size); | ||
412 | 789 | fprintf(stderr, "read_buffer_size=%ld\n", (long) global_system_variables.read_buff_size); | ||
413 | 790 | fprintf(stderr, "max_used_connections=%u\n", max_used_connections); | ||
414 | 791 | fprintf(stderr, "connection_count=%u\n", uint32_t(connection_count)); | ||
415 | 792 | fprintf(stderr, _("It is possible that drizzled could use up to \n" | ||
416 | 793 | "key_buffer_size + (read_buffer_size + " | ||
417 | 794 | "sort_buffer_size)*thread_count\n" | ||
418 | 795 | "bytes of memory\n" | ||
419 | 796 | "Hope that's ok; if not, decrease some variables in the " | ||
420 | 797 | "equation.\n\n")); | ||
421 | 798 | |||
422 | 799 | #ifdef HAVE_STACKTRACE | ||
423 | 800 | Session *session= current_session; | ||
424 | 801 | |||
425 | 802 | if (! (test_flags.test(TEST_NO_STACKTRACE))) | ||
426 | 803 | { | ||
427 | 804 | fprintf(stderr,"session: 0x%lx\n",(long) session); | ||
428 | 805 | fprintf(stderr,_("Attempting backtrace. You can use the following " | ||
429 | 806 | "information to find out\n" | ||
430 | 807 | "where drizzled died. If you see no messages after this, " | ||
431 | 808 | "something went\n" | ||
432 | 809 | "terribly wrong...\n")); | ||
433 | 810 | print_stacktrace(session ? (unsigned char*) session->thread_stack : (unsigned char*) 0, | ||
434 | 811 | my_thread_stack_size); | ||
435 | 812 | } | ||
436 | 813 | if (session) | ||
437 | 814 | { | ||
438 | 815 | const char *kreason= "UNKNOWN"; | ||
439 | 816 | switch (session->killed) { | ||
440 | 817 | case Session::NOT_KILLED: | ||
441 | 818 | kreason= "NOT_KILLED"; | ||
442 | 819 | break; | ||
443 | 820 | case Session::KILL_BAD_DATA: | ||
444 | 821 | kreason= "KILL_BAD_DATA"; | ||
445 | 822 | break; | ||
446 | 823 | case Session::KILL_CONNECTION: | ||
447 | 824 | kreason= "KILL_CONNECTION"; | ||
448 | 825 | break; | ||
449 | 826 | case Session::KILL_QUERY: | ||
450 | 827 | kreason= "KILL_QUERY"; | ||
451 | 828 | break; | ||
452 | 829 | case Session::KILLED_NO_VALUE: | ||
453 | 830 | kreason= "KILLED_NO_VALUE"; | ||
454 | 831 | break; | ||
455 | 832 | } | ||
456 | 833 | fprintf(stderr, _("Trying to get some variables.\n" | ||
457 | 834 | "Some pointers may be invalid and cause the " | ||
458 | 835 | "dump to abort...\n")); | ||
459 | 836 | safe_print_str("session->query", session->query.c_str(), 1024); | ||
460 | 837 | fprintf(stderr, "session->thread_id=%"PRIu32"\n", (uint32_t) session->thread_id); | ||
461 | 838 | fprintf(stderr, "session->killed=%s\n", kreason); | ||
462 | 839 | } | ||
463 | 840 | fflush(stderr); | ||
464 | 841 | #endif /* HAVE_STACKTRACE */ | ||
465 | 842 | |||
466 | 843 | if (calling_initgroups) | ||
467 | 844 | fprintf(stderr, _("\nThis crash occurred while the server was calling " | ||
468 | 845 | "initgroups(). This is\n" | ||
469 | 846 | "often due to the use of a drizzled that is statically " | ||
470 | 847 | "linked against glibc\n" | ||
471 | 848 | "and configured to use LDAP in /etc/nsswitch.conf. " | ||
472 | 849 | "You will need to either\n" | ||
473 | 850 | "upgrade to a version of glibc that does not have this " | ||
474 | 851 | "problem (2.3.4 or\n" | ||
475 | 852 | "later when used with nscd), disable LDAP in your " | ||
476 | 853 | "nsswitch.conf, or use a\n" | ||
477 | 854 | "drizzled that is not statically linked.\n")); | ||
478 | 855 | |||
479 | 856 | if (internal::thd_lib_detected == THD_LIB_LT && !getenv("LD_ASSUME_KERNEL")) | ||
480 | 857 | fprintf(stderr, | ||
481 | 858 | _("\nYou are running a statically-linked LinuxThreads binary " | ||
482 | 859 | "on an NPTL system.\n" | ||
483 | 860 | "This can result in crashes on some distributions due " | ||
484 | 861 | "to LT/NPTL conflicts.\n" | ||
485 | 862 | "You should either build a dynamically-linked binary, or force " | ||
486 | 863 | "LinuxThreads\n" | ||
487 | 864 | "to be used with the LD_ASSUME_KERNEL environment variable. " | ||
488 | 865 | "Please consult\n" | ||
489 | 866 | "the documentation for your distribution on how to do that.\n")); | ||
490 | 867 | |||
491 | 868 | #ifdef HAVE_WRITE_CORE | ||
492 | 869 | if (test_flags.test(TEST_CORE_ON_SIGNAL)) | ||
493 | 870 | { | ||
494 | 871 | fprintf(stderr, _("Writing a core file\n")); | ||
495 | 872 | fflush(stderr); | ||
496 | 873 | write_core(sig); | ||
497 | 874 | } | ||
498 | 875 | #endif | ||
499 | 876 | |||
500 | 877 | exit(1); | ||
501 | 878 | } | ||
502 | 879 | 700 | ||
503 | 880 | #ifndef SA_RESETHAND | 701 | #ifndef SA_RESETHAND |
504 | 881 | #define SA_RESETHAND 0 | 702 | #define SA_RESETHAND 0 |
505 | @@ -885,65 +706,12 @@ | |||
506 | 885 | #endif | 706 | #endif |
507 | 886 | 707 | ||
508 | 887 | 708 | ||
514 | 888 | /** | 709 | |
515 | 889 | All global error messages are sent here where the first one is stored | 710 | |
516 | 890 | for the client. | 711 | const char *load_default_groups[]= |
512 | 891 | */ | ||
513 | 892 | static void my_message_sql(uint32_t error, const char *str, myf MyFlags) | ||
517 | 893 | { | 712 | { |
571 | 894 | Session *session; | 713 | DRIZZLE_CONFIG_NAME, "server", 0, 0 |
572 | 895 | /* | 714 | }; |
520 | 896 | Put here following assertion when situation with EE_* error codes | ||
521 | 897 | will be fixed | ||
522 | 898 | */ | ||
523 | 899 | if ((session= current_session)) | ||
524 | 900 | { | ||
525 | 901 | if (MyFlags & ME_FATALERROR) | ||
526 | 902 | session->is_fatal_error= 1; | ||
527 | 903 | |||
528 | 904 | /* | ||
529 | 905 | TODO: There are two exceptions mechanism (Session and sp_rcontext), | ||
530 | 906 | this could be improved by having a common stack of handlers. | ||
531 | 907 | */ | ||
532 | 908 | if (session->handle_error(error, str, | ||
533 | 909 | DRIZZLE_ERROR::WARN_LEVEL_ERROR)) | ||
534 | 910 | return;; | ||
535 | 911 | |||
536 | 912 | /* | ||
537 | 913 | session->lex->current_select == 0 if lex structure is not inited | ||
538 | 914 | (not query command (COM_QUERY)) | ||
539 | 915 | */ | ||
540 | 916 | if (! (session->lex->current_select && | ||
541 | 917 | session->lex->current_select->no_error && !session->is_fatal_error)) | ||
542 | 918 | { | ||
543 | 919 | if (! session->main_da.is_error()) // Return only first message | ||
544 | 920 | { | ||
545 | 921 | if (error == 0) | ||
546 | 922 | error= ER_UNKNOWN_ERROR; | ||
547 | 923 | if (str == NULL) | ||
548 | 924 | str= ER(error); | ||
549 | 925 | session->main_da.set_error_status(error, str); | ||
550 | 926 | } | ||
551 | 927 | } | ||
552 | 928 | |||
553 | 929 | if (!session->no_warnings_for_error && !session->is_fatal_error) | ||
554 | 930 | { | ||
555 | 931 | /* | ||
556 | 932 | Suppress infinite recursion if there a memory allocation error | ||
557 | 933 | inside push_warning. | ||
558 | 934 | */ | ||
559 | 935 | session->no_warnings_for_error= true; | ||
560 | 936 | push_warning(session, DRIZZLE_ERROR::WARN_LEVEL_ERROR, error, str); | ||
561 | 937 | session->no_warnings_for_error= false; | ||
562 | 938 | } | ||
563 | 939 | } | ||
564 | 940 | if (!session || MyFlags & ME_NOREFRESH) | ||
565 | 941 | errmsg_printf(ERRMSG_LVL_ERROR, "%s: %s",internal::my_progname,str); | ||
566 | 942 | } | ||
567 | 943 | |||
568 | 944 | |||
569 | 945 | static const char *load_default_groups[]= { | ||
570 | 946 | DRIZZLE_CONFIG_NAME, "server", 0, 0}; | ||
573 | 947 | 715 | ||
574 | 948 | static int show_starttime(drizzle_show_var *var, char *buff) | 716 | static int show_starttime(drizzle_show_var *var, char *buff) |
575 | 949 | { | 717 | { |
576 | @@ -1061,8 +829,8 @@ | |||
577 | 1061 | {NULL, NULL, SHOW_LONGLONG} | 829 | {NULL, NULL, SHOW_LONGLONG} |
578 | 1062 | }; | 830 | }; |
579 | 1063 | 831 | ||
582 | 1064 | static int init_common_variables(const char *conf_file_name, int argc, | 832 | int init_common_variables(const char *conf_file_name, int argc, |
583 | 1065 | char **argv, const char **groups) | 833 | char **argv, const char **groups) |
584 | 1066 | { | 834 | { |
585 | 1067 | time_t curr_time; | 835 | time_t curr_time; |
586 | 1068 | umask(((~internal::my_umask) & 0666)); | 836 | umask(((~internal::my_umask) & 0666)); |
587 | @@ -1211,7 +979,7 @@ | |||
588 | 1211 | } | 979 | } |
589 | 1212 | 980 | ||
590 | 1213 | 981 | ||
592 | 1214 | static int init_server_components(plugin::Registry &plugins) | 982 | int init_server_components(plugin::Registry &plugins) |
593 | 1215 | { | 983 | { |
594 | 1216 | /* | 984 | /* |
595 | 1217 | We need to call each of these following functions to ensure that | 985 | We need to call each of these following functions to ensure that |
596 | @@ -1446,8 +1214,8 @@ | |||
597 | 1446 | NO_ARG, 0, 0, 0, 0, 0, 0}, | 1214 | NO_ARG, 0, 0, 0, 0, 0, 0}, |
598 | 1447 | {"datadir", 'h', | 1215 | {"datadir", 'h', |
599 | 1448 | N_("Path to the database root."), | 1216 | N_("Path to the database root."), |
602 | 1449 | (char**) &drizzle_data_home, | 1217 | (char**) &data_home, |
603 | 1450 | (char**) &drizzle_data_home, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, | 1218 | (char**) &data_home, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, |
604 | 1451 | {"default-storage-engine", OPT_STORAGE_ENGINE, | 1219 | {"default-storage-engine", OPT_STORAGE_ENGINE, |
605 | 1452 | N_("Set the default storage engine (table type) for tables."), | 1220 | N_("Set the default storage engine (table type) for tables."), |
606 | 1453 | (char**)&default_storage_engine_str, (char**)&default_storage_engine_str, | 1221 | (char**)&default_storage_engine_str, (char**)&default_storage_engine_str, |
607 | @@ -1793,7 +1561,6 @@ | |||
608 | 1793 | drizzle_home[0]= pidfile_name[0]= 0; | 1561 | drizzle_home[0]= pidfile_name[0]= 0; |
609 | 1794 | opt_tc_log_file= (char *)"tc.log"; // no hostname in tc_log file name ! | 1562 | opt_tc_log_file= (char *)"tc.log"; // no hostname in tc_log file name ! |
610 | 1795 | opt_secure_file_priv= 0; | 1563 | opt_secure_file_priv= 0; |
611 | 1796 | segfaulted= 0; | ||
612 | 1797 | cleanup_done= 0; | 1564 | cleanup_done= 0; |
613 | 1798 | defaults_argc= 0; | 1565 | defaults_argc= 0; |
614 | 1799 | defaults_argv= 0; | 1566 | defaults_argv= 0; |
615 | @@ -1818,7 +1585,7 @@ | |||
616 | 1818 | drizzle_home_ptr= drizzle_home; | 1585 | drizzle_home_ptr= drizzle_home; |
617 | 1819 | pidfile_name_ptr= pidfile_name; | 1586 | pidfile_name_ptr= pidfile_name; |
618 | 1820 | language_ptr= language; | 1587 | language_ptr= language; |
620 | 1821 | drizzle_data_home= drizzle_real_data_home; | 1588 | data_home= data_home_real; |
621 | 1822 | session_startup_options= (OPTION_AUTO_IS_NULL | OPTION_SQL_NOTES); | 1589 | session_startup_options= (OPTION_AUTO_IS_NULL | OPTION_SQL_NOTES); |
622 | 1823 | refresh_version= 1L; /* Increments on each reload */ | 1590 | refresh_version= 1L; /* Increments on each reload */ |
623 | 1824 | global_thread_id= 1UL; | 1591 | global_thread_id= 1UL; |
624 | @@ -1826,11 +1593,11 @@ | |||
625 | 1826 | 1593 | ||
626 | 1827 | /* Set directory paths */ | 1594 | /* Set directory paths */ |
627 | 1828 | strncpy(language, LANGUAGE, sizeof(language)-1); | 1595 | strncpy(language, LANGUAGE, sizeof(language)-1); |
633 | 1829 | strncpy(drizzle_real_data_home, get_relative_path(LOCALSTATEDIR), | 1596 | strncpy(data_home_real, get_relative_path(LOCALSTATEDIR), |
634 | 1830 | sizeof(drizzle_real_data_home)-1); | 1597 | sizeof(data_home_real)-1); |
635 | 1831 | drizzle_data_home_buff[0]=FN_CURLIB; // all paths are relative from here | 1598 | data_home_buff[0]=FN_CURLIB; // all paths are relative from here |
636 | 1832 | drizzle_data_home_buff[1]=0; | 1599 | data_home_buff[1]=0; |
637 | 1833 | drizzle_data_home_len= 2; | 1600 | data_home_len= 2; |
638 | 1834 | 1601 | ||
639 | 1835 | /* Variables in libraries */ | 1602 | /* Variables in libraries */ |
640 | 1836 | default_character_set_name= "utf8"; | 1603 | default_character_set_name= "utf8"; |
641 | @@ -1877,10 +1644,10 @@ | |||
642 | 1877 | default_collation_name= 0; | 1644 | default_collation_name= 0; |
643 | 1878 | break; | 1645 | break; |
644 | 1879 | case 'h': | 1646 | case 'h': |
646 | 1880 | strncpy(drizzle_real_data_home,argument, sizeof(drizzle_real_data_home)-1); | 1647 | strncpy(data_home_real,argument, sizeof(data_home_real)-1); |
647 | 1881 | /* Correct pointer set by my_getopt (for embedded library) */ | 1648 | /* Correct pointer set by my_getopt (for embedded library) */ |
650 | 1882 | drizzle_data_home= drizzle_real_data_home; | 1649 | data_home= data_home_real; |
651 | 1883 | drizzle_data_home_len= strlen(drizzle_data_home); | 1650 | data_home_len= strlen(data_home); |
652 | 1884 | break; | 1651 | break; |
653 | 1885 | case 'u': | 1652 | case 'u': |
654 | 1886 | if (!drizzled_user || !strcmp(drizzled_user, argument)) | 1653 | if (!drizzled_user || !strcmp(drizzled_user, argument)) |
655 | @@ -2065,14 +1832,14 @@ | |||
656 | 2065 | pos[0]= FN_LIBCHAR; | 1832 | pos[0]= FN_LIBCHAR; |
657 | 2066 | pos[1]= 0; | 1833 | pos[1]= 0; |
658 | 2067 | } | 1834 | } |
661 | 2068 | internal::convert_dirname(drizzle_real_data_home,drizzle_real_data_home,NULL); | 1835 | internal::convert_dirname(data_home_real,data_home_real,NULL); |
662 | 2069 | (void) internal::fn_format(buff, drizzle_real_data_home, "", "", | 1836 | (void) internal::fn_format(buff, data_home_real, "", "", |
663 | 2070 | (MY_RETURN_REAL_PATH|MY_RESOLVE_SYMLINKS)); | 1837 | (MY_RETURN_REAL_PATH|MY_RESOLVE_SYMLINKS)); |
665 | 2071 | (void) internal::unpack_dirname(drizzle_unpacked_real_data_home, buff); | 1838 | (void) internal::unpack_dirname(data_home_real_unpacked, buff); |
666 | 2072 | internal::convert_dirname(language,language,NULL); | 1839 | internal::convert_dirname(language,language,NULL); |
667 | 2073 | (void) internal::my_load_path(drizzle_home, drizzle_home,""); // Resolve current dir | 1840 | (void) internal::my_load_path(drizzle_home, drizzle_home,""); // Resolve current dir |
670 | 2074 | (void) internal::my_load_path(drizzle_real_data_home, drizzle_real_data_home,drizzle_home); | 1841 | (void) internal::my_load_path(data_home_real, data_home_real,drizzle_home); |
671 | 2075 | (void) internal::my_load_path(pidfile_name, pidfile_name,drizzle_real_data_home); | 1842 | (void) internal::my_load_path(pidfile_name, pidfile_name,data_home_real); |
672 | 2076 | 1843 | ||
673 | 2077 | if (opt_plugin_dir_ptr == NULL) | 1844 | if (opt_plugin_dir_ptr == NULL) |
674 | 2078 | { | 1845 | { |
675 | @@ -2100,11 +1867,11 @@ | |||
676 | 2100 | progdir.assign(progdir.substr(0, progdir.rfind(".libs/"))); | 1867 | progdir.assign(progdir.substr(0, progdir.rfind(".libs/"))); |
677 | 2101 | } | 1868 | } |
678 | 2102 | string testfile(progdir); | 1869 | string testfile(progdir); |
680 | 2103 | testfile.append("drizzled.o"); | 1870 | testfile.append("drizzled.lo"); |
681 | 2104 | struct stat testfile_stat; | 1871 | struct stat testfile_stat; |
682 | 2105 | if (stat(testfile.c_str(), &testfile_stat)) | 1872 | if (stat(testfile.c_str(), &testfile_stat)) |
683 | 2106 | { | 1873 | { |
685 | 2107 | /* drizzled.o doesn't exist - we are not in a source dir. | 1874 | /* drizzled.lo doesn't exist - we are not in a source dir. |
686 | 2108 | * Go on as usual | 1875 | * Go on as usual |
687 | 2109 | */ | 1876 | */ |
688 | 2110 | (void) internal::my_load_path(opt_plugin_dir, get_relative_path(PKGPLUGINDIR), | 1877 | (void) internal::my_load_path(opt_plugin_dir, get_relative_path(PKGPLUGINDIR), |
689 | @@ -2173,209 +1940,3 @@ | |||
690 | 2173 | 1940 | ||
691 | 2174 | } /* namespace drizzled */ | 1941 | } /* namespace drizzled */ |
692 | 2175 | 1942 | ||
693 | 2176 | using namespace drizzled; | ||
694 | 2177 | |||
695 | 2178 | |||
696 | 2179 | static void init_signals(void) | ||
697 | 2180 | { | ||
698 | 2181 | sigset_t set; | ||
699 | 2182 | struct sigaction sa; | ||
700 | 2183 | |||
701 | 2184 | if (!(test_flags.test(TEST_NO_STACKTRACE) || | ||
702 | 2185 | test_flags.test(TEST_CORE_ON_SIGNAL))) | ||
703 | 2186 | { | ||
704 | 2187 | sa.sa_flags = SA_RESETHAND | SA_NODEFER; | ||
705 | 2188 | sigemptyset(&sa.sa_mask); | ||
706 | 2189 | sigprocmask(SIG_SETMASK,&sa.sa_mask,NULL); | ||
707 | 2190 | |||
708 | 2191 | init_stacktrace(); | ||
709 | 2192 | sa.sa_handler=handle_segfault; | ||
710 | 2193 | sigaction(SIGSEGV, &sa, NULL); | ||
711 | 2194 | sigaction(SIGABRT, &sa, NULL); | ||
712 | 2195 | #ifdef SIGBUS | ||
713 | 2196 | sigaction(SIGBUS, &sa, NULL); | ||
714 | 2197 | #endif | ||
715 | 2198 | sigaction(SIGILL, &sa, NULL); | ||
716 | 2199 | sigaction(SIGFPE, &sa, NULL); | ||
717 | 2200 | } | ||
718 | 2201 | |||
719 | 2202 | if (test_flags.test(TEST_CORE_ON_SIGNAL)) | ||
720 | 2203 | { | ||
721 | 2204 | /* Change limits so that we will get a core file */ | ||
722 | 2205 | struct rlimit rl; | ||
723 | 2206 | rl.rlim_cur = rl.rlim_max = RLIM_INFINITY; | ||
724 | 2207 | if (setrlimit(RLIMIT_CORE, &rl) && global_system_variables.log_warnings) | ||
725 | 2208 | errmsg_printf(ERRMSG_LVL_WARN, | ||
726 | 2209 | _("setrlimit could not change the size of core files " | ||
727 | 2210 | "to 'infinity'; We may not be able to generate a " | ||
728 | 2211 | "core file on signals")); | ||
729 | 2212 | } | ||
730 | 2213 | (void) sigemptyset(&set); | ||
731 | 2214 | my_sigset(SIGPIPE,SIG_IGN); | ||
732 | 2215 | sigaddset(&set,SIGPIPE); | ||
733 | 2216 | #ifndef IGNORE_SIGHUP_SIGQUIT | ||
734 | 2217 | sigaddset(&set,SIGQUIT); | ||
735 | 2218 | sigaddset(&set,SIGHUP); | ||
736 | 2219 | #endif | ||
737 | 2220 | sigaddset(&set,SIGTERM); | ||
738 | 2221 | |||
739 | 2222 | /* Fix signals if blocked by parents (can happen on Mac OS X) */ | ||
740 | 2223 | sigemptyset(&sa.sa_mask); | ||
741 | 2224 | sa.sa_flags = 0; | ||
742 | 2225 | sa.sa_handler = print_signal_warning; | ||
743 | 2226 | sigaction(SIGTERM, &sa, (struct sigaction*) 0); | ||
744 | 2227 | sa.sa_flags = 0; | ||
745 | 2228 | sa.sa_handler = print_signal_warning; | ||
746 | 2229 | sigaction(SIGHUP, &sa, (struct sigaction*) 0); | ||
747 | 2230 | #ifdef SIGTSTP | ||
748 | 2231 | sigaddset(&set,SIGTSTP); | ||
749 | 2232 | #endif | ||
750 | 2233 | if (test_flags.test(TEST_SIGINT)) | ||
751 | 2234 | { | ||
752 | 2235 | my_sigset(thr_kill_signal, end_thread_signal); | ||
753 | 2236 | // May be SIGINT | ||
754 | 2237 | sigdelset(&set, thr_kill_signal); | ||
755 | 2238 | } | ||
756 | 2239 | else | ||
757 | 2240 | sigaddset(&set,SIGINT); | ||
758 | 2241 | sigprocmask(SIG_SETMASK,&set,NULL); | ||
759 | 2242 | pthread_sigmask(SIG_SETMASK,&set,NULL); | ||
760 | 2243 | return;; | ||
761 | 2244 | } | ||
762 | 2245 | |||
763 | 2246 | int main(int argc, char **argv) | ||
764 | 2247 | { | ||
765 | 2248 | #if defined(ENABLE_NLS) | ||
766 | 2249 | # if defined(HAVE_LOCALE_H) | ||
767 | 2250 | setlocale(LC_ALL, ""); | ||
768 | 2251 | # endif | ||
769 | 2252 | bindtextdomain("drizzle", LOCALEDIR); | ||
770 | 2253 | textdomain("drizzle"); | ||
771 | 2254 | #endif | ||
772 | 2255 | |||
773 | 2256 | plugin::Registry &plugins= plugin::Registry::singleton(); | ||
774 | 2257 | plugin::Client *client; | ||
775 | 2258 | Session *session; | ||
776 | 2259 | |||
777 | 2260 | MY_INIT(argv[0]); // init my_sys library & pthreads | ||
778 | 2261 | /* nothing should come before this line ^^^ */ | ||
779 | 2262 | |||
780 | 2263 | /* Set signal used to kill Drizzle */ | ||
781 | 2264 | #if defined(SIGUSR2) | ||
782 | 2265 | thr_kill_signal= internal::thd_lib_detected == THD_LIB_LT ? SIGINT : SIGUSR2; | ||
783 | 2266 | #else | ||
784 | 2267 | thr_kill_signal= SIGINT; | ||
785 | 2268 | #endif | ||
786 | 2269 | |||
787 | 2270 | if (init_common_variables(DRIZZLE_CONFIG_NAME, | ||
788 | 2271 | argc, argv, load_default_groups)) | ||
789 | 2272 | unireg_abort(1); // Will do exit | ||
790 | 2273 | |||
791 | 2274 | init_signals(); | ||
792 | 2275 | |||
793 | 2276 | |||
794 | 2277 | select_thread=pthread_self(); | ||
795 | 2278 | select_thread_in_use=1; | ||
796 | 2279 | |||
797 | 2280 | if (chdir(drizzle_real_data_home) && !opt_help) | ||
798 | 2281 | { | ||
799 | 2282 | errmsg_printf(ERRMSG_LVL_ERROR, _("Data directory %s does not exist\n"), drizzle_real_data_home); | ||
800 | 2283 | unireg_abort(1); | ||
801 | 2284 | } | ||
802 | 2285 | drizzle_data_home= drizzle_data_home_buff; | ||
803 | 2286 | drizzle_data_home[0]=FN_CURLIB; // all paths are relative from here | ||
804 | 2287 | drizzle_data_home[1]=0; | ||
805 | 2288 | drizzle_data_home_len= 2; | ||
806 | 2289 | |||
807 | 2290 | if ((user_info= check_user(drizzled_user))) | ||
808 | 2291 | { | ||
809 | 2292 | set_user(drizzled_user, user_info); | ||
810 | 2293 | } | ||
811 | 2294 | |||
812 | 2295 | if (server_id == 0) | ||
813 | 2296 | { | ||
814 | 2297 | server_id= 1; | ||
815 | 2298 | } | ||
816 | 2299 | |||
817 | 2300 | if (init_server_components(plugins)) | ||
818 | 2301 | unireg_abort(1); | ||
819 | 2302 | |||
820 | 2303 | /** | ||
821 | 2304 | * This check must be done after init_server_components for now | ||
822 | 2305 | * because we don't yet have plugin dependency tracking... | ||
823 | 2306 | * | ||
824 | 2307 | * ReplicationServices::evaluateRegisteredPlugins() will print error messages to stderr | ||
825 | 2308 | * via errmsg_printf(). | ||
826 | 2309 | * | ||
827 | 2310 | * @todo | ||
828 | 2311 | * | ||
829 | 2312 | * not checking return since unireg_abort() hangs | ||
830 | 2313 | */ | ||
831 | 2314 | ReplicationServices &replication_services= ReplicationServices::singleton(); | ||
832 | 2315 | (void) replication_services.evaluateRegisteredPlugins(); | ||
833 | 2316 | |||
834 | 2317 | if (plugin::Listen::setup()) | ||
835 | 2318 | unireg_abort(1); | ||
836 | 2319 | |||
837 | 2320 | /* | ||
838 | 2321 | init signals & alarm | ||
839 | 2322 | After this we can't quit by a simple unireg_abort | ||
840 | 2323 | */ | ||
841 | 2324 | error_handler_hook= my_message_sql; | ||
842 | 2325 | |||
843 | 2326 | assert(plugin::num_trx_monitored_objects > 0); | ||
844 | 2327 | if (drizzle_rm_tmp_tables() || | ||
845 | 2328 | my_tz_init((Session *)0, default_tz_name)) | ||
846 | 2329 | { | ||
847 | 2330 | abort_loop= true; | ||
848 | 2331 | select_thread_in_use=0; | ||
849 | 2332 | (void) pthread_kill(signal_thread, SIGTERM); | ||
850 | 2333 | |||
851 | 2334 | (void) unlink(pidfile_name); // Not needed anymore | ||
852 | 2335 | |||
853 | 2336 | exit(1); | ||
854 | 2337 | } | ||
855 | 2338 | |||
856 | 2339 | init_status_vars(); | ||
857 | 2340 | |||
858 | 2341 | errmsg_printf(ERRMSG_LVL_INFO, _(ER(ER_STARTUP)), internal::my_progname, | ||
859 | 2342 | PANDORA_RELEASE_VERSION, COMPILATION_COMMENT); | ||
860 | 2343 | |||
861 | 2344 | |||
862 | 2345 | /* Listen for new connections and start new session for each connection | ||
863 | 2346 | accepted. The listen.getClient() method will return NULL when the server | ||
864 | 2347 | should be shutdown. */ | ||
865 | 2348 | while ((client= plugin::Listen::getClient()) != NULL) | ||
866 | 2349 | { | ||
867 | 2350 | if (!(session= new Session(client))) | ||
868 | 2351 | { | ||
869 | 2352 | delete client; | ||
870 | 2353 | continue; | ||
871 | 2354 | } | ||
872 | 2355 | |||
873 | 2356 | /* If we error on creation we drop the connection and delete the session. */ | ||
874 | 2357 | if (session->schedule()) | ||
875 | 2358 | Session::unlink(session); | ||
876 | 2359 | } | ||
877 | 2360 | |||
878 | 2361 | /* (void) pthread_attr_destroy(&connection_attrib); */ | ||
879 | 2362 | |||
880 | 2363 | |||
881 | 2364 | (void) pthread_mutex_lock(&LOCK_thread_count); | ||
882 | 2365 | select_thread_in_use=0; // For close_connections | ||
883 | 2366 | (void) pthread_mutex_unlock(&LOCK_thread_count); | ||
884 | 2367 | (void) pthread_cond_broadcast(&COND_thread_count); | ||
885 | 2368 | |||
886 | 2369 | /* Wait until cleanup is done */ | ||
887 | 2370 | (void) pthread_mutex_lock(&LOCK_thread_count); | ||
888 | 2371 | while (!ready_to_exit) | ||
889 | 2372 | pthread_cond_wait(&COND_server_end,&LOCK_thread_count); | ||
890 | 2373 | (void) pthread_mutex_unlock(&LOCK_thread_count); | ||
891 | 2374 | |||
892 | 2375 | clean_up(1); | ||
893 | 2376 | plugin::Registry::shutdown(); | ||
894 | 2377 | clean_up_mutexes(); | ||
895 | 2378 | internal::my_end(); | ||
896 | 2379 | return 0; | ||
897 | 2380 | } | ||
898 | 2381 | |||
899 | 2382 | 1943 | ||
900 | === added file 'drizzled/drizzled.h' | |||
901 | --- drizzled/drizzled.h 1970-01-01 00:00:00 +0000 | |||
902 | +++ drizzled/drizzled.h 2010-04-19 20:33:26 +0000 | |||
903 | @@ -0,0 +1,65 @@ | |||
904 | 1 | /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
905 | 2 | * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
906 | 3 | * | ||
907 | 4 | * Copyright (C) 2008 Sun Microsystems | ||
908 | 5 | * Copyright (C) 2010 Monty Taylor | ||
909 | 6 | * | ||
910 | 7 | * This program is free software; you can redistribute it and/or modify | ||
911 | 8 | * it under the terms of the GNU General Public License as published by | ||
912 | 9 | * the Free Software Foundation; version 2 of the License. | ||
913 | 10 | * | ||
914 | 11 | * This program is distributed in the hope that it will be useful, | ||
915 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
916 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
917 | 14 | * GNU General Public License for more details. | ||
918 | 15 | * | ||
919 | 16 | * You should have received a copy of the GNU General Public License | ||
920 | 17 | * along with this program; if not, write to the Free Software | ||
921 | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
922 | 19 | */ | ||
923 | 20 | |||
924 | 21 | #ifndef DRIZZLED_DRIZZLED_H | ||
925 | 22 | #define DRIZZLED_DRIZZLED_H | ||
926 | 23 | |||
927 | 24 | #include <bitset> | ||
928 | 25 | |||
929 | 26 | #include "drizzled/atomics.h" | ||
930 | 27 | |||
931 | 28 | struct passwd; | ||
932 | 29 | |||
933 | 30 | namespace drizzled | ||
934 | 31 | { | ||
935 | 32 | |||
936 | 33 | namespace plugin | ||
937 | 34 | { | ||
938 | 35 | class Registry; | ||
939 | 36 | } | ||
940 | 37 | |||
941 | 38 | extern std::bitset<12> test_flags; | ||
942 | 39 | extern uint32_t max_used_connections; | ||
943 | 40 | extern atomic<uint32_t> connection_count; | ||
944 | 41 | extern bool calling_initgroups; | ||
945 | 42 | extern const char *load_default_groups[]; | ||
946 | 43 | extern bool volatile select_thread_in_use; | ||
947 | 44 | extern bool volatile abort_loop; | ||
948 | 45 | extern bool volatile ready_to_exit; | ||
949 | 46 | extern bool opt_help; | ||
950 | 47 | extern bool opt_help_extended; | ||
951 | 48 | extern passwd *user_info; | ||
952 | 49 | extern char *drizzled_user; | ||
953 | 50 | |||
954 | 51 | extern const char * const DRIZZLE_CONFIG_NAME; | ||
955 | 52 | |||
956 | 53 | int init_server_components(plugin::Registry &plugins); | ||
957 | 54 | int init_common_variables(const char *conf_file_name, int argc, | ||
958 | 55 | char **argv, const char **groups); | ||
959 | 56 | |||
960 | 57 | passwd *check_user(const char *user); | ||
961 | 58 | void set_user(const char *user, passwd *user_info_arg); | ||
962 | 59 | void clean_up(bool print_message); | ||
963 | 60 | void clean_up_mutexes(void); | ||
964 | 61 | bool drizzle_rm_tmp_tables(); | ||
965 | 62 | |||
966 | 63 | } /* namespace drizzled */ | ||
967 | 64 | |||
968 | 65 | #endif /* DRIZZLED_DRIZZLED_H */ | ||
969 | 0 | 66 | ||
970 | === modified file 'drizzled/function/str/load_file.cc' | |||
971 | --- drizzled/function/str/load_file.cc 2010-02-04 08:14:46 +0000 | |||
972 | +++ drizzled/function/str/load_file.cc 2010-04-19 20:33:26 +0000 | |||
973 | @@ -42,7 +42,7 @@ | |||
974 | 42 | if (!(file_name= args[0]->val_str(str))) | 42 | if (!(file_name= args[0]->val_str(str))) |
975 | 43 | goto err; | 43 | goto err; |
976 | 44 | 44 | ||
978 | 45 | (void) internal::fn_format(path, file_name->c_ptr(), drizzle_real_data_home, "", | 45 | (void) internal::fn_format(path, file_name->c_ptr(), data_home_real, "", |
979 | 46 | MY_RELATIVE_PATH | MY_UNPACK_FILENAME); | 46 | MY_RELATIVE_PATH | MY_UNPACK_FILENAME); |
980 | 47 | 47 | ||
981 | 48 | /* Read only allowed from within dir specified by secure_file_priv */ | 48 | /* Read only allowed from within dir specified by secure_file_priv */ |
982 | 49 | 49 | ||
983 | === modified file 'drizzled/include.am' | |||
984 | --- drizzled/include.am 2010-04-14 21:40:03 +0000 | |||
985 | +++ drizzled/include.am 2010-04-19 20:33:26 +0000 | |||
986 | @@ -18,8 +18,6 @@ | |||
987 | 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
988 | 19 | 19 | ||
989 | 20 | 20 | ||
990 | 21 | sbin_PROGRAMS= drizzled/drizzled | ||
991 | 22 | |||
992 | 23 | DTRACEFILES= \ | 21 | DTRACEFILES= \ |
993 | 24 | drizzled/cursor.o \ | 22 | drizzled/cursor.o \ |
994 | 25 | drizzled/drizzled.o \ | 23 | drizzled/drizzled.o \ |
995 | @@ -54,12 +52,15 @@ | |||
996 | 54 | drizzled/comp_creator.h \ | 52 | drizzled/comp_creator.h \ |
997 | 55 | drizzled/create_field.h \ | 53 | drizzled/create_field.h \ |
998 | 56 | drizzled/current_session.h \ | 54 | drizzled/current_session.h \ |
999 | 55 | drizzled/cursor.h \ | ||
1000 | 57 | drizzled/data_home.h \ | 56 | drizzled/data_home.h \ |
1001 | 58 | drizzled/db.h \ | 57 | drizzled/db.h \ |
1002 | 59 | drizzled/decimal.h \ | 58 | drizzled/decimal.h \ |
1003 | 60 | drizzled/definitions.h \ | 59 | drizzled/definitions.h \ |
1004 | 61 | drizzled/diagnostics_area.h \ | 60 | drizzled/diagnostics_area.h \ |
1005 | 62 | drizzled/discrete_interval.h \ | 61 | drizzled/discrete_interval.h \ |
1006 | 62 | drizzled/drizzle_time.h \ | ||
1007 | 63 | drizzled/drizzled.h \ | ||
1008 | 63 | drizzled/dtcollation.h \ | 64 | drizzled/dtcollation.h \ |
1009 | 64 | drizzled/dynamic_array.h \ | 65 | drizzled/dynamic_array.h \ |
1010 | 65 | drizzled/enum.h \ | 66 | drizzled/enum.h \ |
1011 | @@ -184,14 +185,12 @@ | |||
1012 | 184 | drizzled/function/time/unix_timestamp.h \ | 185 | drizzled/function/time/unix_timestamp.h \ |
1013 | 185 | drizzled/function/time/weekday.h \ | 186 | drizzled/function/time/weekday.h \ |
1014 | 186 | drizzled/function/time/year.h \ | 187 | drizzled/function/time/year.h \ |
1015 | 187 | drizzled/typelib.h \ | ||
1016 | 188 | drizzled/function/units.h \ | 188 | drizzled/function/units.h \ |
1017 | 189 | drizzled/function/user_var_as_out_param.h \ | 189 | drizzled/function/user_var_as_out_param.h \ |
1018 | 190 | drizzled/function_hash.h \ | 190 | drizzled/function_hash.h \ |
1019 | 191 | drizzled/gettext.h \ | 191 | drizzled/gettext.h \ |
1020 | 192 | drizzled/global_charset_info.h \ | 192 | drizzled/global_charset_info.h \ |
1021 | 193 | drizzled/ha_statistics.h \ | 193 | drizzled/ha_statistics.h \ |
1022 | 194 | drizzled/cursor.h \ | ||
1023 | 195 | drizzled/handler_structs.h \ | 194 | drizzled/handler_structs.h \ |
1024 | 196 | drizzled/hybrid_type.h \ | 195 | drizzled/hybrid_type.h \ |
1025 | 197 | drizzled/hybrid_type_traits.h \ | 196 | drizzled/hybrid_type_traits.h \ |
1026 | @@ -200,7 +199,6 @@ | |||
1027 | 200 | drizzled/index_hint.h \ | 199 | drizzled/index_hint.h \ |
1028 | 201 | drizzled/internal_error_handler.h \ | 200 | drizzled/internal_error_handler.h \ |
1029 | 202 | drizzled/item.h \ | 201 | drizzled/item.h \ |
1030 | 203 | drizzled/item_result.h \ | ||
1031 | 204 | drizzled/item/basic_constant.h \ | 202 | drizzled/item/basic_constant.h \ |
1032 | 205 | drizzled/item/bin_string.h \ | 203 | drizzled/item/bin_string.h \ |
1033 | 206 | drizzled/item/blob.h \ | 204 | drizzled/item/blob.h \ |
1034 | @@ -238,6 +236,7 @@ | |||
1035 | 238 | drizzled/item/sum.h \ | 236 | drizzled/item/sum.h \ |
1036 | 239 | drizzled/item/type_holder.h \ | 237 | drizzled/item/type_holder.h \ |
1037 | 240 | drizzled/item/uint.h \ | 238 | drizzled/item/uint.h \ |
1038 | 239 | drizzled/item_result.h \ | ||
1039 | 241 | drizzled/join.h \ | 240 | drizzled/join.h \ |
1040 | 242 | drizzled/join_cache.h \ | 241 | drizzled/join_cache.h \ |
1041 | 243 | drizzled/join_table.h \ | 242 | drizzled/join_table.h \ |
1042 | @@ -251,24 +250,20 @@ | |||
1043 | 251 | drizzled/lex_symbol.h \ | 250 | drizzled/lex_symbol.h \ |
1044 | 252 | drizzled/lock.h \ | 251 | drizzled/lock.h \ |
1045 | 253 | drizzled/lookup_symbol.h \ | 252 | drizzled/lookup_symbol.h \ |
1046 | 254 | drizzled/memory/sql_alloc.h \ | ||
1047 | 255 | drizzled/memory/multi_malloc.h \ | 253 | drizzled/memory/multi_malloc.h \ |
1048 | 256 | drizzled/memory/root.h \ | 254 | drizzled/memory/root.h \ |
1050 | 257 | drizzled/option.h \ | 255 | drizzled/memory/sql_alloc.h \ |
1051 | 258 | drizzled/my_hash.h \ | 256 | drizzled/my_hash.h \ |
1052 | 259 | drizzled/drizzle_time.h \ | ||
1053 | 260 | drizzled/tree.h \ | ||
1054 | 261 | drizzled/var.h \ | ||
1055 | 262 | drizzled/name_resolution_context.h \ | 257 | drizzled/name_resolution_context.h \ |
1056 | 263 | drizzled/name_resolution_context_state.h \ | 258 | drizzled/name_resolution_context_state.h \ |
1057 | 264 | drizzled/named_savepoint.h \ | 259 | drizzled/named_savepoint.h \ |
1058 | 265 | drizzled/natural_join_column.h \ | 260 | drizzled/natural_join_column.h \ |
1059 | 266 | drizzled/nested_join.h \ | 261 | drizzled/nested_join.h \ |
1060 | 267 | drizzled/open_tables_state.h \ | 262 | drizzled/open_tables_state.h \ |
1062 | 268 | drizzled/optimizer/cost_vector.h \ | 263 | drizzled/optimizer/cost_vector.h \ |
1063 | 264 | drizzled/optimizer/explain_plan.h \ | ||
1064 | 269 | drizzled/optimizer/key_field.h \ | 265 | drizzled/optimizer/key_field.h \ |
1065 | 270 | drizzled/optimizer/key_use.h \ | 266 | drizzled/optimizer/key_use.h \ |
1066 | 271 | drizzled/optimizer/explain_plan.h \ | ||
1067 | 272 | drizzled/optimizer/position.h \ | 267 | drizzled/optimizer/position.h \ |
1068 | 273 | drizzled/optimizer/quick_group_min_max_select.h \ | 268 | drizzled/optimizer/quick_group_min_max_select.h \ |
1069 | 274 | drizzled/optimizer/quick_index_merge_select.h \ | 269 | drizzled/optimizer/quick_index_merge_select.h \ |
1070 | @@ -284,6 +279,7 @@ | |||
1071 | 284 | drizzled/optimizer/sel_tree.h \ | 279 | drizzled/optimizer/sel_tree.h \ |
1072 | 285 | drizzled/optimizer/sum.h \ | 280 | drizzled/optimizer/sum.h \ |
1073 | 286 | drizzled/optimizer/table_read_plan.h \ | 281 | drizzled/optimizer/table_read_plan.h \ |
1074 | 282 | drizzled/option.h \ | ||
1075 | 287 | drizzled/order.h \ | 283 | drizzled/order.h \ |
1076 | 288 | drizzled/parser.h \ | 284 | drizzled/parser.h \ |
1077 | 289 | drizzled/plugin.h \ | 285 | drizzled/plugin.h \ |
1078 | @@ -304,9 +300,9 @@ | |||
1079 | 304 | drizzled/plugin/null_client.h \ | 300 | drizzled/plugin/null_client.h \ |
1080 | 305 | drizzled/plugin/plugin.h \ | 301 | drizzled/plugin/plugin.h \ |
1081 | 306 | drizzled/plugin/query_cache.h \ | 302 | drizzled/plugin/query_cache.h \ |
1083 | 307 | drizzled/plugin/query_rewrite.h \ | 303 | drizzled/plugin/query_rewrite.h \ |
1084 | 304 | drizzled/plugin/replication.h \ | ||
1085 | 308 | drizzled/plugin/registry.h \ | 305 | drizzled/plugin/registry.h \ |
1086 | 309 | drizzled/plugin/replication.h \ | ||
1087 | 310 | drizzled/plugin/scheduler.h \ | 306 | drizzled/plugin/scheduler.h \ |
1088 | 311 | drizzled/plugin/storage_engine.h \ | 307 | drizzled/plugin/storage_engine.h \ |
1089 | 312 | drizzled/plugin/table_function.h \ | 308 | drizzled/plugin/table_function.h \ |
1090 | @@ -314,11 +310,11 @@ | |||
1091 | 314 | drizzled/plugin/transaction_reader.h \ | 310 | drizzled/plugin/transaction_reader.h \ |
1092 | 315 | drizzled/plugin/transaction_replicator.h \ | 311 | drizzled/plugin/transaction_replicator.h \ |
1093 | 316 | drizzled/plugin/transactional_storage_engine.h \ | 312 | drizzled/plugin/transactional_storage_engine.h \ |
1094 | 313 | drizzled/plugin/version.h \ | ||
1095 | 314 | drizzled/plugin/xa_resource_manager.h \ | ||
1096 | 317 | drizzled/plugin/xa_storage_engine.h \ | 315 | drizzled/plugin/xa_storage_engine.h \ |
1099 | 318 | drizzled/plugin/xa_resource_manager.h \ | 316 | drizzled/probes.h \ |
1098 | 319 | drizzled/plugin/version.h \ | ||
1100 | 320 | drizzled/pthread_globals.h \ | 317 | drizzled/pthread_globals.h \ |
1101 | 321 | drizzled/probes.h \ | ||
1102 | 322 | drizzled/qsort_cmp.h \ | 318 | drizzled/qsort_cmp.h \ |
1103 | 323 | drizzled/query_id.h \ | 319 | drizzled/query_id.h \ |
1104 | 324 | drizzled/records.h \ | 320 | drizzled/records.h \ |
1105 | @@ -344,6 +340,7 @@ | |||
1106 | 344 | drizzled/session_list.h \ | 340 | drizzled/session_list.h \ |
1107 | 345 | drizzled/set_var.h \ | 341 | drizzled/set_var.h \ |
1108 | 346 | drizzled/show.h \ | 342 | drizzled/show.h \ |
1109 | 343 | drizzled/signal_handler.h \ | ||
1110 | 347 | drizzled/sql_base.h \ | 344 | drizzled/sql_base.h \ |
1111 | 348 | drizzled/sql_bitmap.h \ | 345 | drizzled/sql_bitmap.h \ |
1112 | 349 | drizzled/sql_error.h \ | 346 | drizzled/sql_error.h \ |
1113 | @@ -414,8 +411,10 @@ | |||
1114 | 414 | drizzled/thr_lock.h \ | 411 | drizzled/thr_lock.h \ |
1115 | 415 | drizzled/time_functions.h \ | 412 | drizzled/time_functions.h \ |
1116 | 416 | drizzled/tmp_table_param.h \ | 413 | drizzled/tmp_table_param.h \ |
1117 | 414 | drizzled/transaction_context.h \ | ||
1118 | 417 | drizzled/transaction_services.h \ | 415 | drizzled/transaction_services.h \ |
1120 | 418 | drizzled/transaction_context.h \ | 416 | drizzled/tree.h \ |
1121 | 417 | drizzled/typelib.h \ | ||
1122 | 419 | drizzled/tzfile.h \ | 418 | drizzled/tzfile.h \ |
1123 | 420 | drizzled/tztime.h \ | 419 | drizzled/tztime.h \ |
1124 | 421 | drizzled/unique.h \ | 420 | drizzled/unique.h \ |
1125 | @@ -427,337 +426,350 @@ | |||
1126 | 427 | drizzled/utf8/checked.h \ | 426 | drizzled/utf8/checked.h \ |
1127 | 428 | drizzled/utf8/core.h \ | 427 | drizzled/utf8/core.h \ |
1128 | 429 | drizzled/utf8/unchecked.h \ | 428 | drizzled/utf8/unchecked.h \ |
1129 | 429 | drizzled/var.h \ | ||
1130 | 430 | drizzled/version.h \ | 430 | drizzled/version.h \ |
1131 | 431 | drizzled/visibility.h \ | 431 | drizzled/visibility.h \ |
1132 | 432 | drizzled/xid.h | 432 | drizzled/xid.h |
1133 | 433 | 433 | ||
1140 | 434 | DRIZZLED_LDADD= \ | 434 | lib_LTLIBRARIES+= drizzled/libdrizzled.la |
1141 | 435 | drizzled/internal/libinternal.la \ | 435 | drizzled_libdrizzled_la_LIBADD= \ |
1142 | 436 | $(LIBZ) \ | 436 | drizzled/algorithm/libhash.la \ |
1143 | 437 | $(LIBINTL) \ | 437 | drizzled/util/libutil.la \ |
1144 | 438 | ${LIBC_P} | 438 | drizzled/internal/libinternal.la \ |
1145 | 439 | 439 | drizzled/message/libdrizzledmessage.la \ | |
1146 | 440 | gnulib/libgnu.la \ | ||
1147 | 441 | $(LIBZ) \ | ||
1148 | 442 | $(LIBINTL) \ | ||
1149 | 443 | ${LIBC_P} \ | ||
1150 | 444 | $(pandora_plugin_libs) \ | ||
1151 | 445 | $(LDADD) \ | ||
1152 | 446 | $(LIBUUID) \ | ||
1153 | 447 | $(LIBDL_LIBS) \ | ||
1154 | 448 | $(LIBPROTOBUF) \ | ||
1155 | 449 | $(LIBPCRE) \ | ||
1156 | 450 | $(LIBTBB) \ | ||
1157 | 451 | $(GCOV_LIBS) | ||
1158 | 452 | |||
1159 | 453 | drizzled_libdrizzled_la_DEPENDENCIES= \ | ||
1160 | 454 | drizzled/message/libdrizzledmessage.la \ | ||
1161 | 455 | ${noinst_LTLIBRARIES} \ | ||
1162 | 456 | $(pandora_plugin_libs) | ||
1163 | 457 | |||
1164 | 458 | drizzled_libdrizzled_la_SOURCES= \ | ||
1165 | 459 | drizzled/alter_info.cc \ | ||
1166 | 460 | drizzled/cached_item.cc \ | ||
1167 | 461 | drizzled/calendar.cc \ | ||
1168 | 462 | drizzled/check_stack_overrun.cc \ | ||
1169 | 463 | drizzled/comp_creator.cc \ | ||
1170 | 464 | drizzled/create_field.cc \ | ||
1171 | 465 | drizzled/current_session.cc \ | ||
1172 | 466 | drizzled/cursor.cc \ | ||
1173 | 467 | drizzled/decimal.cc \ | ||
1174 | 468 | drizzled/diagnostics_area.cc \ | ||
1175 | 469 | drizzled/drizzle_time.cc \ | ||
1176 | 470 | drizzled/drizzled.cc \ | ||
1177 | 471 | drizzled/dtcollation.cc \ | ||
1178 | 472 | drizzled/errmsg_print.cc \ | ||
1179 | 473 | drizzled/field.cc \ | ||
1180 | 474 | drizzled/field/blob.cc \ | ||
1181 | 475 | drizzled/field/date.cc \ | ||
1182 | 476 | drizzled/field/datetime.cc \ | ||
1183 | 477 | drizzled/field/decimal.cc \ | ||
1184 | 478 | drizzled/field/double.cc \ | ||
1185 | 479 | drizzled/field/enum.cc \ | ||
1186 | 480 | drizzled/field/int64_t.cc \ | ||
1187 | 481 | drizzled/field/long.cc \ | ||
1188 | 482 | drizzled/field/null.cc \ | ||
1189 | 483 | drizzled/field/num.cc \ | ||
1190 | 484 | drizzled/field/real.cc \ | ||
1191 | 485 | drizzled/field/str.cc \ | ||
1192 | 486 | drizzled/field/timestamp.cc \ | ||
1193 | 487 | drizzled/field/varstring.cc \ | ||
1194 | 488 | drizzled/field_conv.cc \ | ||
1195 | 489 | drizzled/field_iterator.cc \ | ||
1196 | 490 | drizzled/file_exchange.cc \ | ||
1197 | 491 | drizzled/filesort.cc \ | ||
1198 | 492 | drizzled/foreign_key.cc \ | ||
1199 | 493 | drizzled/function/additive_op.cc \ | ||
1200 | 494 | drizzled/function/coercibility.cc \ | ||
1201 | 495 | drizzled/function/field.cc \ | ||
1202 | 496 | drizzled/function/find_in_set.cc \ | ||
1203 | 497 | drizzled/function/found_rows.cc \ | ||
1204 | 498 | drizzled/function/func.cc \ | ||
1205 | 499 | drizzled/function/get_system_var.cc \ | ||
1206 | 500 | drizzled/function/get_user_var.cc \ | ||
1207 | 501 | drizzled/function/last_insert.cc \ | ||
1208 | 502 | drizzled/function/locate.cc \ | ||
1209 | 503 | drizzled/function/math/abs.cc \ | ||
1210 | 504 | drizzled/function/math/acos.cc \ | ||
1211 | 505 | drizzled/function/math/asin.cc \ | ||
1212 | 506 | drizzled/function/math/atan.cc \ | ||
1213 | 507 | drizzled/function/math/ceiling.cc \ | ||
1214 | 508 | drizzled/function/math/cos.cc \ | ||
1215 | 509 | drizzled/function/math/decimal_typecast.cc \ | ||
1216 | 510 | drizzled/function/math/divide.cc \ | ||
1217 | 511 | drizzled/function/math/exp.cc \ | ||
1218 | 512 | drizzled/function/math/floor.cc \ | ||
1219 | 513 | drizzled/function/math/int.cc \ | ||
1220 | 514 | drizzled/function/math/int_divide.cc \ | ||
1221 | 515 | drizzled/function/math/int_val.cc \ | ||
1222 | 516 | drizzled/function/math/integer.cc \ | ||
1223 | 517 | drizzled/function/math/ln.cc \ | ||
1224 | 518 | drizzled/function/math/log.cc \ | ||
1225 | 519 | drizzled/function/math/minus.cc \ | ||
1226 | 520 | drizzled/function/math/mod.cc \ | ||
1227 | 521 | drizzled/function/math/multiply.cc \ | ||
1228 | 522 | drizzled/function/math/neg.cc \ | ||
1229 | 523 | drizzled/function/math/ord.cc \ | ||
1230 | 524 | drizzled/function/math/plus.cc \ | ||
1231 | 525 | drizzled/function/math/pow.cc \ | ||
1232 | 526 | drizzled/function/math/rand.cc \ | ||
1233 | 527 | drizzled/function/math/real.cc \ | ||
1234 | 528 | drizzled/function/math/round.cc \ | ||
1235 | 529 | drizzled/function/math/sin.cc \ | ||
1236 | 530 | drizzled/function/math/sqrt.cc \ | ||
1237 | 531 | drizzled/function/math/tan.cc \ | ||
1238 | 532 | drizzled/function/min_max.cc \ | ||
1239 | 533 | drizzled/function/num1.cc \ | ||
1240 | 534 | drizzled/function/num_op.cc \ | ||
1241 | 535 | drizzled/function/numhybrid.cc \ | ||
1242 | 536 | drizzled/function/row_count.cc \ | ||
1243 | 537 | drizzled/function/set_user_var.cc \ | ||
1244 | 538 | drizzled/function/sign.cc \ | ||
1245 | 539 | drizzled/function/str/alloc_buffer.cc \ | ||
1246 | 540 | drizzled/function/str/binary.cc \ | ||
1247 | 541 | drizzled/function/str/char.cc \ | ||
1248 | 542 | drizzled/function/str/collation.cc \ | ||
1249 | 543 | drizzled/function/str/concat.cc \ | ||
1250 | 544 | drizzled/function/str/conv.cc \ | ||
1251 | 545 | drizzled/function/str/conv_charset.cc \ | ||
1252 | 546 | drizzled/function/str/elt.cc \ | ||
1253 | 547 | drizzled/function/str/export_set.cc \ | ||
1254 | 548 | drizzled/function/str/format.cc \ | ||
1255 | 549 | drizzled/function/str/insert.cc \ | ||
1256 | 550 | drizzled/function/str/left.cc \ | ||
1257 | 551 | drizzled/function/str/load_file.cc \ | ||
1258 | 552 | drizzled/function/str/make_set.cc \ | ||
1259 | 553 | drizzled/function/str/pad.cc \ | ||
1260 | 554 | drizzled/function/str/quote.cc \ | ||
1261 | 555 | drizzled/function/str/repeat.cc \ | ||
1262 | 556 | drizzled/function/str/replace.cc \ | ||
1263 | 557 | drizzled/function/str/right.cc \ | ||
1264 | 558 | drizzled/function/str/set_collation.cc \ | ||
1265 | 559 | drizzled/function/str/str_conv.cc \ | ||
1266 | 560 | drizzled/function/str/strfunc.cc \ | ||
1267 | 561 | drizzled/function/str/trim.cc \ | ||
1268 | 562 | drizzled/function/time/curdate.cc \ | ||
1269 | 563 | drizzled/function/time/date.cc \ | ||
1270 | 564 | drizzled/function/time/date_add_interval.cc \ | ||
1271 | 565 | drizzled/function/time/date_format.cc \ | ||
1272 | 566 | drizzled/function/time/dayname.cc \ | ||
1273 | 567 | drizzled/function/time/dayofmonth.cc \ | ||
1274 | 568 | drizzled/function/time/dayofyear.cc \ | ||
1275 | 569 | drizzled/function/time/extract.cc \ | ||
1276 | 570 | drizzled/function/time/from_days.cc \ | ||
1277 | 571 | drizzled/function/time/from_unixtime.cc \ | ||
1278 | 572 | drizzled/function/time/hour.cc \ | ||
1279 | 573 | drizzled/function/time/last_day.cc \ | ||
1280 | 574 | drizzled/function/time/makedate.cc \ | ||
1281 | 575 | drizzled/function/time/microsecond.cc \ | ||
1282 | 576 | drizzled/function/time/minute.cc \ | ||
1283 | 577 | drizzled/function/time/month.cc \ | ||
1284 | 578 | drizzled/function/time/now.cc \ | ||
1285 | 579 | drizzled/function/time/period_add.cc \ | ||
1286 | 580 | drizzled/function/time/period_diff.cc \ | ||
1287 | 581 | drizzled/function/time/quarter.cc \ | ||
1288 | 582 | drizzled/function/time/second.cc \ | ||
1289 | 583 | drizzled/function/time/sysdate_local.cc \ | ||
1290 | 584 | drizzled/function/time/timestamp_diff.cc \ | ||
1291 | 585 | drizzled/function/time/to_days.cc \ | ||
1292 | 586 | drizzled/function/time/typecast.cc \ | ||
1293 | 587 | drizzled/function/time/unix_timestamp.cc \ | ||
1294 | 588 | drizzled/function/time/weekday.cc \ | ||
1295 | 589 | drizzled/function/time/year.cc \ | ||
1296 | 590 | drizzled/function/units.cc \ | ||
1297 | 591 | drizzled/function/user_var_as_out_param.cc \ | ||
1298 | 592 | drizzled/ha_commands.cc \ | ||
1299 | 593 | drizzled/hybrid_type_traits.cc \ | ||
1300 | 594 | drizzled/hybrid_type_traits_decimal.cc \ | ||
1301 | 595 | drizzled/hybrid_type_traits_integer.cc \ | ||
1302 | 596 | drizzled/index_hint.cc \ | ||
1303 | 597 | drizzled/item.cc \ | ||
1304 | 598 | drizzled/item/bin_string.cc \ | ||
1305 | 599 | drizzled/item/cache.cc \ | ||
1306 | 600 | drizzled/item/cache_decimal.cc \ | ||
1307 | 601 | drizzled/item/cache_int.cc \ | ||
1308 | 602 | drizzled/item/cache_real.cc \ | ||
1309 | 603 | drizzled/item/cache_row.cc \ | ||
1310 | 604 | drizzled/item/cache_str.cc \ | ||
1311 | 605 | drizzled/item/cmpfunc.cc \ | ||
1312 | 606 | drizzled/item/copy_string.cc \ | ||
1313 | 607 | drizzled/item/create.cc \ | ||
1314 | 608 | drizzled/item/decimal.cc \ | ||
1315 | 609 | drizzled/item/default_value.cc \ | ||
1316 | 610 | drizzled/item/direct_ref.cc \ | ||
1317 | 611 | drizzled/item/empty_string.cc \ | ||
1318 | 612 | drizzled/item/field.cc \ | ||
1319 | 613 | drizzled/item/float.cc \ | ||
1320 | 614 | drizzled/item/hex_string.cc \ | ||
1321 | 615 | drizzled/item/ident.cc \ | ||
1322 | 616 | drizzled/item/insert_value.cc \ | ||
1323 | 617 | drizzled/item/int.cc \ | ||
1324 | 618 | drizzled/item/int_with_ref.cc \ | ||
1325 | 619 | drizzled/item/null.cc \ | ||
1326 | 620 | drizzled/item/num.cc \ | ||
1327 | 621 | drizzled/item/outer_ref.cc \ | ||
1328 | 622 | drizzled/item/ref.cc \ | ||
1329 | 623 | drizzled/item/ref_null_helper.cc \ | ||
1330 | 624 | drizzled/item/row.cc \ | ||
1331 | 625 | drizzled/item/string.cc \ | ||
1332 | 626 | drizzled/item/subselect.cc \ | ||
1333 | 627 | drizzled/item/sum.cc \ | ||
1334 | 628 | drizzled/item/type_holder.cc \ | ||
1335 | 629 | drizzled/item/uint.cc \ | ||
1336 | 630 | drizzled/join.cc \ | ||
1337 | 631 | drizzled/join_cache.cc \ | ||
1338 | 632 | drizzled/join_table.cc \ | ||
1339 | 633 | drizzled/key.cc \ | ||
1340 | 634 | drizzled/key_map.cc \ | ||
1341 | 635 | drizzled/lock.cc \ | ||
1342 | 636 | drizzled/lookup_symbol.cc \ | ||
1343 | 637 | drizzled/my_getsystime.cc \ | ||
1344 | 638 | drizzled/my_hash.cc \ | ||
1345 | 639 | drizzled/name_resolution_context_state.cc \ | ||
1346 | 640 | drizzled/natural_join_column.cc \ | ||
1347 | 641 | drizzled/optimizer/explain_plan.cc \ | ||
1348 | 642 | drizzled/optimizer/key_field.cc \ | ||
1349 | 643 | drizzled/optimizer/quick_group_min_max_select.cc \ | ||
1350 | 644 | drizzled/optimizer/quick_index_merge_select.cc \ | ||
1351 | 645 | drizzled/optimizer/quick_range.cc \ | ||
1352 | 646 | drizzled/optimizer/quick_range_select.cc \ | ||
1353 | 647 | drizzled/optimizer/quick_ror_intersect_select.cc \ | ||
1354 | 648 | drizzled/optimizer/quick_ror_union_select.cc \ | ||
1355 | 649 | drizzled/optimizer/range.cc \ | ||
1356 | 650 | drizzled/optimizer/sel_arg.cc \ | ||
1357 | 651 | drizzled/optimizer/sel_imerge.cc \ | ||
1358 | 652 | drizzled/optimizer/sel_tree.cc \ | ||
1359 | 653 | drizzled/optimizer/sum.cc \ | ||
1360 | 654 | drizzled/plugin/authentication.cc \ | ||
1361 | 655 | drizzled/plugin/authorization.cc \ | ||
1362 | 656 | drizzled/plugin/client.cc \ | ||
1363 | 657 | drizzled/plugin/error_message.cc \ | ||
1364 | 658 | drizzled/plugin/function.cc \ | ||
1365 | 659 | drizzled/plugin/library.cc \ | ||
1366 | 660 | drizzled/plugin/listen.cc \ | ||
1367 | 661 | drizzled/plugin/listen_tcp.cc \ | ||
1368 | 662 | drizzled/plugin/loader.cc \ | ||
1369 | 663 | drizzled/plugin/logging.cc \ | ||
1370 | 664 | drizzled/plugin/monitored_in_transaction.cc \ | ||
1371 | 665 | drizzled/plugin/plugin.cc \ | ||
1372 | 666 | drizzled/plugin/query_cache.cc \ | ||
1373 | 667 | drizzled/plugin/query_rewrite.cc \ | ||
1374 | 668 | drizzled/plugin/registry.cc \ | ||
1375 | 669 | drizzled/plugin/scheduler.cc \ | ||
1376 | 670 | drizzled/plugin/schema_engine.cc \ | ||
1377 | 671 | drizzled/plugin/storage_engine.cc \ | ||
1378 | 672 | drizzled/plugin/table_function.cc \ | ||
1379 | 673 | drizzled/plugin/transaction_applier.cc \ | ||
1380 | 674 | drizzled/plugin/transaction_replicator.cc \ | ||
1381 | 675 | drizzled/plugin/transactional_storage_engine.cc \ | ||
1382 | 676 | drizzled/plugin/xa_resource_manager.cc \ | ||
1383 | 677 | drizzled/plugin/xa_storage_engine.cc \ | ||
1384 | 678 | drizzled/query_id.cc \ | ||
1385 | 679 | drizzled/records.cc \ | ||
1386 | 680 | drizzled/replication_services.cc \ | ||
1387 | 681 | drizzled/resource_context.cc \ | ||
1388 | 682 | drizzled/schema_identifier.cc \ | ||
1389 | 683 | drizzled/session.cc \ | ||
1390 | 684 | drizzled/session_list.cc \ | ||
1391 | 685 | drizzled/set_var.cc \ | ||
1392 | 686 | drizzled/show.cc \ | ||
1393 | 687 | drizzled/signal_handler.cc \ | ||
1394 | 688 | drizzled/sql_base.cc \ | ||
1395 | 689 | drizzled/sql_bitmap.cc \ | ||
1396 | 690 | drizzled/sql_delete.cc \ | ||
1397 | 691 | drizzled/sql_derived.cc \ | ||
1398 | 692 | drizzled/sql_error.cc \ | ||
1399 | 693 | drizzled/sql_insert.cc \ | ||
1400 | 694 | drizzled/sql_lex.cc \ | ||
1401 | 695 | drizzled/sql_list.cc \ | ||
1402 | 696 | drizzled/sql_load.cc \ | ||
1403 | 697 | drizzled/sql_locale.cc \ | ||
1404 | 698 | drizzled/sql_parse.cc \ | ||
1405 | 699 | drizzled/sql_select.cc \ | ||
1406 | 700 | drizzled/sql_state.cc \ | ||
1407 | 701 | drizzled/sql_string.cc \ | ||
1408 | 702 | drizzled/sql_table.cc \ | ||
1409 | 703 | drizzled/sql_union.cc \ | ||
1410 | 704 | drizzled/sql_update.cc \ | ||
1411 | 705 | drizzled/sql_yacc.yy \ | ||
1412 | 706 | drizzled/stacktrace.cc \ | ||
1413 | 707 | drizzled/statement/alter_schema.cc \ | ||
1414 | 708 | drizzled/statement/alter_table.cc \ | ||
1415 | 709 | drizzled/statement/analyze.cc \ | ||
1416 | 710 | drizzled/statement/change_schema.cc \ | ||
1417 | 711 | drizzled/statement/check.cc \ | ||
1418 | 712 | drizzled/statement/commit.cc \ | ||
1419 | 713 | drizzled/statement/create_index.cc \ | ||
1420 | 714 | drizzled/statement/create_schema.cc \ | ||
1421 | 715 | drizzled/statement/create_table.cc \ | ||
1422 | 716 | drizzled/statement/delete.cc \ | ||
1423 | 717 | drizzled/statement/drop_index.cc \ | ||
1424 | 718 | drizzled/statement/drop_schema.cc \ | ||
1425 | 719 | drizzled/statement/drop_table.cc \ | ||
1426 | 720 | drizzled/statement/empty_query.cc \ | ||
1427 | 721 | drizzled/statement/flush.cc \ | ||
1428 | 722 | drizzled/statement/insert.cc \ | ||
1429 | 723 | drizzled/statement/insert_select.cc \ | ||
1430 | 724 | drizzled/statement/kill.cc \ | ||
1431 | 725 | drizzled/statement/load.cc \ | ||
1432 | 726 | drizzled/statement/release_savepoint.cc \ | ||
1433 | 727 | drizzled/statement/rename_table.cc \ | ||
1434 | 728 | drizzled/statement/replace.cc \ | ||
1435 | 729 | drizzled/statement/replace_select.cc \ | ||
1436 | 730 | drizzled/statement/rollback.cc \ | ||
1437 | 731 | drizzled/statement/rollback_to_savepoint.cc \ | ||
1438 | 732 | drizzled/statement/savepoint.cc \ | ||
1439 | 733 | drizzled/statement/select.cc \ | ||
1440 | 734 | drizzled/statement/set_option.cc \ | ||
1441 | 735 | drizzled/statement/show_create.cc \ | ||
1442 | 736 | drizzled/statement/show_create_schema.cc \ | ||
1443 | 737 | drizzled/statement/show_errors.cc \ | ||
1444 | 738 | drizzled/statement/show_warnings.cc \ | ||
1445 | 739 | drizzled/statement/start_transaction.cc \ | ||
1446 | 740 | drizzled/statement/truncate.cc \ | ||
1447 | 741 | drizzled/statement/unlock_tables.cc \ | ||
1448 | 742 | drizzled/statement/update.cc \ | ||
1449 | 743 | drizzled/strfunc.cc \ | ||
1450 | 744 | drizzled/table.cc \ | ||
1451 | 745 | drizzled/table_function_container.cc \ | ||
1452 | 746 | drizzled/table_identifier.cc \ | ||
1453 | 747 | drizzled/table_list.cc \ | ||
1454 | 748 | drizzled/table_share.cc \ | ||
1455 | 749 | drizzled/temporal.cc \ | ||
1456 | 750 | drizzled/temporal_format.cc \ | ||
1457 | 751 | drizzled/temporal_interval.cc \ | ||
1458 | 752 | drizzled/thr_lock.cc \ | ||
1459 | 753 | drizzled/time_functions.cc \ | ||
1460 | 754 | drizzled/transaction_services.cc \ | ||
1461 | 755 | drizzled/tree.cc \ | ||
1462 | 756 | drizzled/tztime.cc \ | ||
1463 | 757 | drizzled/uniques.cc \ | ||
1464 | 758 | drizzled/user_var_entry.cc \ | ||
1465 | 759 | drizzled/version.cc \ | ||
1466 | 760 | drizzled/xid.cc | ||
1467 | 761 | |||
1468 | 762 | sbin_PROGRAMS+= drizzled/drizzled | ||
1469 | 763 | |||
1470 | 764 | drizzled_drizzled_SOURCES= \ | ||
1471 | 765 | drizzled/main.cc | ||
1472 | 440 | drizzled_drizzled_LDADD= \ | 766 | drizzled_drizzled_LDADD= \ |
1487 | 441 | ${DRIZZLED_LDADD} \ | 767 | $(LIBPCRE) \ |
1488 | 442 | ${noinst_LTLIBRARIES} \ | 768 | $(LIBINTL) \ |
1489 | 443 | drizzled/algorithm/libhash.la \ | 769 | drizzled/libdrizzled.la |
1476 | 444 | drizzled/util/libutil.la \ | ||
1477 | 445 | drizzled/message/libdrizzledmessage.la \ | ||
1478 | 446 | drizzled/libcached_directory.la \ | ||
1479 | 447 | drizzled/liberror.la \ | ||
1480 | 448 | drizzled/libmemory.la \ | ||
1481 | 449 | $(pandora_plugin_libs) \ | ||
1482 | 450 | $(LDADD) $(LIBUUID) gnulib/libgnu.la \ | ||
1483 | 451 | $(LIBDL_LIBS) $(LIBPROTOBUF) $(LIBPCRE) $(LIBTBB) \ | ||
1484 | 452 | $(PANDORA_PLUGIN_DEP_LIBS) $(GCOV_LIBS) | ||
1485 | 453 | |||
1486 | 454 | drizzled_drizzled_DEPENDENCIES= ${noinst_LTLIBRARIES} $(pandora_plugin_libs) | ||
1490 | 455 | 770 | ||
1491 | 456 | drizzled_drizzled_LDFLAGS= -export-dynamic | 771 | drizzled_drizzled_LDFLAGS= -export-dynamic |
1492 | 457 | 772 | ||
1493 | 458 | drizzled_drizzled_SOURCES= \ | ||
1494 | 459 | drizzled/alter_info.cc \ | ||
1495 | 460 | drizzled/cached_item.cc \ | ||
1496 | 461 | drizzled/calendar.cc \ | ||
1497 | 462 | drizzled/check_stack_overrun.cc \ | ||
1498 | 463 | drizzled/comp_creator.cc \ | ||
1499 | 464 | drizzled/create_field.cc \ | ||
1500 | 465 | drizzled/current_session.cc \ | ||
1501 | 466 | drizzled/cursor.cc \ | ||
1502 | 467 | drizzled/decimal.cc \ | ||
1503 | 468 | drizzled/diagnostics_area.cc \ | ||
1504 | 469 | drizzled/drizzled.cc \ | ||
1505 | 470 | drizzled/dtcollation.cc \ | ||
1506 | 471 | drizzled/errmsg_print.cc \ | ||
1507 | 472 | drizzled/field.cc \ | ||
1508 | 473 | drizzled/field/blob.cc \ | ||
1509 | 474 | drizzled/field/date.cc \ | ||
1510 | 475 | drizzled/field/datetime.cc \ | ||
1511 | 476 | drizzled/field/decimal.cc \ | ||
1512 | 477 | drizzled/field/double.cc \ | ||
1513 | 478 | drizzled/field/enum.cc \ | ||
1514 | 479 | drizzled/field/int64_t.cc \ | ||
1515 | 480 | drizzled/field/long.cc \ | ||
1516 | 481 | drizzled/field/null.cc \ | ||
1517 | 482 | drizzled/field/num.cc \ | ||
1518 | 483 | drizzled/field/real.cc \ | ||
1519 | 484 | drizzled/field/str.cc \ | ||
1520 | 485 | drizzled/field/timestamp.cc \ | ||
1521 | 486 | drizzled/field/varstring.cc \ | ||
1522 | 487 | drizzled/field_conv.cc \ | ||
1523 | 488 | drizzled/field_iterator.cc \ | ||
1524 | 489 | drizzled/file_exchange.cc \ | ||
1525 | 490 | drizzled/filesort.cc \ | ||
1526 | 491 | drizzled/foreign_key.cc \ | ||
1527 | 492 | drizzled/function/additive_op.cc \ | ||
1528 | 493 | drizzled/function/coercibility.cc \ | ||
1529 | 494 | drizzled/function/field.cc \ | ||
1530 | 495 | drizzled/function/find_in_set.cc \ | ||
1531 | 496 | drizzled/function/found_rows.cc \ | ||
1532 | 497 | drizzled/function/func.cc \ | ||
1533 | 498 | drizzled/function/get_system_var.cc \ | ||
1534 | 499 | drizzled/function/get_user_var.cc \ | ||
1535 | 500 | drizzled/function/last_insert.cc \ | ||
1536 | 501 | drizzled/function/locate.cc \ | ||
1537 | 502 | drizzled/function/math/abs.cc \ | ||
1538 | 503 | drizzled/function/math/acos.cc \ | ||
1539 | 504 | drizzled/function/math/asin.cc \ | ||
1540 | 505 | drizzled/function/math/atan.cc \ | ||
1541 | 506 | drizzled/function/math/ceiling.cc \ | ||
1542 | 507 | drizzled/function/math/cos.cc \ | ||
1543 | 508 | drizzled/function/math/decimal_typecast.cc \ | ||
1544 | 509 | drizzled/function/math/divide.cc \ | ||
1545 | 510 | drizzled/function/math/exp.cc \ | ||
1546 | 511 | drizzled/function/math/floor.cc \ | ||
1547 | 512 | drizzled/function/math/int.cc \ | ||
1548 | 513 | drizzled/function/math/int_divide.cc \ | ||
1549 | 514 | drizzled/function/math/int_val.cc \ | ||
1550 | 515 | drizzled/function/math/integer.cc \ | ||
1551 | 516 | drizzled/function/math/ln.cc \ | ||
1552 | 517 | drizzled/function/math/log.cc \ | ||
1553 | 518 | drizzled/function/math/minus.cc \ | ||
1554 | 519 | drizzled/function/math/mod.cc \ | ||
1555 | 520 | drizzled/function/math/multiply.cc \ | ||
1556 | 521 | drizzled/function/math/neg.cc \ | ||
1557 | 522 | drizzled/function/math/ord.cc \ | ||
1558 | 523 | drizzled/function/math/plus.cc \ | ||
1559 | 524 | drizzled/function/math/pow.cc \ | ||
1560 | 525 | drizzled/function/math/rand.cc \ | ||
1561 | 526 | drizzled/function/math/real.cc \ | ||
1562 | 527 | drizzled/function/math/round.cc \ | ||
1563 | 528 | drizzled/function/math/sin.cc \ | ||
1564 | 529 | drizzled/function/math/sqrt.cc \ | ||
1565 | 530 | drizzled/function/math/tan.cc \ | ||
1566 | 531 | drizzled/function/min_max.cc \ | ||
1567 | 532 | drizzled/function/num1.cc \ | ||
1568 | 533 | drizzled/function/num_op.cc \ | ||
1569 | 534 | drizzled/function/numhybrid.cc \ | ||
1570 | 535 | drizzled/function/row_count.cc \ | ||
1571 | 536 | drizzled/function/set_user_var.cc \ | ||
1572 | 537 | drizzled/function/sign.cc \ | ||
1573 | 538 | drizzled/function/str/alloc_buffer.cc \ | ||
1574 | 539 | drizzled/function/str/binary.cc \ | ||
1575 | 540 | drizzled/function/str/char.cc \ | ||
1576 | 541 | drizzled/function/str/collation.cc \ | ||
1577 | 542 | drizzled/function/str/concat.cc \ | ||
1578 | 543 | drizzled/function/str/conv.cc \ | ||
1579 | 544 | drizzled/function/str/conv_charset.cc \ | ||
1580 | 545 | drizzled/function/str/elt.cc \ | ||
1581 | 546 | drizzled/function/str/export_set.cc \ | ||
1582 | 547 | drizzled/function/str/format.cc \ | ||
1583 | 548 | drizzled/function/str/insert.cc \ | ||
1584 | 549 | drizzled/function/str/left.cc \ | ||
1585 | 550 | drizzled/function/str/load_file.cc \ | ||
1586 | 551 | drizzled/function/str/make_set.cc \ | ||
1587 | 552 | drizzled/function/str/pad.cc \ | ||
1588 | 553 | drizzled/function/str/quote.cc \ | ||
1589 | 554 | drizzled/function/str/repeat.cc \ | ||
1590 | 555 | drizzled/function/str/replace.cc \ | ||
1591 | 556 | drizzled/function/str/right.cc \ | ||
1592 | 557 | drizzled/function/str/set_collation.cc \ | ||
1593 | 558 | drizzled/function/str/str_conv.cc \ | ||
1594 | 559 | drizzled/function/str/strfunc.cc \ | ||
1595 | 560 | drizzled/function/str/trim.cc \ | ||
1596 | 561 | drizzled/function/time/curdate.cc \ | ||
1597 | 562 | drizzled/function/time/date.cc \ | ||
1598 | 563 | drizzled/function/time/date_add_interval.cc \ | ||
1599 | 564 | drizzled/function/time/date_format.cc \ | ||
1600 | 565 | drizzled/function/time/dayname.cc \ | ||
1601 | 566 | drizzled/function/time/dayofmonth.cc \ | ||
1602 | 567 | drizzled/function/time/dayofyear.cc \ | ||
1603 | 568 | drizzled/function/time/extract.cc \ | ||
1604 | 569 | drizzled/function/time/from_days.cc \ | ||
1605 | 570 | drizzled/function/time/from_unixtime.cc \ | ||
1606 | 571 | drizzled/function/time/hour.cc \ | ||
1607 | 572 | drizzled/function/time/last_day.cc \ | ||
1608 | 573 | drizzled/function/time/makedate.cc \ | ||
1609 | 574 | drizzled/function/time/microsecond.cc \ | ||
1610 | 575 | drizzled/function/time/minute.cc \ | ||
1611 | 576 | drizzled/function/time/month.cc \ | ||
1612 | 577 | drizzled/function/time/now.cc \ | ||
1613 | 578 | drizzled/function/time/period_add.cc \ | ||
1614 | 579 | drizzled/function/time/period_diff.cc \ | ||
1615 | 580 | drizzled/function/time/quarter.cc \ | ||
1616 | 581 | drizzled/function/time/second.cc \ | ||
1617 | 582 | drizzled/function/time/sysdate_local.cc \ | ||
1618 | 583 | drizzled/function/time/timestamp_diff.cc \ | ||
1619 | 584 | drizzled/function/time/to_days.cc \ | ||
1620 | 585 | drizzled/function/time/typecast.cc \ | ||
1621 | 586 | drizzled/function/time/unix_timestamp.cc \ | ||
1622 | 587 | drizzled/function/time/weekday.cc \ | ||
1623 | 588 | drizzled/function/time/year.cc \ | ||
1624 | 589 | drizzled/function/units.cc \ | ||
1625 | 590 | drizzled/function/user_var_as_out_param.cc \ | ||
1626 | 591 | drizzled/ha_commands.cc \ | ||
1627 | 592 | drizzled/hybrid_type_traits.cc \ | ||
1628 | 593 | drizzled/hybrid_type_traits_decimal.cc \ | ||
1629 | 594 | drizzled/hybrid_type_traits_integer.cc \ | ||
1630 | 595 | drizzled/index_hint.cc \ | ||
1631 | 596 | drizzled/item.cc \ | ||
1632 | 597 | drizzled/item/bin_string.cc \ | ||
1633 | 598 | drizzled/item/cache.cc \ | ||
1634 | 599 | drizzled/item/cache_decimal.cc \ | ||
1635 | 600 | drizzled/item/cache_int.cc \ | ||
1636 | 601 | drizzled/item/cache_real.cc \ | ||
1637 | 602 | drizzled/item/cache_row.cc \ | ||
1638 | 603 | drizzled/item/cache_str.cc \ | ||
1639 | 604 | drizzled/item/cmpfunc.cc \ | ||
1640 | 605 | drizzled/item/copy_string.cc \ | ||
1641 | 606 | drizzled/item/create.cc \ | ||
1642 | 607 | drizzled/item/decimal.cc \ | ||
1643 | 608 | drizzled/item/default_value.cc \ | ||
1644 | 609 | drizzled/item/direct_ref.cc \ | ||
1645 | 610 | drizzled/item/empty_string.cc \ | ||
1646 | 611 | drizzled/item/field.cc \ | ||
1647 | 612 | drizzled/item/float.cc \ | ||
1648 | 613 | drizzled/item/hex_string.cc \ | ||
1649 | 614 | drizzled/item/ident.cc \ | ||
1650 | 615 | drizzled/item/insert_value.cc \ | ||
1651 | 616 | drizzled/item/int.cc \ | ||
1652 | 617 | drizzled/item/int_with_ref.cc \ | ||
1653 | 618 | drizzled/item/null.cc \ | ||
1654 | 619 | drizzled/item/num.cc \ | ||
1655 | 620 | drizzled/item/outer_ref.cc \ | ||
1656 | 621 | drizzled/item/ref.cc \ | ||
1657 | 622 | drizzled/item/ref_null_helper.cc \ | ||
1658 | 623 | drizzled/item/row.cc \ | ||
1659 | 624 | drizzled/item/string.cc \ | ||
1660 | 625 | drizzled/item/subselect.cc \ | ||
1661 | 626 | drizzled/item/sum.cc \ | ||
1662 | 627 | drizzled/item/type_holder.cc \ | ||
1663 | 628 | drizzled/item/uint.cc \ | ||
1664 | 629 | drizzled/join.cc \ | ||
1665 | 630 | drizzled/join_cache.cc \ | ||
1666 | 631 | drizzled/join_table.cc \ | ||
1667 | 632 | drizzled/key.cc \ | ||
1668 | 633 | drizzled/key_map.cc \ | ||
1669 | 634 | drizzled/lock.cc \ | ||
1670 | 635 | drizzled/lookup_symbol.cc \ | ||
1671 | 636 | drizzled/my_getsystime.cc \ | ||
1672 | 637 | drizzled/my_hash.cc \ | ||
1673 | 638 | drizzled/drizzle_time.cc \ | ||
1674 | 639 | drizzled/tree.cc \ | ||
1675 | 640 | drizzled/name_resolution_context_state.cc \ | ||
1676 | 641 | drizzled/natural_join_column.cc \ | ||
1677 | 642 | drizzled/optimizer/explain_plan.cc \ | ||
1678 | 643 | drizzled/optimizer/key_field.cc \ | ||
1679 | 644 | drizzled/optimizer/quick_group_min_max_select.cc \ | ||
1680 | 645 | drizzled/optimizer/quick_index_merge_select.cc \ | ||
1681 | 646 | drizzled/optimizer/quick_range.cc \ | ||
1682 | 647 | drizzled/optimizer/quick_range_select.cc \ | ||
1683 | 648 | drizzled/optimizer/quick_ror_intersect_select.cc \ | ||
1684 | 649 | drizzled/optimizer/quick_ror_union_select.cc \ | ||
1685 | 650 | drizzled/optimizer/range.cc \ | ||
1686 | 651 | drizzled/optimizer/sel_arg.cc \ | ||
1687 | 652 | drizzled/optimizer/sel_imerge.cc \ | ||
1688 | 653 | drizzled/optimizer/sel_tree.cc \ | ||
1689 | 654 | drizzled/optimizer/sum.cc \ | ||
1690 | 655 | drizzled/plugin/authentication.cc \ | ||
1691 | 656 | drizzled/plugin/authorization.cc \ | ||
1692 | 657 | drizzled/plugin/client.cc \ | ||
1693 | 658 | drizzled/plugin/error_message.cc \ | ||
1694 | 659 | drizzled/plugin/function.cc \ | ||
1695 | 660 | drizzled/plugin/library.cc \ | ||
1696 | 661 | drizzled/plugin/listen.cc \ | ||
1697 | 662 | drizzled/plugin/listen_tcp.cc \ | ||
1698 | 663 | drizzled/plugin/loader.cc \ | ||
1699 | 664 | drizzled/plugin/logging.cc \ | ||
1700 | 665 | drizzled/plugin/monitored_in_transaction.cc \ | ||
1701 | 666 | drizzled/plugin/plugin.cc \ | ||
1702 | 667 | drizzled/plugin/query_cache.cc \ | ||
1703 | 668 | drizzled/plugin/query_rewrite.cc \ | ||
1704 | 669 | drizzled/plugin/registry.cc \ | ||
1705 | 670 | drizzled/plugin/scheduler.cc \ | ||
1706 | 671 | drizzled/plugin/schema_engine.cc \ | ||
1707 | 672 | drizzled/plugin/storage_engine.cc \ | ||
1708 | 673 | drizzled/plugin/table_function.cc \ | ||
1709 | 674 | drizzled/plugin/transaction_applier.cc \ | ||
1710 | 675 | drizzled/plugin/transaction_replicator.cc \ | ||
1711 | 676 | drizzled/plugin/transactional_storage_engine.cc \ | ||
1712 | 677 | drizzled/plugin/xa_resource_manager.cc \ | ||
1713 | 678 | drizzled/plugin/xa_storage_engine.cc \ | ||
1714 | 679 | drizzled/query_id.cc \ | ||
1715 | 680 | drizzled/records.cc \ | ||
1716 | 681 | drizzled/replication_services.cc \ | ||
1717 | 682 | drizzled/resource_context.cc \ | ||
1718 | 683 | drizzled/schema_identifier.cc \ | ||
1719 | 684 | drizzled/session.cc \ | ||
1720 | 685 | drizzled/session_list.cc \ | ||
1721 | 686 | drizzled/set_var.cc \ | ||
1722 | 687 | drizzled/show.cc \ | ||
1723 | 688 | drizzled/sql_base.cc \ | ||
1724 | 689 | drizzled/sql_bitmap.cc \ | ||
1725 | 690 | drizzled/sql_delete.cc \ | ||
1726 | 691 | drizzled/sql_derived.cc \ | ||
1727 | 692 | drizzled/sql_error.cc \ | ||
1728 | 693 | drizzled/sql_insert.cc \ | ||
1729 | 694 | drizzled/sql_lex.cc \ | ||
1730 | 695 | drizzled/sql_list.cc \ | ||
1731 | 696 | drizzled/sql_load.cc \ | ||
1732 | 697 | drizzled/sql_locale.cc \ | ||
1733 | 698 | drizzled/sql_parse.cc \ | ||
1734 | 699 | drizzled/sql_select.cc \ | ||
1735 | 700 | drizzled/sql_state.cc \ | ||
1736 | 701 | drizzled/sql_string.cc \ | ||
1737 | 702 | drizzled/sql_table.cc \ | ||
1738 | 703 | drizzled/sql_union.cc \ | ||
1739 | 704 | drizzled/sql_update.cc \ | ||
1740 | 705 | drizzled/sql_yacc.yy \ | ||
1741 | 706 | drizzled/stacktrace.cc \ | ||
1742 | 707 | drizzled/statement/alter_schema.cc \ | ||
1743 | 708 | drizzled/statement/alter_table.cc \ | ||
1744 | 709 | drizzled/statement/analyze.cc \ | ||
1745 | 710 | drizzled/statement/change_schema.cc \ | ||
1746 | 711 | drizzled/statement/check.cc \ | ||
1747 | 712 | drizzled/statement/commit.cc \ | ||
1748 | 713 | drizzled/statement/create_index.cc \ | ||
1749 | 714 | drizzled/statement/create_schema.cc \ | ||
1750 | 715 | drizzled/statement/create_table.cc \ | ||
1751 | 716 | drizzled/statement/delete.cc \ | ||
1752 | 717 | drizzled/statement/drop_index.cc \ | ||
1753 | 718 | drizzled/statement/drop_schema.cc \ | ||
1754 | 719 | drizzled/statement/drop_table.cc \ | ||
1755 | 720 | drizzled/statement/empty_query.cc \ | ||
1756 | 721 | drizzled/statement/flush.cc \ | ||
1757 | 722 | drizzled/statement/insert.cc \ | ||
1758 | 723 | drizzled/statement/insert_select.cc \ | ||
1759 | 724 | drizzled/statement/kill.cc \ | ||
1760 | 725 | drizzled/statement/load.cc \ | ||
1761 | 726 | drizzled/statement/release_savepoint.cc \ | ||
1762 | 727 | drizzled/statement/rename_table.cc \ | ||
1763 | 728 | drizzled/statement/replace.cc \ | ||
1764 | 729 | drizzled/statement/replace_select.cc \ | ||
1765 | 730 | drizzled/statement/rollback.cc \ | ||
1766 | 731 | drizzled/statement/rollback_to_savepoint.cc \ | ||
1767 | 732 | drizzled/statement/savepoint.cc \ | ||
1768 | 733 | drizzled/statement/select.cc \ | ||
1769 | 734 | drizzled/statement/set_option.cc \ | ||
1770 | 735 | drizzled/statement/show_create.cc \ | ||
1771 | 736 | drizzled/statement/show_create_schema.cc \ | ||
1772 | 737 | drizzled/statement/show_errors.cc \ | ||
1773 | 738 | drizzled/statement/show_warnings.cc \ | ||
1774 | 739 | drizzled/statement/start_transaction.cc \ | ||
1775 | 740 | drizzled/statement/truncate.cc \ | ||
1776 | 741 | drizzled/statement/unlock_tables.cc \ | ||
1777 | 742 | drizzled/statement/update.cc \ | ||
1778 | 743 | drizzled/strfunc.cc \ | ||
1779 | 744 | drizzled/table.cc \ | ||
1780 | 745 | drizzled/table_function_container.cc \ | ||
1781 | 746 | drizzled/table_identifier.cc \ | ||
1782 | 747 | drizzled/table_list.cc \ | ||
1783 | 748 | drizzled/table_share.cc \ | ||
1784 | 749 | drizzled/temporal.cc \ | ||
1785 | 750 | drizzled/temporal_format.cc \ | ||
1786 | 751 | drizzled/temporal_interval.cc \ | ||
1787 | 752 | drizzled/thr_lock.cc \ | ||
1788 | 753 | drizzled/time_functions.cc \ | ||
1789 | 754 | drizzled/transaction_services.cc \ | ||
1790 | 755 | drizzled/tztime.cc \ | ||
1791 | 756 | drizzled/uniques.cc \ | ||
1792 | 757 | drizzled/user_var_entry.cc \ | ||
1793 | 758 | drizzled/version.cc \ | ||
1794 | 759 | drizzled/xid.cc | ||
1795 | 760 | |||
1796 | 761 | noinst_LTLIBRARIES+= \ | 773 | noinst_LTLIBRARIES+= \ |
1797 | 762 | drizzled/libcached_directory.la \ | 774 | drizzled/libcached_directory.la \ |
1798 | 763 | drizzled/libcharset.la \ | 775 | drizzled/libcharset.la \ |
1799 | 764 | 776 | ||
1800 | === modified file 'drizzled/internal/include.am' | |||
1801 | --- drizzled/internal/include.am 2010-02-04 08:14:46 +0000 | |||
1802 | +++ drizzled/internal/include.am 2010-04-19 20:33:26 +0000 | |||
1803 | @@ -34,7 +34,8 @@ | |||
1804 | 34 | drizzled/liberror.la \ | 34 | drizzled/liberror.la \ |
1805 | 35 | drizzled/libgetopt.la \ | 35 | drizzled/libgetopt.la \ |
1806 | 36 | drizzled/libmemory.la \ | 36 | drizzled/libmemory.la \ |
1808 | 37 | drizzled/libtypelib.la | 37 | drizzled/libtypelib.la \ |
1809 | 38 | drizzled/libserialutil.la | ||
1810 | 38 | 39 | ||
1811 | 39 | drizzled_internal_libinternal_la_SOURCES= \ | 40 | drizzled_internal_libinternal_la_SOURCES= \ |
1812 | 40 | drizzled/internal/bmove_upp.cc \ | 41 | drizzled/internal/bmove_upp.cc \ |
1813 | 41 | 42 | ||
1814 | === modified file 'drizzled/internal/my_pthread.h' | |||
1815 | --- drizzled/internal/my_pthread.h 2010-02-04 08:14:46 +0000 | |||
1816 | +++ drizzled/internal/my_pthread.h 2010-04-19 20:33:26 +0000 | |||
1817 | @@ -19,7 +19,6 @@ | |||
1818 | 19 | #define DRIZZLED_INTERNAL_MY_PTHREAD_H | 19 | #define DRIZZLED_INTERNAL_MY_PTHREAD_H |
1819 | 20 | 20 | ||
1820 | 21 | #include <unistd.h> | 21 | #include <unistd.h> |
1821 | 22 | #include <signal.h> | ||
1822 | 23 | 22 | ||
1823 | 24 | #ifndef ETIME | 23 | #ifndef ETIME |
1824 | 25 | #define ETIME ETIMEDOUT /* For FreeBSD */ | 24 | #define ETIME ETIMEDOUT /* For FreeBSD */ |
1825 | @@ -45,29 +44,6 @@ | |||
1826 | 45 | #define pthread_handler_t void * | 44 | #define pthread_handler_t void * |
1827 | 46 | typedef void *(* pthread_handler)(void *); | 45 | typedef void *(* pthread_handler)(void *); |
1828 | 47 | 46 | ||
1829 | 48 | |||
1830 | 49 | /* | ||
1831 | 50 | We define my_sigset() and use that instead of the system sigset() so that | ||
1832 | 51 | we can favor an implementation based on sigaction(). On some systems, such | ||
1833 | 52 | as Mac OS X, sigset() results in flags such as SA_RESTART being set, and | ||
1834 | 53 | we want to make sure that no such flags are set. | ||
1835 | 54 | */ | ||
1836 | 55 | #if !defined(my_sigset) | ||
1837 | 56 | #define my_sigset(A,B) do { struct sigaction l_s; sigset_t l_set; int l_rc; \ | ||
1838 | 57 | assert((A) != 0); \ | ||
1839 | 58 | sigemptyset(&l_set); \ | ||
1840 | 59 | l_s.sa_handler = (B); \ | ||
1841 | 60 | l_s.sa_mask = l_set; \ | ||
1842 | 61 | l_s.sa_flags = 0; \ | ||
1843 | 62 | l_rc= sigaction((A), &l_s, (struct sigaction *) NULL);\ | ||
1844 | 63 | assert(l_rc == 0); \ | ||
1845 | 64 | } while (0) | ||
1846 | 65 | #elif defined(HAVE_SIGSET) && !defined(my_sigset) | ||
1847 | 66 | #define my_sigset(A,B) sigset((A),(B)) | ||
1848 | 67 | #elif !defined(my_sigset) | ||
1849 | 68 | #define my_sigset(A,B) signal((A),(B)) | ||
1850 | 69 | #endif | ||
1851 | 70 | |||
1852 | 71 | #ifndef my_pthread_attr_setprio | 47 | #ifndef my_pthread_attr_setprio |
1853 | 72 | #ifdef HAVE_PTHREAD_ATTR_SETPRIO | 48 | #ifdef HAVE_PTHREAD_ATTR_SETPRIO |
1854 | 73 | #define my_pthread_attr_setprio(A,B) pthread_attr_setprio((A),(B)) | 49 | #define my_pthread_attr_setprio(A,B) pthread_attr_setprio((A),(B)) |
1855 | 74 | 50 | ||
1856 | === added file 'drizzled/main.cc' | |||
1857 | --- drizzled/main.cc 1970-01-01 00:00:00 +0000 | |||
1858 | +++ drizzled/main.cc 2010-04-19 20:33:26 +0000 | |||
1859 | @@ -0,0 +1,328 @@ | |||
1860 | 1 | /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
1861 | 2 | * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
1862 | 3 | * | ||
1863 | 4 | * Copyright (C) 2008 Sun Microsystems | ||
1864 | 5 | * | ||
1865 | 6 | * This program is free software; you can redistribute it and/or modify | ||
1866 | 7 | * it under the terms of the GNU General Public License as published by | ||
1867 | 8 | * the Free Software Foundation; version 2 of the License. | ||
1868 | 9 | * | ||
1869 | 10 | * This program is distributed in the hope that it will be useful, | ||
1870 | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1871 | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1872 | 13 | * GNU General Public License for more details. | ||
1873 | 14 | * | ||
1874 | 15 | * You should have received a copy of the GNU General Public License | ||
1875 | 16 | * along with this program; if not, write to the Free Software | ||
1876 | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
1877 | 18 | */ | ||
1878 | 19 | |||
1879 | 20 | #include "config.h" | ||
1880 | 21 | |||
1881 | 22 | #include <pthread.h> | ||
1882 | 23 | #include <signal.h> | ||
1883 | 24 | #include <sys/resource.h> | ||
1884 | 25 | #include <unistd.h> | ||
1885 | 26 | |||
1886 | 27 | #if TIME_WITH_SYS_TIME | ||
1887 | 28 | # include <sys/time.h> | ||
1888 | 29 | # include <time.h> | ||
1889 | 30 | #else | ||
1890 | 31 | # if HAVE_SYS_TIME_H | ||
1891 | 32 | # include <sys/time.h> | ||
1892 | 33 | # else | ||
1893 | 34 | # include <time.h> | ||
1894 | 35 | # endif | ||
1895 | 36 | #endif | ||
1896 | 37 | |||
1897 | 38 | #if defined(HAVE_LOCALE_H) | ||
1898 | 39 | # include <locale.h> | ||
1899 | 40 | #endif | ||
1900 | 41 | |||
1901 | 42 | |||
1902 | 43 | #include "drizzled/plugin.h" | ||
1903 | 44 | #include "drizzled/gettext.h" | ||
1904 | 45 | #include "drizzled/configmake.h" | ||
1905 | 46 | #include "drizzled/session.h" | ||
1906 | 47 | #include "drizzled/internal/my_sys.h" | ||
1907 | 48 | #include "drizzled/unireg.h" | ||
1908 | 49 | #include "drizzled/stacktrace.h" | ||
1909 | 50 | #include "drizzled/drizzled.h" | ||
1910 | 51 | #include "drizzled/errmsg_print.h" | ||
1911 | 52 | #include "drizzled/data_home.h" | ||
1912 | 53 | #include "drizzled/plugin/listen.h" | ||
1913 | 54 | #include "drizzled/plugin/client.h" | ||
1914 | 55 | #include "drizzled/pthread_globals.h" | ||
1915 | 56 | #include "drizzled/tztime.h" | ||
1916 | 57 | #include "drizzled/signal_handler.h" | ||
1917 | 58 | #include "drizzled/replication_services.h" | ||
1918 | 59 | |||
1919 | 60 | using namespace drizzled; | ||
1920 | 61 | using namespace std; | ||
1921 | 62 | |||
1922 | 63 | static pthread_t select_thread; | ||
1923 | 64 | static uint32_t thr_kill_signal; | ||
1924 | 65 | |||
1925 | 66 | /** | ||
1926 | 67 | All global error messages are sent here where the first one is stored | ||
1927 | 68 | for the client. | ||
1928 | 69 | */ | ||
1929 | 70 | static void my_message_sql(uint32_t error, const char *str, myf MyFlags) | ||
1930 | 71 | { | ||
1931 | 72 | Session *session; | ||
1932 | 73 | /* | ||
1933 | 74 | Put here following assertion when situation with EE_* error codes | ||
1934 | 75 | will be fixed | ||
1935 | 76 | */ | ||
1936 | 77 | if ((session= current_session)) | ||
1937 | 78 | { | ||
1938 | 79 | if (MyFlags & ME_FATALERROR) | ||
1939 | 80 | session->is_fatal_error= 1; | ||
1940 | 81 | |||
1941 | 82 | /* | ||
1942 | 83 | TODO: There are two exceptions mechanism (Session and sp_rcontext), | ||
1943 | 84 | this could be improved by having a common stack of handlers. | ||
1944 | 85 | */ | ||
1945 | 86 | if (session->handle_error(error, str, | ||
1946 | 87 | DRIZZLE_ERROR::WARN_LEVEL_ERROR)) | ||
1947 | 88 | return;; | ||
1948 | 89 | |||
1949 | 90 | /* | ||
1950 | 91 | session->lex->current_select == 0 if lex structure is not inited | ||
1951 | 92 | (not query command (COM_QUERY)) | ||
1952 | 93 | */ | ||
1953 | 94 | if (! (session->lex->current_select && | ||
1954 | 95 | session->lex->current_select->no_error && !session->is_fatal_error)) | ||
1955 | 96 | { | ||
1956 | 97 | if (! session->main_da.is_error()) // Return only first message | ||
1957 | 98 | { | ||
1958 | 99 | if (error == 0) | ||
1959 | 100 | error= ER_UNKNOWN_ERROR; | ||
1960 | 101 | if (str == NULL) | ||
1961 | 102 | str= ER(error); | ||
1962 | 103 | session->main_da.set_error_status(error, str); | ||
1963 | 104 | } | ||
1964 | 105 | } | ||
1965 | 106 | |||
1966 | 107 | if (!session->no_warnings_for_error && !session->is_fatal_error) | ||
1967 | 108 | { | ||
1968 | 109 | /* | ||
1969 | 110 | Suppress infinite recursion if there a memory allocation error | ||
1970 | 111 | inside push_warning. | ||
1971 | 112 | */ | ||
1972 | 113 | session->no_warnings_for_error= true; | ||
1973 | 114 | push_warning(session, DRIZZLE_ERROR::WARN_LEVEL_ERROR, error, str); | ||
1974 | 115 | session->no_warnings_for_error= false; | ||
1975 | 116 | } | ||
1976 | 117 | } | ||
1977 | 118 | if (!session || MyFlags & ME_NOREFRESH) | ||
1978 | 119 | errmsg_printf(ERRMSG_LVL_ERROR, "%s: %s",internal::my_progname,str); | ||
1979 | 120 | } | ||
1980 | 121 | |||
1981 | 122 | static void init_signals(void) | ||
1982 | 123 | { | ||
1983 | 124 | sigset_t set; | ||
1984 | 125 | struct sigaction sa; | ||
1985 | 126 | |||
1986 | 127 | if (!(test_flags.test(TEST_NO_STACKTRACE) || | ||
1987 | 128 | test_flags.test(TEST_CORE_ON_SIGNAL))) | ||
1988 | 129 | { | ||
1989 | 130 | sa.sa_flags = SA_RESETHAND | SA_NODEFER; | ||
1990 | 131 | sigemptyset(&sa.sa_mask); | ||
1991 | 132 | sigprocmask(SIG_SETMASK,&sa.sa_mask,NULL); | ||
1992 | 133 | |||
1993 | 134 | init_stacktrace(); | ||
1994 | 135 | sa.sa_handler= drizzled_handle_segfault; | ||
1995 | 136 | sigaction(SIGSEGV, &sa, NULL); | ||
1996 | 137 | sigaction(SIGABRT, &sa, NULL); | ||
1997 | 138 | #ifdef SIGBUS | ||
1998 | 139 | sigaction(SIGBUS, &sa, NULL); | ||
1999 | 140 | #endif | ||
2000 | 141 | sigaction(SIGILL, &sa, NULL); | ||
2001 | 142 | sigaction(SIGFPE, &sa, NULL); | ||
2002 | 143 | } | ||
2003 | 144 | |||
2004 | 145 | if (test_flags.test(TEST_CORE_ON_SIGNAL)) | ||
2005 | 146 | { | ||
2006 | 147 | /* Change limits so that we will get a core file */ | ||
2007 | 148 | struct rlimit rl; | ||
2008 | 149 | rl.rlim_cur = rl.rlim_max = RLIM_INFINITY; | ||
2009 | 150 | if (setrlimit(RLIMIT_CORE, &rl) && global_system_variables.log_warnings) | ||
2010 | 151 | errmsg_printf(ERRMSG_LVL_WARN, | ||
2011 | 152 | _("setrlimit could not change the size of core files " | ||
2012 | 153 | "to 'infinity'; We may not be able to generate a " | ||
2013 | 154 | "core file on signals")); | ||
2014 | 155 | } | ||
2015 | 156 | (void) sigemptyset(&set); | ||
2016 | 157 | ignore_signal(SIGPIPE); | ||
2017 | 158 | sigaddset(&set,SIGPIPE); | ||
2018 | 159 | #ifndef IGNORE_SIGHUP_SIGQUIT | ||
2019 | 160 | sigaddset(&set,SIGQUIT); | ||
2020 | 161 | sigaddset(&set,SIGHUP); | ||
2021 | 162 | #endif | ||
2022 | 163 | sigaddset(&set,SIGTERM); | ||
2023 | 164 | |||
2024 | 165 | /* Fix signals if blocked by parents (can happen on Mac OS X) */ | ||
2025 | 166 | sigemptyset(&sa.sa_mask); | ||
2026 | 167 | sa.sa_flags = 0; | ||
2027 | 168 | sa.sa_handler = drizzled_print_signal_warning; | ||
2028 | 169 | sigaction(SIGTERM, &sa, NULL); | ||
2029 | 170 | sa.sa_flags = 0; | ||
2030 | 171 | sa.sa_handler = drizzled_print_signal_warning; | ||
2031 | 172 | sigaction(SIGHUP, &sa, NULL); | ||
2032 | 173 | #ifdef SIGTSTP | ||
2033 | 174 | sigaddset(&set,SIGTSTP); | ||
2034 | 175 | #endif | ||
2035 | 176 | if (test_flags.test(TEST_SIGINT)) | ||
2036 | 177 | { | ||
2037 | 178 | sa.sa_flags= 0; | ||
2038 | 179 | sa.sa_handler= drizzled_end_thread_signal; | ||
2039 | 180 | sigaction(thr_kill_signal, &sa, NULL); | ||
2040 | 181 | |||
2041 | 182 | // May be SIGINT | ||
2042 | 183 | sigdelset(&set, thr_kill_signal); | ||
2043 | 184 | } | ||
2044 | 185 | else | ||
2045 | 186 | sigaddset(&set,SIGINT); | ||
2046 | 187 | sigprocmask(SIG_SETMASK,&set,NULL); | ||
2047 | 188 | pthread_sigmask(SIG_SETMASK,&set,NULL); | ||
2048 | 189 | return; | ||
2049 | 190 | } | ||
2050 | 191 | |||
2051 | 192 | |||
2052 | 193 | int main(int argc, char **argv) | ||
2053 | 194 | { | ||
2054 | 195 | #if defined(ENABLE_NLS) | ||
2055 | 196 | # if defined(HAVE_LOCALE_H) | ||
2056 | 197 | setlocale(LC_ALL, ""); | ||
2057 | 198 | # endif | ||
2058 | 199 | bindtextdomain("drizzle", LOCALEDIR); | ||
2059 | 200 | textdomain("drizzle"); | ||
2060 | 201 | #endif | ||
2061 | 202 | |||
2062 | 203 | plugin::Registry &plugins= plugin::Registry::singleton(); | ||
2063 | 204 | plugin::Client *client; | ||
2064 | 205 | Session *session; | ||
2065 | 206 | |||
2066 | 207 | MY_INIT(argv[0]); // init my_sys library & pthreads | ||
2067 | 208 | /* nothing should come before this line ^^^ */ | ||
2068 | 209 | |||
2069 | 210 | /* Set signal used to kill Drizzle */ | ||
2070 | 211 | #if defined(SIGUSR2) | ||
2071 | 212 | thr_kill_signal= internal::thd_lib_detected == THD_LIB_LT ? SIGINT : SIGUSR2; | ||
2072 | 213 | #else | ||
2073 | 214 | thr_kill_signal= SIGINT; | ||
2074 | 215 | #endif | ||
2075 | 216 | |||
2076 | 217 | if (init_common_variables(DRIZZLE_CONFIG_NAME, | ||
2077 | 218 | argc, argv, load_default_groups)) | ||
2078 | 219 | unireg_abort(1); // Will do exit | ||
2079 | 220 | |||
2080 | 221 | init_signals(); | ||
2081 | 222 | |||
2082 | 223 | |||
2083 | 224 | select_thread=pthread_self(); | ||
2084 | 225 | select_thread_in_use=1; | ||
2085 | 226 | |||
2086 | 227 | if (chdir(data_home_real) && !opt_help) | ||
2087 | 228 | { | ||
2088 | 229 | errmsg_printf(ERRMSG_LVL_ERROR, _("Data directory %s does not exist\n"), data_home_real); | ||
2089 | 230 | unireg_abort(1); | ||
2090 | 231 | } | ||
2091 | 232 | data_home= data_home_buff; | ||
2092 | 233 | data_home[0]=FN_CURLIB; // all paths are relative from here | ||
2093 | 234 | data_home[1]=0; | ||
2094 | 235 | data_home_len= 2; | ||
2095 | 236 | |||
2096 | 237 | if ((user_info= check_user(drizzled_user))) | ||
2097 | 238 | { | ||
2098 | 239 | set_user(drizzled_user, user_info); | ||
2099 | 240 | } | ||
2100 | 241 | |||
2101 | 242 | if (server_id == 0) | ||
2102 | 243 | { | ||
2103 | 244 | server_id= 1; | ||
2104 | 245 | } | ||
2105 | 246 | |||
2106 | 247 | if (init_server_components(plugins)) | ||
2107 | 248 | unireg_abort(1); | ||
2108 | 249 | |||
2109 | 250 | /** | ||
2110 | 251 | * This check must be done after init_server_components for now | ||
2111 | 252 | * because we don't yet have plugin dependency tracking... | ||
2112 | 253 | * | ||
2113 | 254 | * ReplicationServices::evaluateRegisteredPlugins() will print error messages to stderr | ||
2114 | 255 | * via errmsg_printf(). | ||
2115 | 256 | * | ||
2116 | 257 | * @todo | ||
2117 | 258 | * | ||
2118 | 259 | * not checking return since unireg_abort() hangs | ||
2119 | 260 | */ | ||
2120 | 261 | ReplicationServices &replication_services= ReplicationServices::singleton(); | ||
2121 | 262 | (void) replication_services.evaluateRegisteredPlugins(); | ||
2122 | 263 | |||
2123 | 264 | if (plugin::Listen::setup()) | ||
2124 | 265 | unireg_abort(1); | ||
2125 | 266 | |||
2126 | 267 | /* | ||
2127 | 268 | init signals & alarm | ||
2128 | 269 | After this we can't quit by a simple unireg_abort | ||
2129 | 270 | */ | ||
2130 | 271 | error_handler_hook= my_message_sql; | ||
2131 | 272 | |||
2132 | 273 | assert(plugin::num_trx_monitored_objects > 0); | ||
2133 | 274 | if (drizzle_rm_tmp_tables() || | ||
2134 | 275 | my_tz_init((Session *)0, default_tz_name)) | ||
2135 | 276 | { | ||
2136 | 277 | abort_loop= true; | ||
2137 | 278 | select_thread_in_use=0; | ||
2138 | 279 | (void) pthread_kill(signal_thread, SIGTERM); | ||
2139 | 280 | |||
2140 | 281 | (void) unlink(pidfile_name); // Not needed anymore | ||
2141 | 282 | |||
2142 | 283 | exit(1); | ||
2143 | 284 | } | ||
2144 | 285 | |||
2145 | 286 | init_status_vars(); | ||
2146 | 287 | |||
2147 | 288 | errmsg_printf(ERRMSG_LVL_INFO, _(ER(ER_STARTUP)), internal::my_progname, | ||
2148 | 289 | PANDORA_RELEASE_VERSION, COMPILATION_COMMENT); | ||
2149 | 290 | |||
2150 | 291 | |||
2151 | 292 | /* Listen for new connections and start new session for each connection | ||
2152 | 293 | accepted. The listen.getClient() method will return NULL when the server | ||
2153 | 294 | should be shutdown. */ | ||
2154 | 295 | while ((client= plugin::Listen::getClient()) != NULL) | ||
2155 | 296 | { | ||
2156 | 297 | if (!(session= new Session(client))) | ||
2157 | 298 | { | ||
2158 | 299 | delete client; | ||
2159 | 300 | continue; | ||
2160 | 301 | } | ||
2161 | 302 | |||
2162 | 303 | /* If we error on creation we drop the connection and delete the session. */ | ||
2163 | 304 | if (session->schedule()) | ||
2164 | 305 | Session::unlink(session); | ||
2165 | 306 | } | ||
2166 | 307 | |||
2167 | 308 | /* (void) pthread_attr_destroy(&connection_attrib); */ | ||
2168 | 309 | |||
2169 | 310 | |||
2170 | 311 | (void) pthread_mutex_lock(&LOCK_thread_count); | ||
2171 | 312 | select_thread_in_use=0; // For close_connections | ||
2172 | 313 | (void) pthread_mutex_unlock(&LOCK_thread_count); | ||
2173 | 314 | (void) pthread_cond_broadcast(&COND_thread_count); | ||
2174 | 315 | |||
2175 | 316 | /* Wait until cleanup is done */ | ||
2176 | 317 | (void) pthread_mutex_lock(&LOCK_thread_count); | ||
2177 | 318 | while (!ready_to_exit) | ||
2178 | 319 | pthread_cond_wait(&COND_server_end,&LOCK_thread_count); | ||
2179 | 320 | (void) pthread_mutex_unlock(&LOCK_thread_count); | ||
2180 | 321 | |||
2181 | 322 | clean_up(1); | ||
2182 | 323 | plugin::Registry::shutdown(); | ||
2183 | 324 | clean_up_mutexes(); | ||
2184 | 325 | internal::my_end(); | ||
2185 | 326 | return 0; | ||
2186 | 327 | } | ||
2187 | 328 | |||
2188 | 0 | 329 | ||
2189 | === modified file 'drizzled/message/include.am' | |||
2190 | --- drizzled/message/include.am 2010-02-24 00:03:28 +0000 | |||
2191 | +++ drizzled/message/include.am 2010-04-19 20:33:26 +0000 | |||
2192 | @@ -35,11 +35,12 @@ | |||
2193 | 35 | drizzled/message/transaction_reader \ | 35 | drizzled/message/transaction_reader \ |
2194 | 36 | drizzled/message/transaction_writer | 36 | drizzled/message/transaction_writer |
2195 | 37 | 37 | ||
2197 | 38 | noinst_LTLIBRARIES += drizzled/message/libdrizzledmessage.la | 38 | lib_LTLIBRARIES += drizzled/message/libdrizzledmessage.la |
2198 | 39 | 39 | ||
2199 | 40 | drizzled_message_libdrizzledmessage_la_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS} ${NO_WERROR} | 40 | drizzled_message_libdrizzledmessage_la_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS} ${NO_WERROR} |
2200 | 41 | 41 | ||
2201 | 42 | drizzled_message_libdrizzledmessage_la_SOURCES = drizzled/message/statement_transform.cc | 42 | drizzled_message_libdrizzledmessage_la_SOURCES = drizzled/message/statement_transform.cc |
2202 | 43 | drizzled_message_libdrizzledmessage_la_LIBADD= ${LTLIBPROTOBUF} | ||
2203 | 43 | 44 | ||
2204 | 44 | nobase_dist_include_HEADERS+= drizzled/message/statement_transform.h | 45 | nobase_dist_include_HEADERS+= drizzled/message/statement_transform.h |
2205 | 45 | 46 | ||
2206 | @@ -88,11 +89,11 @@ | |||
2207 | 88 | drizzled_message_master_list_reader_LDADD = ${MESSAGE_LDADD} | 89 | drizzled_message_master_list_reader_LDADD = ${MESSAGE_LDADD} |
2208 | 89 | drizzled_message_master_list_reader_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS} | 90 | drizzled_message_master_list_reader_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS} |
2209 | 90 | 91 | ||
2211 | 91 | drizzled_message_transaction_writer_SOURCES = drizzled/message/transaction_writer.cc drizzled/message/transaction.pb.cc | 92 | drizzled_message_transaction_writer_SOURCES = drizzled/message/transaction_writer.cc |
2212 | 92 | drizzled_message_transaction_writer_LDADD = ${MESSAGE_LDADD} ${top_builddir}/drizzled/algorithm/libhash.la | 93 | drizzled_message_transaction_writer_LDADD = ${MESSAGE_LDADD} ${top_builddir}/drizzled/algorithm/libhash.la |
2213 | 93 | drizzled_message_transaction_writer_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS} ${NO_WERROR} | 94 | drizzled_message_transaction_writer_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS} ${NO_WERROR} |
2214 | 94 | 95 | ||
2216 | 95 | drizzled_message_transaction_reader_SOURCES = drizzled/message/transaction_reader.cc drizzled/message/transaction.pb.cc | 96 | drizzled_message_transaction_reader_SOURCES = drizzled/message/transaction_reader.cc |
2217 | 96 | drizzled_message_transaction_reader_LDADD = ${MESSAGE_LDADD} ${top_builddir}/drizzled/algorithm/libhash.la ${top_builddir}/drizzled/util/libutil.la | 97 | drizzled_message_transaction_reader_LDADD = ${MESSAGE_LDADD} ${top_builddir}/drizzled/algorithm/libhash.la ${top_builddir}/drizzled/util/libutil.la |
2218 | 97 | drizzled_message_transaction_reader_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS} ${NO_WERROR} | 98 | drizzled_message_transaction_reader_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS} ${NO_WERROR} |
2219 | 98 | 99 | ||
2220 | 99 | 100 | ||
2221 | === modified file 'drizzled/optimizer/range.cc' | |||
2222 | --- drizzled/optimizer/range.cc 2010-03-22 05:47:41 +0000 | |||
2223 | +++ drizzled/optimizer/range.cc 2010-04-19 20:33:26 +0000 | |||
2224 | @@ -272,11 +272,6 @@ | |||
2225 | 272 | bool *are_all_covering); | 272 | bool *are_all_covering); |
2226 | 273 | 273 | ||
2227 | 274 | static | 274 | static |
2228 | 275 | optimizer::RorIntersectReadPlan *get_best_covering_ror_intersect(optimizer::Parameter *param, | ||
2229 | 276 | optimizer::SEL_TREE *tree, | ||
2230 | 277 | double read_time); | ||
2231 | 278 | |||
2232 | 279 | static | ||
2233 | 280 | optimizer::TableReadPlan *get_best_disjunct_quick(optimizer::Parameter *param, | 275 | optimizer::TableReadPlan *get_best_disjunct_quick(optimizer::Parameter *param, |
2234 | 281 | optimizer::SEL_IMERGE *imerge, | 276 | optimizer::SEL_IMERGE *imerge, |
2235 | 282 | double read_time); | 277 | double read_time); |
2236 | @@ -816,14 +811,6 @@ | |||
2237 | 816 | { | 811 | { |
2238 | 817 | best_trp= rori_trp; | 812 | best_trp= rori_trp; |
2239 | 818 | best_read_time= best_trp->read_cost; | 813 | best_read_time= best_trp->read_cost; |
2240 | 819 | /* | ||
2241 | 820 | Try constructing covering ROR-intersect only if it looks possible | ||
2242 | 821 | and worth doing. | ||
2243 | 822 | */ | ||
2244 | 823 | if (rori_trp->isRowRetrievalNecessary() && can_build_covering && | ||
2245 | 824 | (rori_trp= get_best_covering_ror_intersect(¶m, tree, | ||
2246 | 825 | best_read_time))) | ||
2247 | 826 | best_trp= rori_trp; | ||
2248 | 827 | } | 814 | } |
2249 | 828 | } | 815 | } |
2250 | 829 | } | 816 | } |
2251 | @@ -1276,40 +1263,6 @@ | |||
2252 | 1276 | return (val1 < val2)? -1: (val1 == val2)? 0 : 1; | 1263 | return (val1 < val2)? -1: (val1 == val2)? 0 : 1; |
2253 | 1277 | } | 1264 | } |
2254 | 1278 | 1265 | ||
2255 | 1279 | /* | ||
2256 | 1280 | Compare two ROR_SCAN_INFO** by | ||
2257 | 1281 | (#covered fields in F desc, | ||
2258 | 1282 | #components asc, | ||
2259 | 1283 | number of first not covered component asc) | ||
2260 | 1284 | |||
2261 | 1285 | SYNOPSIS | ||
2262 | 1286 | cmp_ror_scan_info_covering() | ||
2263 | 1287 | a ptr to first compared value | ||
2264 | 1288 | b ptr to second compared value | ||
2265 | 1289 | |||
2266 | 1290 | RETURN | ||
2267 | 1291 | -1 a < b | ||
2268 | 1292 | 0 a = b | ||
2269 | 1293 | 1 a > b | ||
2270 | 1294 | */ | ||
2271 | 1295 | |||
2272 | 1296 | static int cmp_ror_scan_info_covering(ROR_SCAN_INFO** a, ROR_SCAN_INFO** b) | ||
2273 | 1297 | { | ||
2274 | 1298 | if ((*a)->used_fields_covered > (*b)->used_fields_covered) | ||
2275 | 1299 | return -1; | ||
2276 | 1300 | if ((*a)->used_fields_covered < (*b)->used_fields_covered) | ||
2277 | 1301 | return 1; | ||
2278 | 1302 | if ((*a)->key_components < (*b)->key_components) | ||
2279 | 1303 | return -1; | ||
2280 | 1304 | if ((*a)->key_components > (*b)->key_components) | ||
2281 | 1305 | return 1; | ||
2282 | 1306 | if ((*a)->first_uncovered_field < (*b)->first_uncovered_field) | ||
2283 | 1307 | return -1; | ||
2284 | 1308 | if ((*a)->first_uncovered_field > (*b)->first_uncovered_field) | ||
2285 | 1309 | return 1; | ||
2286 | 1310 | return 0; | ||
2287 | 1311 | } | ||
2288 | 1312 | |||
2289 | 1313 | 1266 | ||
2290 | 1314 | /* Auxiliary structure for incremental ROR-intersection creation */ | 1267 | /* Auxiliary structure for incremental ROR-intersection creation */ |
2291 | 1315 | typedef struct | 1268 | typedef struct |
2292 | @@ -1830,140 +1783,6 @@ | |||
2293 | 1830 | 1783 | ||
2294 | 1831 | 1784 | ||
2295 | 1832 | /* | 1785 | /* |
2296 | 1833 | Get best covering ROR-intersection. | ||
2297 | 1834 | SYNOPSIS | ||
2298 | 1835 | get_best_covering_ror_intersect() | ||
2299 | 1836 | param Parameter from test_quick_select function. | ||
2300 | 1837 | tree optimizer::SEL_TREE with sets of intervals for different keys. | ||
2301 | 1838 | read_time Don't return table read plans with cost > read_time. | ||
2302 | 1839 | |||
2303 | 1840 | RETURN | ||
2304 | 1841 | Best covering ROR-intersection plan | ||
2305 | 1842 | NULL if no plan found. | ||
2306 | 1843 | |||
2307 | 1844 | NOTES | ||
2308 | 1845 | get_best_ror_intersect must be called for a tree before calling this | ||
2309 | 1846 | function for it. | ||
2310 | 1847 | This function invalidates tree->ror_scans member values. | ||
2311 | 1848 | |||
2312 | 1849 | The following approximate algorithm is used: | ||
2313 | 1850 | I=set of all covering indexes | ||
2314 | 1851 | F=set of all fields to cover | ||
2315 | 1852 | S={} | ||
2316 | 1853 | |||
2317 | 1854 | do | ||
2318 | 1855 | { | ||
2319 | 1856 | Order I by (#covered fields in F desc, | ||
2320 | 1857 | #components asc, | ||
2321 | 1858 | number of first not covered component asc); | ||
2322 | 1859 | F=F-covered by first(I); | ||
2323 | 1860 | S=S+first(I); | ||
2324 | 1861 | I=I-first(I); | ||
2325 | 1862 | } while F is not empty. | ||
2326 | 1863 | */ | ||
2327 | 1864 | |||
2328 | 1865 | static | ||
2329 | 1866 | optimizer::RorIntersectReadPlan *get_best_covering_ror_intersect(optimizer::Parameter *param, | ||
2330 | 1867 | optimizer::SEL_TREE *tree, | ||
2331 | 1868 | double read_time) | ||
2332 | 1869 | { | ||
2333 | 1870 | ROR_SCAN_INFO **ror_scan_mark; | ||
2334 | 1871 | ROR_SCAN_INFO **ror_scans_end= tree->ror_scans_end; | ||
2335 | 1872 | |||
2336 | 1873 | for (ROR_SCAN_INFO **scan= tree->ror_scans; scan != ror_scans_end; ++scan) | ||
2337 | 1874 | (*scan)->key_components= | ||
2338 | 1875 | param->table->key_info[(*scan)->keynr].key_parts; | ||
2339 | 1876 | |||
2340 | 1877 | /* | ||
2341 | 1878 | Run covering-ROR-search algorithm. | ||
2342 | 1879 | Assume set I is [ror_scan .. ror_scans_end) | ||
2343 | 1880 | */ | ||
2344 | 1881 | |||
2345 | 1882 | /*I=set of all covering indexes */ | ||
2346 | 1883 | ror_scan_mark= tree->ror_scans; | ||
2347 | 1884 | |||
2348 | 1885 | MyBitmap *covered_fields= ¶m->tmp_covered_fields; | ||
2349 | 1886 | if (! covered_fields->getBitmap()) | ||
2350 | 1887 | { | ||
2351 | 1888 | my_bitmap_map *tmp_bitmap= (my_bitmap_map*)alloc_root(param->mem_root, | ||
2352 | 1889 | param->fields_bitmap_size); | ||
2353 | 1890 | covered_fields->setBitmap(tmp_bitmap); | ||
2354 | 1891 | } | ||
2355 | 1892 | if (! covered_fields->getBitmap() || | ||
2356 | 1893 | covered_fields->init(covered_fields->getBitmap(), | ||
2357 | 1894 | param->table->s->fields)) | ||
2358 | 1895 | return 0; | ||
2359 | 1896 | covered_fields->clearAll(); | ||
2360 | 1897 | |||
2361 | 1898 | double total_cost= 0.0f; | ||
2362 | 1899 | ha_rows records=0; | ||
2363 | 1900 | bool all_covered; | ||
2364 | 1901 | |||
2365 | 1902 | do | ||
2366 | 1903 | { | ||
2367 | 1904 | /* | ||
2368 | 1905 | Update changed sorting info: | ||
2369 | 1906 | #covered fields, | ||
2370 | 1907 | number of first not covered component | ||
2371 | 1908 | Calculate and save these values for each of remaining scans. | ||
2372 | 1909 | */ | ||
2373 | 1910 | for (ROR_SCAN_INFO **scan= ror_scan_mark; scan != ror_scans_end; ++scan) | ||
2374 | 1911 | { | ||
2375 | 1912 | bitmap_subtract(&(*scan)->covered_fields, covered_fields); | ||
2376 | 1913 | (*scan)->used_fields_covered= | ||
2377 | 1914 | (*scan)->covered_fields.getBitsSet(); | ||
2378 | 1915 | (*scan)->first_uncovered_field= | ||
2379 | 1916 | (*scan)->covered_fields.getFirst(); | ||
2380 | 1917 | } | ||
2381 | 1918 | |||
2382 | 1919 | internal::my_qsort(ror_scan_mark, ror_scans_end-ror_scan_mark, | ||
2383 | 1920 | sizeof(ROR_SCAN_INFO*), | ||
2384 | 1921 | (qsort_cmp)cmp_ror_scan_info_covering); | ||
2385 | 1922 | |||
2386 | 1923 | /* I=I-first(I) */ | ||
2387 | 1924 | total_cost += (*ror_scan_mark)->index_read_cost; | ||
2388 | 1925 | records += (*ror_scan_mark)->records; | ||
2389 | 1926 | if (total_cost > read_time) | ||
2390 | 1927 | return NULL; | ||
2391 | 1928 | /* F=F-covered by first(I) */ | ||
2392 | 1929 | bitmap_union(covered_fields, &(*ror_scan_mark)->covered_fields); | ||
2393 | 1930 | all_covered= bitmap_is_subset(¶m->needed_fields, covered_fields); | ||
2394 | 1931 | } while ((++ror_scan_mark < ror_scans_end) && !all_covered); | ||
2395 | 1932 | |||
2396 | 1933 | if (!all_covered || (ror_scan_mark - tree->ror_scans) == 1) | ||
2397 | 1934 | return NULL; | ||
2398 | 1935 | |||
2399 | 1936 | /* | ||
2400 | 1937 | Ok, [tree->ror_scans .. ror_scan) holds covering index_intersection with | ||
2401 | 1938 | cost total_cost. | ||
2402 | 1939 | */ | ||
2403 | 1940 | /* Add priority queue use cost. */ | ||
2404 | 1941 | total_cost += rows2double(records)* | ||
2405 | 1942 | log((double)(ror_scan_mark - tree->ror_scans)) / | ||
2406 | 1943 | (TIME_FOR_COMPARE_ROWID * M_LN2); | ||
2407 | 1944 | |||
2408 | 1945 | if (total_cost > read_time) | ||
2409 | 1946 | return NULL; | ||
2410 | 1947 | |||
2411 | 1948 | optimizer::RorIntersectReadPlan *trp= NULL; | ||
2412 | 1949 | if (! (trp= new (param->mem_root) optimizer::RorIntersectReadPlan)) | ||
2413 | 1950 | { | ||
2414 | 1951 | return trp; | ||
2415 | 1952 | } | ||
2416 | 1953 | |||
2417 | 1954 | uint32_t best_num= (ror_scan_mark - tree->ror_scans); | ||
2418 | 1955 | trp->ror_range_scans.assign(tree->ror_scans, tree->ror_scans + best_num); | ||
2419 | 1956 | trp->setRowRetrievalNecessary(true); | ||
2420 | 1957 | trp->read_cost= total_cost; | ||
2421 | 1958 | trp->records= records; | ||
2422 | 1959 | trp->cpk_scan= NULL; | ||
2423 | 1960 | set_if_smaller(param->table->quick_condition_rows, records); | ||
2424 | 1961 | |||
2425 | 1962 | return(trp); | ||
2426 | 1963 | } | ||
2427 | 1964 | |||
2428 | 1965 | |||
2429 | 1966 | /* | ||
2430 | 1967 | Get best "range" table read plan for given optimizer::SEL_TREE, also update some info | 1786 | Get best "range" table read plan for given optimizer::SEL_TREE, also update some info |
2431 | 1968 | 1787 | ||
2432 | 1969 | SYNOPSIS | 1788 | SYNOPSIS |
2433 | 1970 | 1789 | ||
2434 | === modified file 'drizzled/pthread_globals.h' | |||
2435 | --- drizzled/pthread_globals.h 2010-02-04 08:14:46 +0000 | |||
2436 | +++ drizzled/pthread_globals.h 2010-04-19 20:33:26 +0000 | |||
2437 | @@ -36,6 +36,7 @@ | |||
2438 | 36 | extern pthread_cond_t COND_refresh; | 36 | extern pthread_cond_t COND_refresh; |
2439 | 37 | extern pthread_cond_t COND_thread_count; | 37 | extern pthread_cond_t COND_thread_count; |
2440 | 38 | extern pthread_cond_t COND_global_read_lock; | 38 | extern pthread_cond_t COND_global_read_lock; |
2441 | 39 | extern pthread_cond_t COND_server_end; | ||
2442 | 39 | extern pthread_attr_t connection_attrib; | 40 | extern pthread_attr_t connection_attrib; |
2443 | 40 | extern pthread_t signal_thread; | 41 | extern pthread_t signal_thread; |
2444 | 41 | 42 | ||
2445 | 42 | 43 | ||
2446 | === modified file 'drizzled/schema_identifier.cc' | |||
2447 | --- drizzled/schema_identifier.cc 2010-04-14 18:21:22 +0000 | |||
2448 | +++ drizzled/schema_identifier.cc 2010-04-19 20:33:26 +0000 | |||
2449 | @@ -61,7 +61,7 @@ | |||
2450 | 61 | 61 | ||
2451 | 62 | 62 | ||
2452 | 63 | int rootdir_len= strlen(FN_ROOTDIR); | 63 | int rootdir_len= strlen(FN_ROOTDIR); |
2454 | 64 | path.append(drizzle_data_home); | 64 | path.append(data_home); |
2455 | 65 | ssize_t without_rootdir= path.length() - rootdir_len; | 65 | ssize_t without_rootdir= path.length() - rootdir_len; |
2456 | 66 | 66 | ||
2457 | 67 | /* Don't add FN_ROOTDIR if dirzzle_data_home already includes it */ | 67 | /* Don't add FN_ROOTDIR if dirzzle_data_home already includes it */ |
2458 | 68 | 68 | ||
2459 | === modified file 'drizzled/session.cc' | |||
2460 | --- drizzled/session.cc 2010-04-08 16:25:53 +0000 | |||
2461 | +++ drizzled/session.cc 2010-04-19 20:33:26 +0000 | |||
2462 | @@ -46,6 +46,7 @@ | |||
2463 | 46 | #include "drizzled/db.h" | 46 | #include "drizzled/db.h" |
2464 | 47 | #include "drizzled/pthread_globals.h" | 47 | #include "drizzled/pthread_globals.h" |
2465 | 48 | #include "drizzled/transaction_services.h" | 48 | #include "drizzled/transaction_services.h" |
2466 | 49 | #include "drizzled/drizzled.h" | ||
2467 | 49 | 50 | ||
2468 | 50 | #include "plugin/myisam/myisam.h" | 51 | #include "plugin/myisam/myisam.h" |
2469 | 51 | #include "drizzled/internal/iocache.h" | 52 | #include "drizzled/internal/iocache.h" |
2470 | @@ -74,8 +75,6 @@ | |||
2471 | 74 | const char * const Session::DEFAULT_WHERE= "field list"; | 75 | const char * const Session::DEFAULT_WHERE= "field list"; |
2472 | 75 | extern pthread_key_t THR_Session; | 76 | extern pthread_key_t THR_Session; |
2473 | 76 | extern pthread_key_t THR_Mem_root; | 77 | extern pthread_key_t THR_Mem_root; |
2474 | 77 | extern uint32_t max_used_connections; | ||
2475 | 78 | extern atomic<uint32_t> connection_count; | ||
2476 | 79 | 78 | ||
2477 | 80 | 79 | ||
2478 | 81 | /**************************************************************************** | 80 | /**************************************************************************** |
2479 | @@ -1048,13 +1047,13 @@ | |||
2480 | 1048 | 1047 | ||
2481 | 1049 | if (!internal::dirname_length(exchange->file_name)) | 1048 | if (!internal::dirname_length(exchange->file_name)) |
2482 | 1050 | { | 1049 | { |
2484 | 1051 | strcpy(path, drizzle_real_data_home); | 1050 | strcpy(path, data_home_real); |
2485 | 1052 | if (! session->db.empty()) | 1051 | if (! session->db.empty()) |
2487 | 1053 | strncat(path, session->db.c_str(), FN_REFLEN-strlen(drizzle_real_data_home)-1); | 1052 | strncat(path, session->db.c_str(), FN_REFLEN-strlen(data_home_real)-1); |
2488 | 1054 | (void) internal::fn_format(path, exchange->file_name, path, "", option); | 1053 | (void) internal::fn_format(path, exchange->file_name, path, "", option); |
2489 | 1055 | } | 1054 | } |
2490 | 1056 | else | 1055 | else |
2492 | 1057 | (void) internal::fn_format(path, exchange->file_name, drizzle_real_data_home, "", option); | 1056 | (void) internal::fn_format(path, exchange->file_name, data_home_real, "", option); |
2493 | 1058 | 1057 | ||
2494 | 1059 | if (opt_secure_file_priv && | 1058 | if (opt_secure_file_priv && |
2495 | 1060 | strncmp(opt_secure_file_priv, path, strlen(opt_secure_file_priv))) | 1059 | strncmp(opt_secure_file_priv, path, strlen(opt_secure_file_priv))) |
2496 | 1061 | 1060 | ||
2497 | === modified file 'drizzled/session_list.cc' | |||
2498 | --- drizzled/session_list.cc 2010-03-04 16:54:08 +0000 | |||
2499 | +++ drizzled/session_list.cc 2010-04-19 20:33:26 +0000 | |||
2500 | @@ -35,7 +35,7 @@ | |||
2501 | 35 | 35 | ||
2502 | 36 | SessionList session_list; | 36 | SessionList session_list; |
2503 | 37 | 37 | ||
2505 | 38 | vector<Session*> &getSessionList() | 38 | SessionList &getSessionList() |
2506 | 39 | { | 39 | { |
2507 | 40 | return session_list; | 40 | return session_list; |
2508 | 41 | } | 41 | } |
2509 | 42 | 42 | ||
2510 | === modified file 'drizzled/set_var.cc' | |||
2511 | --- drizzled/set_var.cc 2010-04-07 15:56:28 +0000 | |||
2512 | +++ drizzled/set_var.cc 2010-04-19 20:33:26 +0000 | |||
2513 | @@ -143,7 +143,7 @@ | |||
2514 | 143 | fix_completion_type); | 143 | fix_completion_type); |
2515 | 144 | static sys_var_collation_sv | 144 | static sys_var_collation_sv |
2516 | 145 | sys_collation_server(&vars, "collation_server", &system_variables::collation_server, &default_charset_info); | 145 | sys_collation_server(&vars, "collation_server", &system_variables::collation_server, &default_charset_info); |
2518 | 146 | static sys_var_const_str sys_datadir(&vars, "datadir", drizzle_real_data_home); | 146 | static sys_var_const_str sys_datadir(&vars, "datadir", data_home_real); |
2519 | 147 | 147 | ||
2520 | 148 | static sys_var_session_uint64_t sys_join_buffer_size(&vars, "join_buffer_size", | 148 | static sys_var_session_uint64_t sys_join_buffer_size(&vars, "join_buffer_size", |
2521 | 149 | &system_variables::join_buff_size); | 149 | &system_variables::join_buff_size); |
2522 | 150 | 150 | ||
2523 | === added file 'drizzled/signal_handler.cc' | |||
2524 | --- drizzled/signal_handler.cc 1970-01-01 00:00:00 +0000 | |||
2525 | +++ drizzled/signal_handler.cc 2010-04-19 20:33:26 +0000 | |||
2526 | @@ -0,0 +1,212 @@ | |||
2527 | 1 | /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
2528 | 2 | * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
2529 | 3 | * | ||
2530 | 4 | * Copyright (C) 2008 Sun Microsystems | ||
2531 | 5 | * | ||
2532 | 6 | * This program is free software; you can redistribute it and/or modify | ||
2533 | 7 | * it under the terms of the GNU General Public License as published by | ||
2534 | 8 | * the Free Software Foundation; version 2 of the License. | ||
2535 | 9 | * | ||
2536 | 10 | * This program is distributed in the hope that it will be useful, | ||
2537 | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2538 | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2539 | 13 | * GNU General Public License for more details. | ||
2540 | 14 | * | ||
2541 | 15 | * You should have received a copy of the GNU General Public License | ||
2542 | 16 | * along with this program; if not, write to the Free Software | ||
2543 | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
2544 | 18 | */ | ||
2545 | 19 | |||
2546 | 20 | #include "config.h" | ||
2547 | 21 | |||
2548 | 22 | #include <signal.h> | ||
2549 | 23 | |||
2550 | 24 | #include "drizzled/signal_handler.h" | ||
2551 | 25 | #include "drizzled/drizzled.h" | ||
2552 | 26 | #include "drizzled/session.h" | ||
2553 | 27 | #include "drizzled/internal/my_sys.h" | ||
2554 | 28 | #include "drizzled/probes.h" | ||
2555 | 29 | #include "drizzled/plugin.h" | ||
2556 | 30 | #include "drizzled/plugin/scheduler.h" | ||
2557 | 31 | #include "plugin/myisam/keycache.h" | ||
2558 | 32 | |||
2559 | 33 | using namespace drizzled; | ||
2560 | 34 | |||
2561 | 35 | static uint32_t killed_threads; | ||
2562 | 36 | static bool segfaulted= false; | ||
2563 | 37 | |||
2564 | 38 | /* | ||
2565 | 39 | * We declare these extern "C" because they are passed to system callback functions | ||
2566 | 40 | * and Sun Studio does not like it when those don't have C linkage. We prefix them | ||
2567 | 41 | * because extern "C"-ing something effectively removes the namespace from the | ||
2568 | 42 | * linker symbols, meaning they would be exporting symbols like "print_signal_warning | ||
2569 | 43 | */ | ||
2570 | 44 | extern "C" | ||
2571 | 45 | { | ||
2572 | 46 | |||
2573 | 47 | void drizzled_print_signal_warning(int sig) | ||
2574 | 48 | { | ||
2575 | 49 | if (global_system_variables.log_warnings) | ||
2576 | 50 | errmsg_printf(ERRMSG_LVL_WARN, _("Got signal %d from thread %"PRIu64), | ||
2577 | 51 | sig, global_thread_id); | ||
2578 | 52 | #ifndef HAVE_BSD_SIGNALS | ||
2579 | 53 | sigset_t set; | ||
2580 | 54 | sigemptyset(&set); | ||
2581 | 55 | |||
2582 | 56 | struct sigaction sa; | ||
2583 | 57 | sa.sa_handler= drizzled_print_signal_warning; | ||
2584 | 58 | sa.sa_mask= set; | ||
2585 | 59 | sa.sa_flags= 0; | ||
2586 | 60 | sigaction(sig, &sa, NULL); /* int. thread system calls */ | ||
2587 | 61 | #endif | ||
2588 | 62 | if (sig == SIGALRM) | ||
2589 | 63 | alarm(2); /* reschedule alarm */ | ||
2590 | 64 | } | ||
2591 | 65 | |||
2592 | 66 | /** Called when a thread is aborted. */ | ||
2593 | 67 | void drizzled_end_thread_signal(int ) | ||
2594 | 68 | { | ||
2595 | 69 | Session *session=current_session; | ||
2596 | 70 | if (session) | ||
2597 | 71 | { | ||
2598 | 72 | statistic_increment(killed_threads, &LOCK_status); | ||
2599 | 73 | session->scheduler->killSessionNow(session); | ||
2600 | 74 | DRIZZLE_CONNECTION_DONE(session->thread_id); | ||
2601 | 75 | } | ||
2602 | 76 | return; | ||
2603 | 77 | } | ||
2604 | 78 | |||
2605 | 79 | void drizzled_handle_segfault(int sig) | ||
2606 | 80 | { | ||
2607 | 81 | time_t curr_time; | ||
2608 | 82 | struct tm tm; | ||
2609 | 83 | |||
2610 | 84 | /* | ||
2611 | 85 | Strictly speaking, one needs a mutex here | ||
2612 | 86 | but since we have got SIGSEGV already, things are a mess | ||
2613 | 87 | so not having the mutex is not as bad as possibly using a buggy | ||
2614 | 88 | mutex - so we keep things simple | ||
2615 | 89 | */ | ||
2616 | 90 | if (segfaulted) | ||
2617 | 91 | { | ||
2618 | 92 | fprintf(stderr, _("Fatal signal %d while backtracing\n"), sig); | ||
2619 | 93 | exit(1); | ||
2620 | 94 | } | ||
2621 | 95 | |||
2622 | 96 | segfaulted= true; | ||
2623 | 97 | |||
2624 | 98 | curr_time= time(NULL); | ||
2625 | 99 | if(curr_time == (time_t)-1) | ||
2626 | 100 | { | ||
2627 | 101 | fprintf(stderr, _("Fatal: time() call failed\n")); | ||
2628 | 102 | exit(1); | ||
2629 | 103 | } | ||
2630 | 104 | |||
2631 | 105 | localtime_r(&curr_time, &tm); | ||
2632 | 106 | |||
2633 | 107 | fprintf(stderr,_("%02d%02d%02d %2d:%02d:%02d - drizzled got signal %d;\n" | ||
2634 | 108 | "This could be because you hit a bug. It is also possible that " | ||
2635 | 109 | "this binary\n or one of the libraries it was linked against is " | ||
2636 | 110 | "corrupt, improperly built,\n or misconfigured. This error can " | ||
2637 | 111 | "also be caused by malfunctioning hardware.\n"), | ||
2638 | 112 | tm.tm_year % 100, tm.tm_mon+1, tm.tm_mday, | ||
2639 | 113 | tm.tm_hour, tm.tm_min, tm.tm_sec, | ||
2640 | 114 | sig); | ||
2641 | 115 | fprintf(stderr, _("We will try our best to scrape up some info that " | ||
2642 | 116 | "will hopefully help diagnose\n" | ||
2643 | 117 | "the problem, but since we have already crashed, " | ||
2644 | 118 | "something is definitely wrong\nand this may fail.\n\n")); | ||
2645 | 119 | fprintf(stderr, "key_buffer_size=%u\n", | ||
2646 | 120 | (uint32_t) dflt_key_cache->key_cache_mem_size); | ||
2647 | 121 | fprintf(stderr, "read_buffer_size=%ld\n", (long) global_system_variables.read_buff_size); | ||
2648 | 122 | fprintf(stderr, "max_used_connections=%u\n", max_used_connections); | ||
2649 | 123 | fprintf(stderr, "connection_count=%u\n", uint32_t(connection_count)); | ||
2650 | 124 | fprintf(stderr, _("It is possible that drizzled could use up to \n" | ||
2651 | 125 | "key_buffer_size + (read_buffer_size + " | ||
2652 | 126 | "sort_buffer_size)*thread_count\n" | ||
2653 | 127 | "bytes of memory\n" | ||
2654 | 128 | "Hope that's ok; if not, decrease some variables in the " | ||
2655 | 129 | "equation.\n\n")); | ||
2656 | 130 | |||
2657 | 131 | #ifdef HAVE_STACKTRACE | ||
2658 | 132 | Session *session= current_session; | ||
2659 | 133 | |||
2660 | 134 | if (! (test_flags.test(TEST_NO_STACKTRACE))) | ||
2661 | 135 | { | ||
2662 | 136 | fprintf(stderr,"session: 0x%lx\n",(long) session); | ||
2663 | 137 | fprintf(stderr,_("Attempting backtrace. You can use the following " | ||
2664 | 138 | "information to find out\n" | ||
2665 | 139 | "where drizzled died. If you see no messages after this, " | ||
2666 | 140 | "something went\n" | ||
2667 | 141 | "terribly wrong...\n")); | ||
2668 | 142 | print_stacktrace(session ? (unsigned char*) session->thread_stack : (unsigned char*) 0, | ||
2669 | 143 | my_thread_stack_size); | ||
2670 | 144 | } | ||
2671 | 145 | if (session) | ||
2672 | 146 | { | ||
2673 | 147 | const char *kreason= "UNKNOWN"; | ||
2674 | 148 | switch (session->killed) { | ||
2675 | 149 | case Session::NOT_KILLED: | ||
2676 | 150 | kreason= "NOT_KILLED"; | ||
2677 | 151 | break; | ||
2678 | 152 | case Session::KILL_BAD_DATA: | ||
2679 | 153 | kreason= "KILL_BAD_DATA"; | ||
2680 | 154 | break; | ||
2681 | 155 | case Session::KILL_CONNECTION: | ||
2682 | 156 | kreason= "KILL_CONNECTION"; | ||
2683 | 157 | break; | ||
2684 | 158 | case Session::KILL_QUERY: | ||
2685 | 159 | kreason= "KILL_QUERY"; | ||
2686 | 160 | break; | ||
2687 | 161 | case Session::KILLED_NO_VALUE: | ||
2688 | 162 | kreason= "KILLED_NO_VALUE"; | ||
2689 | 163 | break; | ||
2690 | 164 | } | ||
2691 | 165 | fprintf(stderr, _("Trying to get some variables.\n" | ||
2692 | 166 | "Some pointers may be invalid and cause the " | ||
2693 | 167 | "dump to abort...\n")); | ||
2694 | 168 | safe_print_str("session->query", session->query, 1024); | ||
2695 | 169 | fprintf(stderr, "session->thread_id=%"PRIu32"\n", (uint32_t) session->thread_id); | ||
2696 | 170 | fprintf(stderr, "session->killed=%s\n", kreason); | ||
2697 | 171 | } | ||
2698 | 172 | fflush(stderr); | ||
2699 | 173 | #endif /* HAVE_STACKTRACE */ | ||
2700 | 174 | |||
2701 | 175 | if (calling_initgroups) | ||
2702 | 176 | fprintf(stderr, _("\nThis crash occurred while the server was calling " | ||
2703 | 177 | "initgroups(). This is\n" | ||
2704 | 178 | "often due to the use of a drizzled that is statically " | ||
2705 | 179 | "linked against glibc\n" | ||
2706 | 180 | "and configured to use LDAP in /etc/nsswitch.conf. " | ||
2707 | 181 | "You will need to either\n" | ||
2708 | 182 | "upgrade to a version of glibc that does not have this " | ||
2709 | 183 | "problem (2.3.4 or\n" | ||
2710 | 184 | "later when used with nscd), disable LDAP in your " | ||
2711 | 185 | "nsswitch.conf, or use a\n" | ||
2712 | 186 | "drizzled that is not statically linked.\n")); | ||
2713 | 187 | |||
2714 | 188 | if (internal::thd_lib_detected == THD_LIB_LT && !getenv("LD_ASSUME_KERNEL")) | ||
2715 | 189 | fprintf(stderr, | ||
2716 | 190 | _("\nYou are running a statically-linked LinuxThreads binary " | ||
2717 | 191 | "on an NPTL system.\n" | ||
2718 | 192 | "This can result in crashes on some distributions due " | ||
2719 | 193 | "to LT/NPTL conflicts.\n" | ||
2720 | 194 | "You should either build a dynamically-linked binary, or force " | ||
2721 | 195 | "LinuxThreads\n" | ||
2722 | 196 | "to be used with the LD_ASSUME_KERNEL environment variable. " | ||
2723 | 197 | "Please consult\n" | ||
2724 | 198 | "the documentation for your distribution on how to do that.\n")); | ||
2725 | 199 | |||
2726 | 200 | #ifdef HAVE_WRITE_CORE | ||
2727 | 201 | if (test_flags.test(TEST_CORE_ON_SIGNAL)) | ||
2728 | 202 | { | ||
2729 | 203 | fprintf(stderr, _("Writing a core file\n")); | ||
2730 | 204 | fflush(stderr); | ||
2731 | 205 | write_core(sig); | ||
2732 | 206 | } | ||
2733 | 207 | #endif | ||
2734 | 208 | |||
2735 | 209 | exit(1); | ||
2736 | 210 | } | ||
2737 | 211 | |||
2738 | 212 | } /* extern "C" */ | ||
2739 | 0 | 213 | ||
2740 | === added file 'drizzled/signal_handler.h' | |||
2741 | --- drizzled/signal_handler.h 1970-01-01 00:00:00 +0000 | |||
2742 | +++ drizzled/signal_handler.h 2010-04-19 20:33:26 +0000 | |||
2743 | @@ -0,0 +1,55 @@ | |||
2744 | 1 | /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
2745 | 2 | * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
2746 | 3 | * | ||
2747 | 4 | * Copyright (C) 2008 Sun Microsystems | ||
2748 | 5 | * Copyright (C) 2010 Monty Taylor | ||
2749 | 6 | * | ||
2750 | 7 | * This program is free software; you can redistribute it and/or modify | ||
2751 | 8 | * it under the terms of the GNU General Public License as published by | ||
2752 | 9 | * the Free Software Foundation; version 2 of the License. | ||
2753 | 10 | * | ||
2754 | 11 | * This program is distributed in the hope that it will be useful, | ||
2755 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2756 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2757 | 14 | * GNU General Public License for more details. | ||
2758 | 15 | * | ||
2759 | 16 | * You should have received a copy of the GNU General Public License | ||
2760 | 17 | * along with this program; if not, write to the Free Software | ||
2761 | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
2762 | 19 | */ | ||
2763 | 20 | |||
2764 | 21 | #ifndef DRIZZLED_SIGNAL_HANDLER_H | ||
2765 | 22 | #define DRIZZLED_SIGNAL_HANDLER_H | ||
2766 | 23 | |||
2767 | 24 | #include <signal.h> | ||
2768 | 25 | |||
2769 | 26 | #include <cstdlib> | ||
2770 | 27 | #include <cassert> | ||
2771 | 28 | |||
2772 | 29 | extern "C" void drizzled_print_signal_warning(int sig); | ||
2773 | 30 | extern "C" void drizzled_handle_segfault(int sig); | ||
2774 | 31 | extern "C" void drizzled_end_thread_signal(int sig); | ||
2775 | 32 | |||
2776 | 33 | /* | ||
2777 | 34 | posix sigaction() based signal handler implementation | ||
2778 | 35 | On some systems, such as Mac OS X, sigset() results in flags | ||
2779 | 36 | such as SA_RESTART being set, and we want to make sure that no such | ||
2780 | 37 | flags are set. | ||
2781 | 38 | */ | ||
2782 | 39 | static inline void ignore_signal(int sig) | ||
2783 | 40 | { | ||
2784 | 41 | /* Wow. There is a function sigaction which takes a pointer to a | ||
2785 | 42 | struct sigaction. */ | ||
2786 | 43 | struct sigaction l_s; | ||
2787 | 44 | sigset_t l_set; | ||
2788 | 45 | sigemptyset(&l_set); | ||
2789 | 46 | |||
2790 | 47 | assert(sig != 0); | ||
2791 | 48 | l_s.sa_handler= SIG_IGN; | ||
2792 | 49 | l_s.sa_mask= l_set; | ||
2793 | 50 | l_s.sa_flags= 0; | ||
2794 | 51 | int l_rc= sigaction(sig, &l_s, NULL); | ||
2795 | 52 | assert(l_rc == 0); | ||
2796 | 53 | } | ||
2797 | 54 | |||
2798 | 55 | #endif /* DRIZZLED_SIGNAL_HANDLER_H */ | ||
2799 | 0 | 56 | ||
2800 | === modified file 'drizzled/sql_base.cc' | |||
2801 | --- drizzled/sql_base.cc 2010-04-15 19:22:50 +0000 | |||
2802 | +++ drizzled/sql_base.cc 2010-04-19 20:33:26 +0000 | |||
2803 | @@ -51,6 +51,7 @@ | |||
2804 | 51 | #include "drizzled/global_charset_info.h" | 51 | #include "drizzled/global_charset_info.h" |
2805 | 52 | #include "drizzled/pthread_globals.h" | 52 | #include "drizzled/pthread_globals.h" |
2806 | 53 | #include "drizzled/internal/iocache.h" | 53 | #include "drizzled/internal/iocache.h" |
2807 | 54 | #include "drizzled/drizzled.h" | ||
2808 | 54 | #include "drizzled/plugin/authorization.h" | 55 | #include "drizzled/plugin/authorization.h" |
2809 | 55 | 56 | ||
2810 | 56 | using namespace std; | 57 | using namespace std; |
2811 | @@ -60,8 +61,6 @@ | |||
2812 | 60 | 61 | ||
2813 | 61 | extern bool volatile shutdown_in_progress; | 62 | extern bool volatile shutdown_in_progress; |
2814 | 62 | 63 | ||
2815 | 63 | bool drizzle_rm_tmp_tables(); | ||
2816 | 64 | |||
2817 | 65 | /** | 64 | /** |
2818 | 66 | @defgroup Data_Dictionary Data Dictionary | 65 | @defgroup Data_Dictionary Data Dictionary |
2819 | 67 | @{ | 66 | @{ |
2820 | 68 | 67 | ||
2821 | === modified file 'drizzled/sql_load.cc' | |||
2822 | --- drizzled/sql_load.cc 2010-03-31 21:15:40 +0000 | |||
2823 | +++ drizzled/sql_load.cc 2010-04-19 20:33:26 +0000 | |||
2824 | @@ -258,14 +258,14 @@ | |||
2825 | 258 | #endif | 258 | #endif |
2826 | 259 | if (!internal::dirname_length(ex->file_name)) | 259 | if (!internal::dirname_length(ex->file_name)) |
2827 | 260 | { | 260 | { |
2830 | 261 | strcpy(name, drizzle_real_data_home); | 261 | strcpy(name, data_home_real); |
2831 | 262 | strncat(name, tdb, FN_REFLEN-strlen(drizzle_real_data_home)-1); | 262 | strncat(name, tdb, FN_REFLEN-strlen(data_home_real)-1); |
2832 | 263 | (void) internal::fn_format(name, ex->file_name, name, "", | 263 | (void) internal::fn_format(name, ex->file_name, name, "", |
2833 | 264 | MY_RELATIVE_PATH | MY_UNPACK_FILENAME); | 264 | MY_RELATIVE_PATH | MY_UNPACK_FILENAME); |
2834 | 265 | } | 265 | } |
2835 | 266 | else | 266 | else |
2836 | 267 | { | 267 | { |
2838 | 268 | (void) internal::fn_format(name, ex->file_name, drizzle_real_data_home, "", | 268 | (void) internal::fn_format(name, ex->file_name, data_home_real, "", |
2839 | 269 | MY_RELATIVE_PATH | MY_UNPACK_FILENAME); | 269 | MY_RELATIVE_PATH | MY_UNPACK_FILENAME); |
2840 | 270 | 270 | ||
2841 | 271 | if (opt_secure_file_priv && | 271 | if (opt_secure_file_priv && |
2842 | 272 | 272 | ||
2843 | === modified file 'drizzled/sql_table.cc' | |||
2844 | --- drizzled/sql_table.cc 2010-04-11 17:19:47 +0000 | |||
2845 | +++ drizzled/sql_table.cc 2010-04-19 20:33:26 +0000 | |||
2846 | @@ -54,7 +54,6 @@ | |||
2847 | 54 | namespace drizzled | 54 | namespace drizzled |
2848 | 55 | { | 55 | { |
2849 | 56 | 56 | ||
2850 | 57 | extern plugin::StorageEngine *myisam_engine; | ||
2851 | 58 | extern pid_t current_pid; | 57 | extern pid_t current_pid; |
2852 | 59 | 58 | ||
2853 | 60 | bool is_primary_key(KEY *key_info) | 59 | bool is_primary_key(KEY *key_info) |
2854 | @@ -1618,9 +1617,6 @@ | |||
2855 | 1618 | old_name The old table name. | 1617 | old_name The old table name. |
2856 | 1619 | new_db The new database name. | 1618 | new_db The new database name. |
2857 | 1620 | new_name The new table name. | 1619 | new_name The new table name. |
2858 | 1621 | flags flags for build_table_filename(). | ||
2859 | 1622 | FN_FROM_IS_TMP old_name is temporary. | ||
2860 | 1623 | FN_TO_IS_TMP new_name is temporary. | ||
2861 | 1624 | 1620 | ||
2862 | 1625 | RETURN | 1621 | RETURN |
2863 | 1626 | false OK | 1622 | false OK |
2864 | @@ -1630,8 +1626,7 @@ | |||
2865 | 1630 | bool | 1626 | bool |
2866 | 1631 | mysql_rename_table(plugin::StorageEngine *base, | 1627 | mysql_rename_table(plugin::StorageEngine *base, |
2867 | 1632 | TableIdentifier &from, | 1628 | TableIdentifier &from, |
2870 | 1633 | TableIdentifier &to, | 1629 | TableIdentifier &to) |
2869 | 1634 | uint32_t ) | ||
2871 | 1635 | { | 1630 | { |
2872 | 1636 | Session *session= current_session; | 1631 | Session *session= current_session; |
2873 | 1637 | int error= 0; | 1632 | int error= 0; |
2874 | 1638 | 1633 | ||
2875 | === modified file 'drizzled/sql_table.h' | |||
2876 | --- drizzled/sql_table.h 2010-04-11 17:04:06 +0000 | |||
2877 | +++ drizzled/sql_table.h 2010-04-19 20:33:26 +0000 | |||
2878 | @@ -40,10 +40,6 @@ | |||
2879 | 40 | class AlterInfo; | 40 | class AlterInfo; |
2880 | 41 | class Cursor; | 41 | class Cursor; |
2881 | 42 | 42 | ||
2882 | 43 | /* Flags for conversion functions. */ | ||
2883 | 44 | static const uint32_t FN_FROM_IS_TMP(1 << 0); | ||
2884 | 45 | static const uint32_t FN_TO_IS_TMP(1 << 0); | ||
2885 | 46 | |||
2886 | 47 | namespace message { class Table; } | 43 | namespace message { class Table; } |
2887 | 48 | class TableIdentifier; | 44 | class TableIdentifier; |
2888 | 49 | 45 | ||
2889 | 50 | 46 | ||
2890 | === modified file 'drizzled/stacktrace.cc' | |||
2891 | --- drizzled/stacktrace.cc 2010-02-04 08:14:46 +0000 | |||
2892 | +++ drizzled/stacktrace.cc 2010-04-19 20:33:26 +0000 | |||
2893 | @@ -36,6 +36,10 @@ | |||
2894 | 36 | #include <cstdio> | 36 | #include <cstdio> |
2895 | 37 | #include <algorithm> | 37 | #include <algorithm> |
2896 | 38 | 38 | ||
2897 | 39 | #if defined(BACKTRACE_DEMANGLE) | ||
2898 | 40 | # include <cxxabi.h> | ||
2899 | 41 | #endif | ||
2900 | 42 | |||
2901 | 39 | #include "drizzled/definitions.h" | 43 | #include "drizzled/definitions.h" |
2902 | 40 | 44 | ||
2903 | 41 | using namespace std; | 45 | using namespace std; |
2904 | @@ -74,8 +78,13 @@ | |||
2905 | 74 | #define SIGRETURN_FRAME_OFFSET 23 | 78 | #define SIGRETURN_FRAME_OFFSET 23 |
2906 | 75 | #endif | 79 | #endif |
2907 | 76 | 80 | ||
2910 | 77 | 81 | #if defined(BACKTRACE_DEMANGLE) | |
2911 | 78 | #if BACKTRACE_DEMANGLE | 82 | |
2912 | 83 | static inline char *my_demangle(const char *mangled_name, int *status) | ||
2913 | 84 | { | ||
2914 | 85 | return abi::__cxa_demangle(mangled_name, NULL, NULL, status); | ||
2915 | 86 | } | ||
2916 | 87 | |||
2917 | 79 | static void my_demangle_symbols(char **addrs, int n) | 88 | static void my_demangle_symbols(char **addrs, int n) |
2918 | 80 | { | 89 | { |
2919 | 81 | int status, i; | 90 | int status, i; |
2920 | 82 | 91 | ||
2921 | === modified file 'drizzled/stacktrace.h' | |||
2922 | --- drizzled/stacktrace.h 2010-02-04 08:14:46 +0000 | |||
2923 | +++ drizzled/stacktrace.h 2010-04-19 20:33:26 +0000 | |||
2924 | @@ -35,10 +35,6 @@ | |||
2925 | 35 | #define BACKTRACE_DEMANGLE 1 | 35 | #define BACKTRACE_DEMANGLE 1 |
2926 | 36 | #endif | 36 | #endif |
2927 | 37 | 37 | ||
2928 | 38 | #if defined(BACKTRACE_DEMANGLE) | ||
2929 | 39 | extern "C" char *my_demangle(const char *mangled_name, int *status); | ||
2930 | 40 | #endif | ||
2931 | 41 | |||
2932 | 42 | #ifdef TARGET_OS_LINUX | 38 | #ifdef TARGET_OS_LINUX |
2933 | 43 | #if defined(HAVE_STACKTRACE) || (defined (__x86_64__) || defined (__i386__) ) | 39 | #if defined(HAVE_STACKTRACE) || (defined (__x86_64__) || defined (__i386__) ) |
2934 | 44 | #undef HAVE_STACKTRACE | 40 | #undef HAVE_STACKTRACE |
2935 | 45 | 41 | ||
2936 | === modified file 'drizzled/statement/alter_table.cc' | |||
2937 | --- drizzled/statement/alter_table.cc 2010-04-08 16:25:53 +0000 | |||
2938 | +++ drizzled/statement/alter_table.cc 2010-04-19 20:33:26 +0000 | |||
2939 | @@ -931,7 +931,7 @@ | |||
2940 | 931 | } | 931 | } |
2941 | 932 | else | 932 | else |
2942 | 933 | { | 933 | { |
2944 | 934 | if (mysql_rename_table(original_engine, original_table_identifier, new_table_identifier, 0)) | 934 | if (mysql_rename_table(original_engine, original_table_identifier, new_table_identifier)) |
2945 | 935 | { | 935 | { |
2946 | 936 | error= -1; | 936 | error= -1; |
2947 | 937 | } | 937 | } |
2948 | @@ -1125,7 +1125,7 @@ | |||
2949 | 1125 | 1125 | ||
2950 | 1126 | new_table_identifier.setPath(new_table_as_temporary.getPath()); | 1126 | new_table_identifier.setPath(new_table_as_temporary.getPath()); |
2951 | 1127 | 1127 | ||
2953 | 1128 | if (mysql_rename_table(new_engine, new_table_as_temporary, new_table_identifier, FN_FROM_IS_TMP) != 0) | 1128 | if (mysql_rename_table(new_engine, new_table_as_temporary, new_table_identifier) != 0) |
2954 | 1129 | { | 1129 | { |
2955 | 1130 | return true; | 1130 | return true; |
2956 | 1131 | } | 1131 | } |
2957 | @@ -1184,14 +1184,14 @@ | |||
2958 | 1184 | TableIdentifier original_table_to_drop(original_table_identifier.getSchemaName(), | 1184 | TableIdentifier original_table_to_drop(original_table_identifier.getSchemaName(), |
2959 | 1185 | old_name, message::Table::TEMPORARY); | 1185 | old_name, message::Table::TEMPORARY); |
2960 | 1186 | 1186 | ||
2962 | 1187 | if (mysql_rename_table(original_engine, original_table_identifier, original_table_to_drop, FN_TO_IS_TMP)) | 1187 | if (mysql_rename_table(original_engine, original_table_identifier, original_table_to_drop)) |
2963 | 1188 | { | 1188 | { |
2964 | 1189 | error= 1; | 1189 | error= 1; |
2965 | 1190 | quick_rm_table(*session, new_table_as_temporary); | 1190 | quick_rm_table(*session, new_table_as_temporary); |
2966 | 1191 | } | 1191 | } |
2967 | 1192 | else | 1192 | else |
2968 | 1193 | { | 1193 | { |
2970 | 1194 | if (mysql_rename_table(new_engine, new_table_as_temporary, new_table_identifier, FN_FROM_IS_TMP) != 0) | 1194 | if (mysql_rename_table(new_engine, new_table_as_temporary, new_table_identifier) != 0) |
2971 | 1195 | { | 1195 | { |
2972 | 1196 | /* Try to get everything back. */ | 1196 | /* Try to get everything back. */ |
2973 | 1197 | error= 1; | 1197 | error= 1; |
2974 | @@ -1200,7 +1200,7 @@ | |||
2975 | 1200 | 1200 | ||
2976 | 1201 | quick_rm_table(*session, new_table_as_temporary); | 1201 | quick_rm_table(*session, new_table_as_temporary); |
2977 | 1202 | 1202 | ||
2979 | 1203 | mysql_rename_table(original_engine, original_table_to_drop, original_table_identifier, FN_FROM_IS_TMP); | 1203 | mysql_rename_table(original_engine, original_table_to_drop, original_table_identifier); |
2980 | 1204 | } | 1204 | } |
2981 | 1205 | else | 1205 | else |
2982 | 1206 | { | 1206 | { |
2983 | 1207 | 1207 | ||
2984 | === modified file 'drizzled/statement/rename_table.cc' | |||
2985 | --- drizzled/statement/rename_table.cc 2010-03-25 19:25:04 +0000 | |||
2986 | +++ drizzled/statement/rename_table.cc 2010-04-19 20:33:26 +0000 | |||
2987 | @@ -171,7 +171,7 @@ | |||
2988 | 171 | return 1; // This can't be skipped | 171 | return 1; // This can't be skipped |
2989 | 172 | } | 172 | } |
2990 | 173 | 173 | ||
2992 | 174 | rc= mysql_rename_table(engine, old_identifier, new_identifier, 0); | 174 | rc= mysql_rename_table(engine, old_identifier, new_identifier); |
2993 | 175 | if (rc && ! skip_error) | 175 | if (rc && ! skip_error) |
2994 | 176 | return true; | 176 | return true; |
2995 | 177 | 177 | ||
2996 | 178 | 178 | ||
2997 | === modified file 'drizzled/table.cc' | |||
2998 | --- drizzled/table.cc 2010-04-01 12:38:11 +0000 | |||
2999 | +++ drizzled/table.cc 2010-04-19 20:33:26 +0000 | |||
3000 | @@ -1885,32 +1885,6 @@ | |||
3001 | 1885 | } | 1885 | } |
3002 | 1886 | 1886 | ||
3003 | 1887 | /* | 1887 | /* |
3004 | 1888 | DESCRIPTION | ||
3005 | 1889 | given a buffer with a key value, and a map of keyparts | ||
3006 | 1890 | that are present in this value, returns the length of the value | ||
3007 | 1891 | */ | ||
3008 | 1892 | uint32_t calculate_key_len(Table *table, uint32_t key, | ||
3009 | 1893 | const unsigned char *, | ||
3010 | 1894 | key_part_map keypart_map) | ||
3011 | 1895 | { | ||
3012 | 1896 | /* works only with key prefixes */ | ||
3013 | 1897 | assert(((keypart_map + 1) & keypart_map) == 0); | ||
3014 | 1898 | |||
3015 | 1899 | KEY *key_info= table->s->key_info+key; | ||
3016 | 1900 | KEY_PART_INFO *key_part= key_info->key_part; | ||
3017 | 1901 | KEY_PART_INFO *end_key_part= key_part + key_info->key_parts; | ||
3018 | 1902 | uint32_t length= 0; | ||
3019 | 1903 | |||
3020 | 1904 | while (key_part < end_key_part && keypart_map) | ||
3021 | 1905 | { | ||
3022 | 1906 | length+= key_part->store_length; | ||
3023 | 1907 | keypart_map >>= 1; | ||
3024 | 1908 | key_part++; | ||
3025 | 1909 | } | ||
3026 | 1910 | return length; | ||
3027 | 1911 | } | ||
3028 | 1912 | |||
3029 | 1913 | /* | ||
3030 | 1914 | Check if database name is valid | 1888 | Check if database name is valid |
3031 | 1915 | 1889 | ||
3032 | 1916 | SYNPOSIS | 1890 | SYNPOSIS |
3033 | 1917 | 1891 | ||
3034 | === modified file 'drizzled/table_identifier.cc' | |||
3035 | --- drizzled/table_identifier.cc 2010-03-31 06:34:03 +0000 | |||
3036 | +++ drizzled/table_identifier.cc 2010-04-19 20:33:26 +0000 | |||
3037 | @@ -145,8 +145,7 @@ | |||
3038 | 145 | db Database name | 145 | db Database name |
3039 | 146 | table_name Table name | 146 | table_name Table name |
3040 | 147 | ext File extension. | 147 | ext File extension. |
3043 | 148 | flags FN_FROM_IS_TMP or FN_TO_IS_TMP | 148 | flags table_name is temporary, do not change. |
3042 | 149 | table_name is temporary, do not change. | ||
3044 | 150 | 149 | ||
3045 | 151 | NOTES | 150 | NOTES |
3046 | 152 | 151 | ||
3047 | @@ -174,7 +173,7 @@ | |||
3048 | 174 | bool conversion_error= false; | 173 | bool conversion_error= false; |
3049 | 175 | 174 | ||
3050 | 176 | memset(tbbuff, 0, sizeof(tbbuff)); | 175 | memset(tbbuff, 0, sizeof(tbbuff)); |
3052 | 177 | if (is_tmp) // FN_FROM_IS_TMP | FN_TO_IS_TMP | 176 | if (is_tmp) // It a conversion tmp |
3053 | 178 | { | 177 | { |
3054 | 179 | strncpy(tbbuff, table_name, sizeof(tbbuff)); | 178 | strncpy(tbbuff, table_name, sizeof(tbbuff)); |
3055 | 180 | } | 179 | } |
3056 | @@ -201,7 +200,7 @@ | |||
3057 | 201 | 200 | ||
3058 | 202 | 201 | ||
3059 | 203 | int rootdir_len= strlen(FN_ROOTDIR); | 202 | int rootdir_len= strlen(FN_ROOTDIR); |
3061 | 204 | path.append(drizzle_data_home); | 203 | path.append(data_home); |
3062 | 205 | ssize_t without_rootdir= path.length() - rootdir_len; | 204 | ssize_t without_rootdir= path.length() - rootdir_len; |
3063 | 206 | 205 | ||
3064 | 207 | /* Don't add FN_ROOTDIR if dirzzle_data_home already includes it */ | 206 | /* Don't add FN_ROOTDIR if dirzzle_data_home already includes it */ |
3065 | 208 | 207 | ||
3066 | === modified file 'extra/include.am' | |||
3067 | --- extra/include.am 2010-01-11 23:50:15 +0000 | |||
3068 | +++ extra/include.am 2010-04-19 20:33:26 +0000 | |||
3069 | @@ -4,7 +4,4 @@ | |||
3070 | 4 | 4 | ||
3071 | 5 | 5 | ||
3072 | 6 | extra_my_print_defaults_SOURCES= extra/my_print_defaults.cc | 6 | extra_my_print_defaults_SOURCES= extra/my_print_defaults.cc |
3077 | 7 | extra_my_print_defaults_LDADD= \ | 7 | extra_my_print_defaults_LDADD= $(CLIENT_LDADD) |
3074 | 8 | drizzled/internal/libinternal.la \ | ||
3075 | 9 | gnulib/libgnu.la \ | ||
3076 | 10 | $(LIBINTL) | ||
3078 | 11 | 8 | ||
3079 | === modified file 'plugin/archive/ha_archive.cc' | |||
3080 | --- plugin/archive/ha_archive.cc 2010-04-01 15:54:57 +0000 | |||
3081 | +++ plugin/archive/ha_archive.cc 2010-04-19 20:33:26 +0000 | |||
3082 | @@ -769,20 +769,11 @@ | |||
3083 | 769 | the optimizer that we have unique indexes, we scan | 769 | the optimizer that we have unique indexes, we scan |
3084 | 770 | */ | 770 | */ |
3085 | 771 | int ha_archive::index_read(unsigned char *buf, const unsigned char *key, | 771 | int ha_archive::index_read(unsigned char *buf, const unsigned char *key, |
3096 | 772 | uint32_t key_len, enum ha_rkey_function find_flag) | 772 | uint32_t key_len, enum ha_rkey_function) |
3087 | 773 | { | ||
3088 | 774 | int rc; | ||
3089 | 775 | rc= index_read_idx(buf, active_index, key, key_len, find_flag); | ||
3090 | 776 | return(rc); | ||
3091 | 777 | } | ||
3092 | 778 | |||
3093 | 779 | |||
3094 | 780 | int ha_archive::index_read_idx(unsigned char *buf, uint32_t index, const unsigned char *key, | ||
3095 | 781 | uint32_t key_len, enum ha_rkey_function) | ||
3097 | 782 | { | 773 | { |
3098 | 783 | int rc; | 774 | int rc; |
3099 | 784 | bool found= 0; | 775 | bool found= 0; |
3101 | 785 | KEY *mkey= &table->s->key_info[index]; | 776 | KEY *mkey= &table->s->key_info[0]; |
3102 | 786 | current_k_offset= mkey->key_part->offset; | 777 | current_k_offset= mkey->key_part->offset; |
3103 | 787 | current_key= key; | 778 | current_key= key; |
3104 | 788 | current_key_len= key_len; | 779 | current_key_len= key_len; |
3105 | 789 | 780 | ||
3106 | === modified file 'plugin/archive/ha_archive.h' | |||
3107 | --- plugin/archive/ha_archive.h 2010-02-12 21:18:37 +0000 | |||
3108 | +++ plugin/archive/ha_archive.h 2010-04-19 20:33:26 +0000 | |||
3109 | @@ -96,10 +96,6 @@ | |||
3110 | 96 | virtual int index_read(unsigned char * buf, const unsigned char * key, | 96 | virtual int index_read(unsigned char * buf, const unsigned char * key, |
3111 | 97 | uint32_t key_len, | 97 | uint32_t key_len, |
3112 | 98 | drizzled::ha_rkey_function find_flag); | 98 | drizzled::ha_rkey_function find_flag); |
3113 | 99 | virtual int index_read_idx(unsigned char * buf, uint32_t index, | ||
3114 | 100 | const unsigned char * key, | ||
3115 | 101 | uint32_t key_len, | ||
3116 | 102 | drizzled::ha_rkey_function find_flag); | ||
3117 | 103 | int index_next(unsigned char * buf); | 99 | int index_next(unsigned char * buf); |
3118 | 104 | int open(const char *name, int mode, uint32_t test_if_locked); | 100 | int open(const char *name, int mode, uint32_t test_if_locked); |
3119 | 105 | int close(void); | 101 | int close(void); |
3120 | 106 | 102 | ||
3121 | === modified file 'plugin/innobase/handler/ha_innodb.cc' | |||
3122 | --- plugin/innobase/handler/ha_innodb.cc 2010-04-15 16:00:18 +0000 | |||
3123 | +++ plugin/innobase/handler/ha_innodb.cc 2010-04-19 20:33:26 +0000 | |||
3124 | @@ -6469,7 +6469,7 @@ | |||
3125 | 6469 | } | 6469 | } |
3126 | 6470 | 6470 | ||
3127 | 6471 | snprintf(path, sizeof(path), "%s/%s%s", | 6471 | snprintf(path, sizeof(path), "%s/%s%s", |
3129 | 6472 | drizzle_data_home, ib_table->name, ".dfe"); | 6472 | data_home, ib_table->name, ".dfe"); |
3130 | 6473 | 6473 | ||
3131 | 6474 | internal::unpack_filename(path,path); | 6474 | internal::unpack_filename(path,path); |
3132 | 6475 | 6475 | ||
3133 | 6476 | 6476 | ||
3134 | === modified file 'plugin/myisam/plugin.ini' | |||
3135 | --- plugin/myisam/plugin.ini 2010-02-04 08:14:46 +0000 | |||
3136 | +++ plugin/myisam/plugin.ini 2010-04-19 20:33:26 +0000 | |||
3137 | @@ -18,6 +18,6 @@ | |||
3138 | 18 | description=Legacy non-transactional MySQL tables | 18 | description=Legacy non-transactional MySQL tables |
3139 | 19 | load_by_default=yes | 19 | load_by_default=yes |
3140 | 20 | sources=ha_myisam.cc | 20 | sources=ha_myisam.cc |
3142 | 21 | libs=plugin/myisam/libmyisam.la drizzled/internal/libinternal.la | 21 | libs=plugin/myisam/libmyisam.la |
3143 | 22 | ldflags=$(LIBZ) $(LIBINTL) | 22 | ldflags=$(LIBZ) $(LIBINTL) |
3144 | 23 | static=yes | 23 | static=yes |
3145 | 24 | 24 | ||
3146 | === modified file 'plugin/pbxt/src/ha_pbxt.h' | |||
3147 | --- plugin/pbxt/src/ha_pbxt.h 2010-04-14 16:29:40 +0000 | |||
3148 | +++ plugin/pbxt/src/ha_pbxt.h 2010-04-19 20:33:26 +0000 | |||
3149 | @@ -256,11 +256,11 @@ | |||
3150 | 256 | int index_end(); | 256 | int index_end(); |
3151 | 257 | int index_read(byte * buf, const byte * key, | 257 | int index_read(byte * buf, const byte * key, |
3152 | 258 | uint key_len, enum ha_rkey_function find_flag); | 258 | uint key_len, enum ha_rkey_function find_flag); |
3158 | 259 | int index_read_idx(byte * buf, uint idx, const byte * key, | 259 | int index_read_idx(byte * buf, uint idx, const byte * key, |
3159 | 260 | uint key_len, enum ha_rkey_function find_flag); | 260 | uint key_len, enum ha_rkey_function find_flag); |
3160 | 261 | int index_read_xt(byte * buf, uint idx, const byte * key, | 261 | int index_read_xt(byte * buf, uint idx, const byte * key, |
3161 | 262 | uint key_len, enum ha_rkey_function find_flag); | 262 | uint key_len, enum ha_rkey_function find_flag); |
3162 | 263 | int index_next(byte * buf); | 263 | int index_next(byte * buf); |
3163 | 264 | int index_next_same(byte * buf, const byte *key, uint length); | 264 | int index_next_same(byte * buf, const byte *key, uint length); |
3164 | 265 | int index_prev(byte * buf); | 265 | int index_prev(byte * buf); |
3165 | 266 | int index_first(byte * buf); | 266 | int index_first(byte * buf); |
3166 | 267 | 267 | ||
3167 | === modified file 'plugin/pbxt/src/myxt_xt.cc' | |||
3168 | --- plugin/pbxt/src/myxt_xt.cc 2010-04-14 16:29:40 +0000 | |||
3169 | +++ plugin/pbxt/src/myxt_xt.cc 2010-04-19 20:33:26 +0000 | |||
3170 | @@ -2082,7 +2082,7 @@ | |||
3171 | 2082 | message::Table::STANDARD); | 2082 | message::Table::STANDARD); |
3172 | 2083 | } else { | 2083 | } else { |
3173 | 2084 | std::string n; | 2084 | std::string n; |
3175 | 2085 | n.append(drizzle_data_home); | 2085 | n.append(data_home); |
3176 | 2086 | n.append("/"); | 2086 | n.append("/"); |
3177 | 2087 | n.append(db_name); | 2087 | n.append(db_name); |
3178 | 2088 | n.append("/"); | 2088 | n.append("/"); |
3179 | 2089 | 2089 | ||
3180 | === modified file 'plugin/pbxt/src/table_xt.cc' | |||
3181 | --- plugin/pbxt/src/table_xt.cc 2010-04-08 17:52:00 +0000 | |||
3182 | +++ plugin/pbxt/src/table_xt.cc 2010-04-19 20:33:26 +0000 | |||
3183 | @@ -683,17 +683,25 @@ | |||
3184 | 683 | * Previously we only caclulated statistics when a handler was opened | 683 | * Previously we only caclulated statistics when a handler was opened |
3185 | 684 | * and the underlying table was also opened. | 684 | * and the underlying table was also opened. |
3186 | 685 | */ | 685 | */ |
3187 | 686 | /* This (hack) fixes: warning: variable 'edx' might be clobbered by 'longjmp' or 'vfork' */ | ||
3188 | 687 | u_int save_edx; | ||
3189 | 688 | |||
3190 | 686 | xt_enum_tables_init(&edx); | 689 | xt_enum_tables_init(&edx); |
3191 | 687 | while ((te_ptr = xt_enum_tables_next(self, db, &edx))) { | 690 | while ((te_ptr = xt_enum_tables_next(self, db, &edx))) { |
3192 | 691 | save_edx = edx; | ||
3193 | 692 | |||
3194 | 688 | xt_strcpy(PATH_MAX, pbuf, te_ptr->te_tab_path->tp_path); | 693 | xt_strcpy(PATH_MAX, pbuf, te_ptr->te_tab_path->tp_path); |
3195 | 689 | xt_add_dir_char(PATH_MAX, pbuf); | 694 | xt_add_dir_char(PATH_MAX, pbuf); |
3196 | 690 | xt_strcat(PATH_MAX, pbuf, te_ptr->te_tab_name); | 695 | xt_strcat(PATH_MAX, pbuf, te_ptr->te_tab_name); |
3197 | 691 | try_(a) { | 696 | try_(a) { |
3198 | 697 | edx = 0; | ||
3199 | 692 | xt_heap_release(self, xt_use_table_no_lock(self, db, (XTPathStrPtr)pbuf, FALSE, FALSE, NULL)); | 698 | xt_heap_release(self, xt_use_table_no_lock(self, db, (XTPathStrPtr)pbuf, FALSE, FALSE, NULL)); |
3200 | 693 | } catch_(a) { | 699 | } catch_(a) { |
3201 | 700 | edx = 0; | ||
3202 | 694 | /* ignore errors */ | 701 | /* ignore errors */ |
3203 | 695 | xt_log_and_clear_warning(self); | 702 | xt_log_and_clear_warning(self); |
3204 | 696 | } cont_(a); | 703 | } cont_(a); |
3205 | 704 | edx = save_edx; | ||
3206 | 697 | } | 705 | } |
3207 | 698 | 706 | ||
3208 | 699 | popr_(); // Discard xt_tab_exit_db(db) | 707 | popr_(); // Discard xt_tab_exit_db(db) |
3209 | 700 | 708 | ||
3210 | === modified file 'plugin/pbxt/src/xt_defs.h' | |||
3211 | --- plugin/pbxt/src/xt_defs.h 2010-04-08 16:11:29 +0000 | |||
3212 | +++ plugin/pbxt/src/xt_defs.h 2010-04-19 20:33:26 +0000 | |||
3213 | @@ -903,7 +903,7 @@ | |||
3214 | 903 | 903 | ||
3215 | 904 | #define my_pthread_setspecific_ptr(T, V) pthread_setspecific(T, (void*) (V)) | 904 | #define my_pthread_setspecific_ptr(T, V) pthread_setspecific(T, (void*) (V)) |
3216 | 905 | 905 | ||
3218 | 906 | #define mysql_real_data_home drizzle_real_data_home | 906 | #define mysql_real_data_home ::drizzled::data_home |
3219 | 907 | 907 | ||
3220 | 908 | #define mi_int4store(T,A) { uint32_t def_temp= (uint32_t) (A);\ | 908 | #define mi_int4store(T,A) { uint32_t def_temp= (uint32_t) (A);\ |
3221 | 909 | ((unsigned char*) (T))[3]= (unsigned char) (def_temp);\ | 909 | ((unsigned char*) (T))[3]= (unsigned char) (def_temp);\ |
3222 | 910 | 910 | ||
3223 | === modified file 'plugin/schema_engine/schema.cc' | |||
3224 | --- plugin/schema_engine/schema.cc 2010-04-01 15:54:57 +0000 | |||
3225 | +++ plugin/schema_engine/schema.cc 2010-04-19 20:33:26 +0000 | |||
3226 | @@ -69,7 +69,7 @@ | |||
3227 | 69 | 69 | ||
3228 | 70 | void Schema::prime() | 70 | void Schema::prime() |
3229 | 71 | { | 71 | { |
3231 | 72 | CachedDirectory directory(drizzle_data_home, CachedDirectory::DIRECTORY); | 72 | CachedDirectory directory(data_home, CachedDirectory::DIRECTORY); |
3232 | 73 | CachedDirectory::Entries files= directory.getEntries(); | 73 | CachedDirectory::Entries files= directory.getEntries(); |
3233 | 74 | 74 | ||
3234 | 75 | pthread_rwlock_wrlock(&schema_lock); | 75 | pthread_rwlock_wrlock(&schema_lock); |
3235 | @@ -113,7 +113,7 @@ | |||
3236 | 113 | 113 | ||
3237 | 114 | // If for some reason getting a lock should fail, we resort to disk | 114 | // If for some reason getting a lock should fail, we resort to disk |
3238 | 115 | 115 | ||
3240 | 116 | CachedDirectory directory(drizzle_data_home, CachedDirectory::DIRECTORY); | 116 | CachedDirectory directory(data_home, CachedDirectory::DIRECTORY); |
3241 | 117 | 117 | ||
3242 | 118 | CachedDirectory::Entries files= directory.getEntries(); | 118 | CachedDirectory::Entries files= directory.getEntries(); |
3243 | 119 | 119 | ||
3244 | 120 | 120 | ||
3245 | === modified file 'plugin/signal_handler/signal_handler.cc' | |||
3246 | --- plugin/signal_handler/signal_handler.cc 2010-03-26 21:36:11 +0000 | |||
3247 | +++ plugin/signal_handler/signal_handler.cc 2010-04-19 20:33:26 +0000 | |||
3248 | @@ -23,6 +23,7 @@ | |||
3249 | 23 | #include "drizzled/internal/my_pthread.h" | 23 | #include "drizzled/internal/my_pthread.h" |
3250 | 24 | #include "drizzled/internal/my_sys.h" | 24 | #include "drizzled/internal/my_sys.h" |
3251 | 25 | #include "drizzled/plugin/daemon.h" | 25 | #include "drizzled/plugin/daemon.h" |
3252 | 26 | #include "drizzled/signal_handler.h" | ||
3253 | 26 | 27 | ||
3254 | 27 | #include <sys/stat.h> | 28 | #include <sys/stat.h> |
3255 | 28 | #include <fcntl.h> | 29 | #include <fcntl.h> |
3256 | @@ -67,7 +68,7 @@ | |||
3257 | 67 | kill_in_progress=true; | 68 | kill_in_progress=true; |
3258 | 68 | abort_loop=1; // This should be set | 69 | abort_loop=1; // This should be set |
3259 | 69 | if (sig != 0) // 0 is not a valid signal number | 70 | if (sig != 0) // 0 is not a valid signal number |
3261 | 70 | my_sigset(sig, SIG_IGN); /* purify inspected */ | 71 | ignore_signal(sig); /* purify inspected */ |
3262 | 71 | if (sig == SIGTERM || sig == 0) | 72 | if (sig == SIGTERM || sig == 0) |
3263 | 72 | errmsg_printf(ERRMSG_LVL_INFO, _(ER(ER_NORMAL_SHUTDOWN)),internal::my_progname); | 73 | errmsg_printf(ERRMSG_LVL_INFO, _(ER(ER_NORMAL_SHUTDOWN)),internal::my_progname); |
3264 | 73 | else | 74 | else |
3265 | 74 | 75 | ||
3266 | === modified file 'support-files/drizzle.spec.in' | |||
3267 | --- support-files/drizzle.spec.in 2010-03-30 09:29:02 +0000 | |||
3268 | +++ support-files/drizzle.spec.in 2010-04-19 20:33:26 +0000 | |||
3269 | @@ -479,6 +479,12 @@ | |||
3270 | 479 | %{_includedir}/drizzled/version.h | 479 | %{_includedir}/drizzled/version.h |
3271 | 480 | %{_includedir}/drizzled/visibility.h | 480 | %{_includedir}/drizzled/visibility.h |
3272 | 481 | %{_includedir}/drizzled/xid.h | 481 | %{_includedir}/drizzled/xid.h |
3273 | 482 | %{_libdir}/libdrizzled.la | ||
3274 | 483 | %{_libdir}/libdrizzled.so | ||
3275 | 484 | %{_libdir}/libdrizzled.so.* | ||
3276 | 485 | %{_libdir}/libdrizzledmessage.la | ||
3277 | 486 | %{_libdir}/libdrizzledmessage.so | ||
3278 | 487 | %{_libdir}/libdrizzledmessage.so.* | ||
3279 | 482 | %{_libdir}/drizzle/libarchive_plugin.la | 488 | %{_libdir}/drizzle/libarchive_plugin.la |
3280 | 483 | %{_libdir}/drizzle/libarchive_plugin.so | 489 | %{_libdir}/drizzle/libarchive_plugin.so |
3281 | 484 | %{_libdir}/drizzle/libascii_plugin.la | 490 | %{_libdir}/drizzle/libascii_plugin.la |
3282 | 485 | 491 | ||
3283 | === modified file 'tests/test-run.pl' | |||
3284 | --- tests/test-run.pl 2010-03-31 18:10:36 +0000 | |||
3285 | +++ tests/test-run.pl 2010-04-19 20:33:26 +0000 | |||
3286 | @@ -3337,17 +3337,19 @@ | |||
3287 | 3337 | # write init file for mysqld | 3337 | # write init file for mysqld |
3288 | 3338 | mtr_tofile($gdb_init_file, | 3338 | mtr_tofile($gdb_init_file, |
3289 | 3339 | "set args $str\n" . | 3339 | "set args $str\n" . |
3290 | 3340 | "set breakpoint pending on\n" . | ||
3291 | 3340 | "break drizzled::mysql_parse\n" . | 3341 | "break drizzled::mysql_parse\n" . |
3292 | 3341 | "commands 1\n" . | 3342 | "commands 1\n" . |
3293 | 3342 | "disable 1\n" . | 3343 | "disable 1\n" . |
3294 | 3343 | "end\n" . | 3344 | "end\n" . |
3295 | 3345 | "set breakpoint pending off\n" . | ||
3296 | 3344 | "run"); | 3346 | "run"); |
3297 | 3345 | } | 3347 | } |
3298 | 3346 | 3348 | ||
3299 | 3347 | if ( $opt_manual_gdb ) | 3349 | if ( $opt_manual_gdb ) |
3300 | 3348 | { | 3350 | { |
3301 | 3349 | print "\nTo start gdb for $type, type in another window:\n"; | 3351 | print "\nTo start gdb for $type, type in another window:\n"; |
3303 | 3350 | print "gdb -cd $glob_mysql_test_dir -x $gdb_init_file $$exe\n"; | 3352 | print "$glob_mysql_test_dir/../libtool --mode=execute gdb -cd $glob_mysql_test_dir -x $gdb_init_file $$exe\n"; |
3304 | 3351 | 3353 | ||
3305 | 3352 | # Indicate the exe should not be started | 3354 | # Indicate the exe should not be started |
3306 | 3353 | $$exe= undef; | 3355 | $$exe= undef; |
3307 | 3354 | 3356 | ||
3308 | === modified file 'tests/valgrind.supp' | |||
3309 | --- tests/valgrind.supp 2010-04-12 23:31:44 +0000 | |||
3310 | +++ tests/valgrind.supp 2010-04-19 20:33:26 +0000 | |||
3311 | @@ -964,6 +964,30 @@ | |||
3312 | 964 | } | 964 | } |
3313 | 965 | 965 | ||
3314 | 966 | { | 966 | { |
3315 | 967 | thr_local_hash static initialization | ||
3316 | 968 | Memcheck:Leak | ||
3317 | 969 | fun:malloc | ||
3318 | 970 | fun:mem_heap_create_block | ||
3319 | 971 | ... | ||
3320 | 972 | fun:_ZL13innobase_initR14PluginRegistry | ||
3321 | 973 | fun:_Z11plugin_initPiPPci | ||
3322 | 974 | fun:_ZL22init_server_componentsv | ||
3323 | 975 | fun:main | ||
3324 | 976 | } | ||
3325 | 977 | |||
3326 | 978 | { | ||
3327 | 979 | thr_local_hash static initialization | ||
3328 | 980 | Memcheck:Leak | ||
3329 | 981 | fun:malloc | ||
3330 | 982 | fun:ut_malloc_low | ||
3331 | 983 | ... | ||
3332 | 984 | fun:_ZL13innobase_initR14PluginRegistry | ||
3333 | 985 | fun:_Z11plugin_initPiPPci | ||
3334 | 986 | fun:_ZL22init_server_componentsv | ||
3335 | 987 | fun:main | ||
3336 | 988 | } | ||
3337 | 989 | |||
3338 | 990 | { | ||
3339 | 967 | InnoDB Garbage | 991 | InnoDB Garbage |
3340 | 968 | Memcheck:Value8 | 992 | Memcheck:Value8 |
3341 | 969 | ... | 993 | ... |
Looks great! Excited to get the new main.cc whittled down even more.