Merge lp:~mordred/drizzle/drizzled-as-lib into lp:~drizzle-trunk/drizzle/development
- drizzled-as-lib
- Merge into development
Status: | Superseded |
---|---|
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: |
2614 lines (+1107/-860) 30 files modified
Makefile.am (+2/-1) drizzled/data_home.h (+5/-3) drizzled/drizzled.cc (+45/-470) drizzled/drizzled.h (+65/-0) drizzled/function/str/load_file.cc (+1/-1) drizzled/include.am (+340/-328) drizzled/internal/include.am (+2/-1) drizzled/internal/my_pthread.h (+0/-24) drizzled/main.cc (+313/-0) drizzled/message/include.am (+4/-3) drizzled/pthread_globals.h (+1/-0) drizzled/schema_identifier.cc (+1/-1) drizzled/session.cc (+4/-5) 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/stacktrace.cc (+11/-2) drizzled/stacktrace.h (+0/-4) drizzled/table_identifier.cc (+1/-1) extra/include.am (+1/-4) plugin/innobase/handler/ha_innodb.cc (+1/-1) plugin/myisam/plugin.ini (+1/-1) plugin/schema_engine/schema.cc (+2/-2) plugin/schema_engine/tests/r/exists.result (+1/-1) plugin/signal_handler/signal_handler.cc (+2/-1) support-files/drizzle.spec.in (+6/-0) tests/test-run.pl (+2/-0) 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 |
---|---|---|---|
Brian Aker | Needs Fixing | ||
Eric Day (community) | Approve | ||
Review via email: mp+22505@code.launchpad.net |
This proposal has been superseded by 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!
Monty Taylor (mordred) wrote : | # |
Slight issue with the gdbinit file when starting from mtr I need to fix...
Monty Taylor (mordred) wrote : | # |
Got it.
- 1418. By Brian Aker <brian@gaz>
-
Merge Monty's fix.
- 1419. By Brian Aker <brian@gaz>
-
Merge.
- 1420. By Brian Aker <brian@gaz>
-
Updated to use show schemas specific table.
- 1421. By Brian Aker <brian@gaz>
-
Removed dead function.
- 1422. By Brian Aker <brian@gaz>
-
Merge from Monty.
- 1423. By Brian Aker <brian@gaz>
-
Merge linuxjedi
- 1424. By Brian Aker <brian@gaz>
-
Merge Stewart.
- 1425. By Brian Aker <brian@gaz>
-
Merge Siddharth
- 1426. By Brian Aker <brian@gaz>
-
Merge jobin
- 1427. By Brian Aker <brian@gaz>
-
Merge Monty
- 1428. By Brian Aker <brian@gaz>
-
Merge.
- 1429. By Brian Aker <brian@gaz>
-
Merge
- 1430. By Brian Aker <brian@gaz>
-
Merge Zimin
- 1431. By Brian Aker <brian@gaz>
-
Merge Stewart.
- 1432. By Brian Aker <brian@gaz>
-
Merge Siddharth
- 1433. By Brian Aker <brian@gaz>
-
Merge.
- 1434. By Brian Aker <brian@gaz>
-
Rework to move show commands merge/etc.
Brian Aker (brianaker) wrote : | # |
Hi!
This has some of the DRIZZLE_
Cheers,
-Brian
- 1435. By Brian Aker <brian@gaz>
-
Merge Monty fix.
- 1436. By Brian Aker <brian@gaz>
-
Move toward not having to call current_session (first pass).
- 1437. By Brian Aker <brian@gaz>
-
Merge.
- 1438. By Brian Aker <brian@gaz>
-
Merge
- 1439. By Brian Aker <brian@gaz>
-
Fix for bad header.
- 1440. By Brian Aker <brian@gaz>
-
Merge.
- 1441. By Brian Aker <brian@gaz>
-
Fixing tests to work with PBXT.
- 1442. By Brian Aker <brian@gaz>
-
Merge Jay
- 1443. By Brian Aker <brian@gaz>
-
Merge Jay
- 1444. By Brian Aker <brian@gaz>
-
Merge Stewart.
- 1445. By Brian Aker <brian@gaz>
-
Update for most recent version of libmemcached
- 1446. By Brian Aker <brian@gaz>
-
Merge Jay
- 1447. By Brian Aker <brian@gaz>
-
Test fix
- 1448. By Brian Aker <brian@gaz>
-
Fix for bug on show tables.:w
:x - 1449. By Brian Aker <brian@gaz>
-
Merge Stewart
- 1450. By Brian Aker <brian@gaz>
-
Merge Jay
- 1451. By Brian Aker <brian@gaz>
-
Merge Eric
- 1452. By Brian Aker <brian@gaz>
-
Remove dead code Merge from Tim.
- 1453. By Brian Aker <brian@gaz>
-
Merge Joe
- 1454. By Brian Aker <brian@gaz>
-
Merge Monty
- 1455. By Brian Aker <brian@gaz>
-
Null merge
- 1456. By Brian Aker <brian@gaz>
-
Merge in remove checksum code.
- 1457. By Brian Aker <brian@gaz>
-
Commit.
- 1458. By Brian Aker <brian@gaz>
-
Merge Joe
- 1459. By Brian Aker <brian@gaz>
-
Merge Monty
- 1460. By Brian Aker <brian@gaz>
-
Seeing static effects valgrind output
- 1461. By Brian Aker <brian@gaz>
-
Merge version requirement
- 1462. By Brian Aker <brian@gaz>
-
Merge PBXT
- 1463. By Brian Aker <brian@gaz>
-
Merge change to load by default
- 1464. By Brian Aker <brian@gaz>
-
Merge Jay
- 1465. By Brian Aker <brian@gaz>
-
Merge
- 1466. By Brian Aker <brian@gaz>
-
Merge
- 1467. By Brian Aker <brian@gaz>
-
Merge.
- 1468. By Brian Aker <brian@gaz>
-
Fix
- 1469. By Brian Aker <brian@gaz>
-
Stored.
- 1470. By Brian Aker <brian@gaz>
-
Merge of Monty
- 1471. By Brian Aker <brian@gaz>
-
Merge Monty
- 1472. By Monty Taylor
-
Latest pandora-build. Moves the lint check to only run distcheck.
- 1473. By Monty Taylor
-
Merged in old drizzled-as-lib patch.
- 1474. By Monty Taylor
-
Added a missing file.
- 1475. By Monty Taylor
-
Merged trunk.
- 1476. By Monty Taylor
-
Fixed a symbol oops.
- 1477. By Monty Taylor
-
Merged up with build.
- 1478. By Monty Taylor
-
We need to launch drizzled via libtool now.
Unmerged revisions
Preview Diff
1 | === modified file 'Makefile.am' |
2 | --- Makefile.am 2010-03-23 08:23:32 +0000 |
3 | +++ Makefile.am 2010-04-01 19:20:51 +0000 |
4 | @@ -22,6 +22,7 @@ |
5 | noinst_HEADERS = |
6 | nobase_nodist_include_HEADERS = |
7 | nobase_dist_include_HEADERS = |
8 | +sbin_PROGRAMS = |
9 | lib_LTLIBRARIES = |
10 | noinst_LTLIBRARIES = |
11 | noinst_PROGRAMS = |
12 | @@ -136,11 +137,11 @@ |
13 | |
14 | include config/lint-source.am |
15 | |
16 | +include drizzled/message/include.am |
17 | include drizzled/include.am |
18 | include drizzled/internal/include.am |
19 | include drizzled/algorithm/include.am |
20 | include drizzled/util/include.am |
21 | -include drizzled/message/include.am |
22 | include client/include.am |
23 | include extra/include.am |
24 | include support-files/include.am |
25 | |
26 | === modified file 'drizzled/data_home.h' |
27 | --- drizzled/data_home.h 2010-02-04 08:14:46 +0000 |
28 | +++ drizzled/data_home.h 2010-04-01 19:20:51 +0000 |
29 | @@ -23,9 +23,11 @@ |
30 | namespace drizzled |
31 | { |
32 | |
33 | -extern uint32_t drizzle_data_home_len; |
34 | -extern char *drizzle_data_home, |
35 | - drizzle_real_data_home[], drizzle_unpacked_real_data_home[]; |
36 | +extern char *data_home; |
37 | +extern uint32_t data_home_len; |
38 | +extern char data_home_real[]; |
39 | +extern char data_home_real_unpacked[]; |
40 | +extern char data_home_buff[]; |
41 | |
42 | } /* namespace drizzled */ |
43 | |
44 | |
45 | === modified file 'drizzled/drizzled.cc' |
46 | --- drizzled/drizzled.cc 2010-03-26 21:36:11 +0000 |
47 | +++ drizzled/drizzled.cc 2010-04-01 19:20:51 +0000 |
48 | @@ -31,7 +31,6 @@ |
49 | #include "drizzled/internal/my_sys.h" |
50 | #include "drizzled/internal/my_bit.h" |
51 | #include <drizzled/my_hash.h> |
52 | -#include <drizzled/stacktrace.h> |
53 | #include <drizzled/error.h> |
54 | #include <drizzled/errmsg_print.h> |
55 | #include <drizzled/tztime.h> |
56 | @@ -53,6 +52,7 @@ |
57 | #include "drizzled/session_list.h" |
58 | #include "drizzled/charset.h" |
59 | #include "plugin/myisam/myisam.h" |
60 | +#include "drizzled/drizzled.h" |
61 | |
62 | #include <google/protobuf/stubs/common.h> |
63 | |
64 | @@ -72,8 +72,6 @@ |
65 | #endif |
66 | #include <sys/socket.h> |
67 | |
68 | -#include <locale.h> |
69 | - |
70 | |
71 | #include <errno.h> |
72 | #include <sys/stat.h> |
73 | @@ -84,8 +82,6 @@ |
74 | #include <pwd.h> // For getpwent |
75 | #include <grp.h> |
76 | |
77 | -#include <sys/resource.h> |
78 | - |
79 | #ifdef HAVE_SELECT_H |
80 | # include <select.h> |
81 | #endif |
82 | @@ -190,8 +186,8 @@ |
83 | /* |
84 | Used with --help for detailed option |
85 | */ |
86 | -static bool opt_help= false; |
87 | -static bool opt_help_extended= false; |
88 | +bool opt_help= false; |
89 | +bool opt_help_extended= false; |
90 | |
91 | arg_cmp_func Arg_comparator::comparator_matrix[5][2] = |
92 | {{&Arg_comparator::compare_string, &Arg_comparator::compare_e_string}, |
93 | @@ -202,12 +198,9 @@ |
94 | |
95 | /* static variables */ |
96 | |
97 | -static bool volatile select_thread_in_use; |
98 | -static bool volatile ready_to_exit; |
99 | static bool opt_debugging= 0; |
100 | static uint32_t wake_thread; |
101 | -static uint32_t killed_threads; |
102 | -static char *drizzled_user, *drizzled_chroot; |
103 | +static char *drizzled_chroot; |
104 | static char *language_ptr; |
105 | static const char *default_character_set_name; |
106 | static const char *character_set_filesystem_name; |
107 | @@ -218,6 +211,9 @@ |
108 | |
109 | /* Global variables */ |
110 | |
111 | +bool volatile ready_to_exit; |
112 | +char *drizzled_user; |
113 | +bool volatile select_thread_in_use; |
114 | bool volatile abort_loop; |
115 | bool volatile shutdown_in_progress; |
116 | uint32_t max_used_connections; |
117 | @@ -234,7 +230,7 @@ |
118 | |
119 | char* opt_secure_file_priv= 0; |
120 | |
121 | -static bool calling_initgroups= false; /**< Used in SIGSEGV handler. */ |
122 | +bool calling_initgroups= false; /**< Used in SIGSEGV handler. */ |
123 | |
124 | uint32_t drizzled_bind_timeout; |
125 | std::bitset<12> test_flags; |
126 | @@ -293,15 +289,15 @@ |
127 | char drizzle_home[FN_REFLEN], pidfile_name[FN_REFLEN], system_time_zone[30]; |
128 | char *default_tz_name; |
129 | char glob_hostname[FN_REFLEN]; |
130 | -char drizzle_real_data_home[FN_REFLEN], |
131 | +char data_home_real[FN_REFLEN], |
132 | language[FN_REFLEN], |
133 | *opt_tc_log_file; |
134 | -char drizzle_unpacked_real_data_home[FN_REFLEN]; |
135 | +char data_home_real_unpacked[FN_REFLEN]; |
136 | const key_map key_map_empty(0); |
137 | key_map key_map_full(0); // Will be initialized later |
138 | |
139 | -uint32_t drizzle_data_home_len; |
140 | -char drizzle_data_home_buff[2], *drizzle_data_home=drizzle_real_data_home; |
141 | +uint32_t data_home_len; |
142 | +char data_home_buff[2], *data_home=data_home_real; |
143 | char *drizzle_tmpdir= NULL; |
144 | char *opt_drizzle_tmpdir= NULL; |
145 | |
146 | @@ -346,15 +342,12 @@ |
147 | |
148 | /* Static variables */ |
149 | |
150 | -static bool segfaulted; |
151 | int cleanup_done; |
152 | static char *drizzle_home_ptr, *pidfile_name_ptr; |
153 | static int defaults_argc; |
154 | static char **defaults_argv; |
155 | |
156 | -struct passwd *user_info; |
157 | -static pthread_t select_thread; |
158 | -static uint32_t thr_kill_signal; |
159 | +passwd *user_info; |
160 | |
161 | /** |
162 | Number of currently active user connections. The variable is protected by |
163 | @@ -378,10 +371,8 @@ |
164 | static const char *get_relative_path(const char *path); |
165 | static void fix_paths(string &progname); |
166 | extern "C" pthread_handler_t handle_slave(void *arg); |
167 | -static void clean_up(bool print_message); |
168 | |
169 | static void usage(void); |
170 | -static void clean_up_mutexes(void); |
171 | void close_connections(void); |
172 | |
173 | /**************************************************************************** |
174 | @@ -466,20 +457,6 @@ |
175 | } |
176 | } |
177 | |
178 | -extern "C" void print_signal_warning(int sig); |
179 | - |
180 | -extern "C" void print_signal_warning(int sig) |
181 | -{ |
182 | - if (global_system_variables.log_warnings) |
183 | - errmsg_printf(ERRMSG_LVL_WARN, _("Got signal %d from thread %"PRIu64), |
184 | - sig, global_thread_id); |
185 | -#ifndef HAVE_BSD_SIGNALS |
186 | - my_sigset(sig,print_signal_warning); /* int. thread system calls */ |
187 | -#endif |
188 | - if (sig == SIGALRM) |
189 | - alarm(2); /* reschedule alarm */ |
190 | -} |
191 | - |
192 | /** |
193 | cleanup all memory and end program nicely. |
194 | |
195 | @@ -516,7 +493,7 @@ |
196 | } |
197 | |
198 | |
199 | -static void clean_up(bool print_message) |
200 | +void clean_up(bool print_message) |
201 | { |
202 | if (cleanup_done++) |
203 | return; |
204 | @@ -558,7 +535,7 @@ |
205 | } /* clean_up */ |
206 | |
207 | |
208 | -static void clean_up_mutexes() |
209 | +void clean_up_mutexes() |
210 | { |
211 | (void) pthread_mutex_destroy(&LOCK_create_db); |
212 | (void) pthread_mutex_destroy(&LOCK_open); |
213 | @@ -576,9 +553,9 @@ |
214 | |
215 | /* Change to run as another user if started with --user */ |
216 | |
217 | -static struct passwd *check_user(const char *user) |
218 | +passwd *check_user(const char *user) |
219 | { |
220 | - struct passwd *tmp_user_info; |
221 | + passwd *tmp_user_info; |
222 | uid_t user_id= geteuid(); |
223 | |
224 | // Don't bother if we aren't superuser |
225 | @@ -636,7 +613,7 @@ |
226 | |
227 | } |
228 | |
229 | -static void set_user(const char *user, struct passwd *user_info_arg) |
230 | +void set_user(const char *user, passwd *user_info_arg) |
231 | { |
232 | assert(user_info_arg != 0); |
233 | /* |
234 | @@ -661,6 +638,7 @@ |
235 | } |
236 | |
237 | |
238 | + |
239 | /** Change root user if started with @c --chroot . */ |
240 | static void set_root(const char *path) |
241 | { |
242 | @@ -671,21 +649,6 @@ |
243 | } |
244 | } |
245 | |
246 | -extern "C" void end_thread_signal(int ); |
247 | - |
248 | -/** Called when a thread is aborted. */ |
249 | -extern "C" void end_thread_signal(int ) |
250 | -{ |
251 | - Session *session=current_session; |
252 | - if (session) |
253 | - { |
254 | - statistic_increment(killed_threads, &LOCK_status); |
255 | - session->scheduler->killSessionNow(session); |
256 | - DRIZZLE_CONNECTION_DONE(session->thread_id); |
257 | - } |
258 | - return; |
259 | -} |
260 | - |
261 | |
262 | /* |
263 | Unlink session from global list of available connections and free session |
264 | @@ -733,148 +696,6 @@ |
265 | } |
266 | #endif |
267 | |
268 | -#if defined(BACKTRACE_DEMANGLE) |
269 | -#include <cxxabi.h> |
270 | -extern "C" char *my_demangle(const char *mangled_name, int *status) |
271 | -{ |
272 | - return abi::__cxa_demangle(mangled_name, NULL, NULL, status); |
273 | -} |
274 | -#endif |
275 | - |
276 | -extern "C" void handle_segfault(int sig); |
277 | - |
278 | -extern "C" void handle_segfault(int sig) |
279 | -{ |
280 | - time_t curr_time; |
281 | - struct tm tm; |
282 | - |
283 | - /* |
284 | - Strictly speaking, one needs a mutex here |
285 | - but since we have got SIGSEGV already, things are a mess |
286 | - so not having the mutex is not as bad as possibly using a buggy |
287 | - mutex - so we keep things simple |
288 | - */ |
289 | - if (segfaulted) |
290 | - { |
291 | - fprintf(stderr, _("Fatal signal %d while backtracing\n"), sig); |
292 | - exit(1); |
293 | - } |
294 | - |
295 | - segfaulted = 1; |
296 | - |
297 | - curr_time= time(NULL); |
298 | - if(curr_time == (time_t)-1) |
299 | - { |
300 | - fprintf(stderr, "Fetal: time() call failed\n"); |
301 | - exit(1); |
302 | - } |
303 | - |
304 | - localtime_r(&curr_time, &tm); |
305 | - |
306 | - fprintf(stderr,"%02d%02d%02d %2d:%02d:%02d - drizzled got signal %d;\n" |
307 | - "This could be because you hit a bug. It is also possible that " |
308 | - "this binary\n or one of the libraries it was linked against is " |
309 | - "corrupt, improperly built,\n or misconfigured. This error can " |
310 | - "also be caused by malfunctioning hardware.\n", |
311 | - tm.tm_year % 100, tm.tm_mon+1, tm.tm_mday, |
312 | - tm.tm_hour, tm.tm_min, tm.tm_sec, |
313 | - sig); |
314 | - fprintf(stderr, _("We will try our best to scrape up some info that " |
315 | - "will hopefully help diagnose\n" |
316 | - "the problem, but since we have already crashed, " |
317 | - "something is definitely wrong\nand this may fail.\n\n")); |
318 | - fprintf(stderr, "key_buffer_size=%u\n", |
319 | - (uint32_t) dflt_key_cache->key_cache_mem_size); |
320 | - fprintf(stderr, "read_buffer_size=%ld\n", (long) global_system_variables.read_buff_size); |
321 | - fprintf(stderr, "max_used_connections=%u\n", max_used_connections); |
322 | - fprintf(stderr, "connection_count=%u\n", uint32_t(connection_count)); |
323 | - fprintf(stderr, _("It is possible that drizzled could use up to \n" |
324 | - "key_buffer_size + (read_buffer_size + " |
325 | - "sort_buffer_size)*thread_count\n" |
326 | - "bytes of memory\n" |
327 | - "Hope that's ok; if not, decrease some variables in the " |
328 | - "equation.\n\n")); |
329 | - |
330 | -#ifdef HAVE_STACKTRACE |
331 | - Session *session= current_session; |
332 | - |
333 | - if (! (test_flags.test(TEST_NO_STACKTRACE))) |
334 | - { |
335 | - fprintf(stderr,"session: 0x%lx\n",(long) session); |
336 | - fprintf(stderr,_("Attempting backtrace. You can use the following " |
337 | - "information to find out\n" |
338 | - "where drizzled died. If you see no messages after this, " |
339 | - "something went\n" |
340 | - "terribly wrong...\n")); |
341 | - print_stacktrace(session ? (unsigned char*) session->thread_stack : (unsigned char*) 0, |
342 | - my_thread_stack_size); |
343 | - } |
344 | - if (session) |
345 | - { |
346 | - const char *kreason= "UNKNOWN"; |
347 | - switch (session->killed) { |
348 | - case Session::NOT_KILLED: |
349 | - kreason= "NOT_KILLED"; |
350 | - break; |
351 | - case Session::KILL_BAD_DATA: |
352 | - kreason= "KILL_BAD_DATA"; |
353 | - break; |
354 | - case Session::KILL_CONNECTION: |
355 | - kreason= "KILL_CONNECTION"; |
356 | - break; |
357 | - case Session::KILL_QUERY: |
358 | - kreason= "KILL_QUERY"; |
359 | - break; |
360 | - case Session::KILLED_NO_VALUE: |
361 | - kreason= "KILLED_NO_VALUE"; |
362 | - break; |
363 | - } |
364 | - fprintf(stderr, _("Trying to get some variables.\n" |
365 | - "Some pointers may be invalid and cause the " |
366 | - "dump to abort...\n")); |
367 | - safe_print_str("session->query", session->query.c_str(), 1024); |
368 | - fprintf(stderr, "session->thread_id=%"PRIu32"\n", (uint32_t) session->thread_id); |
369 | - fprintf(stderr, "session->killed=%s\n", kreason); |
370 | - } |
371 | - fflush(stderr); |
372 | -#endif /* HAVE_STACKTRACE */ |
373 | - |
374 | - if (calling_initgroups) |
375 | - fprintf(stderr, _("\nThis crash occurred while the server was calling " |
376 | - "initgroups(). This is\n" |
377 | - "often due to the use of a drizzled that is statically " |
378 | - "linked against glibc\n" |
379 | - "and configured to use LDAP in /etc/nsswitch.conf. " |
380 | - "You will need to either\n" |
381 | - "upgrade to a version of glibc that does not have this " |
382 | - "problem (2.3.4 or\n" |
383 | - "later when used with nscd), disable LDAP in your " |
384 | - "nsswitch.conf, or use a\n" |
385 | - "drizzled that is not statically linked.\n")); |
386 | - |
387 | - if (internal::thd_lib_detected == THD_LIB_LT && !getenv("LD_ASSUME_KERNEL")) |
388 | - fprintf(stderr, |
389 | - _("\nYou are running a statically-linked LinuxThreads binary " |
390 | - "on an NPTL system.\n" |
391 | - "This can result in crashes on some distributions due " |
392 | - "to LT/NPTL conflicts.\n" |
393 | - "You should either build a dynamically-linked binary, or force " |
394 | - "LinuxThreads\n" |
395 | - "to be used with the LD_ASSUME_KERNEL environment variable. " |
396 | - "Please consult\n" |
397 | - "the documentation for your distribution on how to do that.\n")); |
398 | - |
399 | -#ifdef HAVE_WRITE_CORE |
400 | - if (test_flags.test(TEST_CORE_ON_SIGNAL)) |
401 | - { |
402 | - fprintf(stderr, _("Writing a core file\n")); |
403 | - fflush(stderr); |
404 | - write_core(sig); |
405 | - } |
406 | -#endif |
407 | - |
408 | - exit(1); |
409 | -} |
410 | |
411 | #ifndef SA_RESETHAND |
412 | #define SA_RESETHAND 0 |
413 | @@ -884,65 +705,12 @@ |
414 | #endif |
415 | |
416 | |
417 | -/** |
418 | - All global error messages are sent here where the first one is stored |
419 | - for the client. |
420 | -*/ |
421 | -static void my_message_sql(uint32_t error, const char *str, myf MyFlags) |
422 | + |
423 | + |
424 | +const char *load_default_groups[]= |
425 | { |
426 | - Session *session; |
427 | - /* |
428 | - Put here following assertion when situation with EE_* error codes |
429 | - will be fixed |
430 | - */ |
431 | - if ((session= current_session)) |
432 | - { |
433 | - if (MyFlags & ME_FATALERROR) |
434 | - session->is_fatal_error= 1; |
435 | - |
436 | - /* |
437 | - TODO: There are two exceptions mechanism (Session and sp_rcontext), |
438 | - this could be improved by having a common stack of handlers. |
439 | - */ |
440 | - if (session->handle_error(error, str, |
441 | - DRIZZLE_ERROR::WARN_LEVEL_ERROR)) |
442 | - return;; |
443 | - |
444 | - /* |
445 | - session->lex->current_select == 0 if lex structure is not inited |
446 | - (not query command (COM_QUERY)) |
447 | - */ |
448 | - if (! (session->lex->current_select && |
449 | - session->lex->current_select->no_error && !session->is_fatal_error)) |
450 | - { |
451 | - if (! session->main_da.is_error()) // Return only first message |
452 | - { |
453 | - if (error == 0) |
454 | - error= ER_UNKNOWN_ERROR; |
455 | - if (str == NULL) |
456 | - str= ER(error); |
457 | - session->main_da.set_error_status(error, str); |
458 | - } |
459 | - } |
460 | - |
461 | - if (!session->no_warnings_for_error && !session->is_fatal_error) |
462 | - { |
463 | - /* |
464 | - Suppress infinite recursion if there a memory allocation error |
465 | - inside push_warning. |
466 | - */ |
467 | - session->no_warnings_for_error= true; |
468 | - push_warning(session, DRIZZLE_ERROR::WARN_LEVEL_ERROR, error, str); |
469 | - session->no_warnings_for_error= false; |
470 | - } |
471 | - } |
472 | - if (!session || MyFlags & ME_NOREFRESH) |
473 | - errmsg_printf(ERRMSG_LVL_ERROR, "%s: %s",internal::my_progname,str); |
474 | -} |
475 | - |
476 | - |
477 | -static const char *load_default_groups[]= { |
478 | -DRIZZLE_CONFIG_NAME, "server", 0, 0}; |
479 | + DRIZZLE_CONFIG_NAME, "server", 0, 0 |
480 | +}; |
481 | |
482 | static int show_starttime(drizzle_show_var *var, char *buff) |
483 | { |
484 | @@ -1060,8 +828,8 @@ |
485 | {NULL, NULL, SHOW_LONGLONG} |
486 | }; |
487 | |
488 | -static int init_common_variables(const char *conf_file_name, int argc, |
489 | - char **argv, const char **groups) |
490 | +int init_common_variables(const char *conf_file_name, int argc, |
491 | + char **argv, const char **groups) |
492 | { |
493 | time_t curr_time; |
494 | umask(((~internal::my_umask) & 0666)); |
495 | @@ -1210,7 +978,7 @@ |
496 | } |
497 | |
498 | |
499 | -static int init_server_components(plugin::Registry &plugins) |
500 | +int init_server_components(plugin::Registry &plugins) |
501 | { |
502 | /* |
503 | We need to call each of these following functions to ensure that |
504 | @@ -1445,8 +1213,8 @@ |
505 | NO_ARG, 0, 0, 0, 0, 0, 0}, |
506 | {"datadir", 'h', |
507 | N_("Path to the database root."), |
508 | - (char**) &drizzle_data_home, |
509 | - (char**) &drizzle_data_home, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, |
510 | + (char**) &data_home, |
511 | + (char**) &data_home, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, |
512 | {"default-storage-engine", OPT_STORAGE_ENGINE, |
513 | N_("Set the default storage engine (table type) for tables."), |
514 | (char**)&default_storage_engine_str, (char**)&default_storage_engine_str, |
515 | @@ -1792,7 +1560,6 @@ |
516 | drizzle_home[0]= pidfile_name[0]= 0; |
517 | opt_tc_log_file= (char *)"tc.log"; // no hostname in tc_log file name ! |
518 | opt_secure_file_priv= 0; |
519 | - segfaulted= 0; |
520 | cleanup_done= 0; |
521 | defaults_argc= 0; |
522 | defaults_argv= 0; |
523 | @@ -1817,7 +1584,7 @@ |
524 | drizzle_home_ptr= drizzle_home; |
525 | pidfile_name_ptr= pidfile_name; |
526 | language_ptr= language; |
527 | - drizzle_data_home= drizzle_real_data_home; |
528 | + data_home= data_home_real; |
529 | session_startup_options= (OPTION_AUTO_IS_NULL | OPTION_SQL_NOTES); |
530 | refresh_version= 1L; /* Increments on each reload */ |
531 | global_thread_id= 1UL; |
532 | @@ -1825,11 +1592,11 @@ |
533 | |
534 | /* Set directory paths */ |
535 | strncpy(language, LANGUAGE, sizeof(language)-1); |
536 | - strncpy(drizzle_real_data_home, get_relative_path(LOCALSTATEDIR), |
537 | - sizeof(drizzle_real_data_home)-1); |
538 | - drizzle_data_home_buff[0]=FN_CURLIB; // all paths are relative from here |
539 | - drizzle_data_home_buff[1]=0; |
540 | - drizzle_data_home_len= 2; |
541 | + strncpy(data_home_real, get_relative_path(LOCALSTATEDIR), |
542 | + sizeof(data_home_real)-1); |
543 | + data_home_buff[0]=FN_CURLIB; // all paths are relative from here |
544 | + data_home_buff[1]=0; |
545 | + data_home_len= 2; |
546 | |
547 | /* Variables in libraries */ |
548 | default_character_set_name= "utf8"; |
549 | @@ -1876,10 +1643,10 @@ |
550 | default_collation_name= 0; |
551 | break; |
552 | case 'h': |
553 | - strncpy(drizzle_real_data_home,argument, sizeof(drizzle_real_data_home)-1); |
554 | + strncpy(data_home_real,argument, sizeof(data_home_real)-1); |
555 | /* Correct pointer set by my_getopt (for embedded library) */ |
556 | - drizzle_data_home= drizzle_real_data_home; |
557 | - drizzle_data_home_len= strlen(drizzle_data_home); |
558 | + data_home= data_home_real; |
559 | + data_home_len= strlen(data_home); |
560 | break; |
561 | case 'u': |
562 | if (!drizzled_user || !strcmp(drizzled_user, argument)) |
563 | @@ -2064,14 +1831,14 @@ |
564 | pos[0]= FN_LIBCHAR; |
565 | pos[1]= 0; |
566 | } |
567 | - internal::convert_dirname(drizzle_real_data_home,drizzle_real_data_home,NULL); |
568 | - (void) internal::fn_format(buff, drizzle_real_data_home, "", "", |
569 | + internal::convert_dirname(data_home_real,data_home_real,NULL); |
570 | + (void) internal::fn_format(buff, data_home_real, "", "", |
571 | (MY_RETURN_REAL_PATH|MY_RESOLVE_SYMLINKS)); |
572 | - (void) internal::unpack_dirname(drizzle_unpacked_real_data_home, buff); |
573 | + (void) internal::unpack_dirname(data_home_real_unpacked, buff); |
574 | internal::convert_dirname(language,language,NULL); |
575 | (void) internal::my_load_path(drizzle_home, drizzle_home,""); // Resolve current dir |
576 | - (void) internal::my_load_path(drizzle_real_data_home, drizzle_real_data_home,drizzle_home); |
577 | - (void) internal::my_load_path(pidfile_name, pidfile_name,drizzle_real_data_home); |
578 | + (void) internal::my_load_path(data_home_real, data_home_real,drizzle_home); |
579 | + (void) internal::my_load_path(pidfile_name, pidfile_name,data_home_real); |
580 | |
581 | if (opt_plugin_dir_ptr == NULL) |
582 | { |
583 | @@ -2099,11 +1866,11 @@ |
584 | progdir.assign(progdir.substr(0, progdir.rfind(".libs/"))); |
585 | } |
586 | string testfile(progdir); |
587 | - testfile.append("drizzled.o"); |
588 | + testfile.append("drizzled.lo"); |
589 | struct stat testfile_stat; |
590 | if (stat(testfile.c_str(), &testfile_stat)) |
591 | { |
592 | - /* drizzled.o doesn't exist - we are not in a source dir. |
593 | + /* drizzled.lo doesn't exist - we are not in a source dir. |
594 | * Go on as usual |
595 | */ |
596 | (void) internal::my_load_path(opt_plugin_dir, get_relative_path(PKGPLUGINDIR), |
597 | @@ -2172,195 +1939,3 @@ |
598 | |
599 | } /* namespace drizzled */ |
600 | |
601 | -using namespace drizzled; |
602 | - |
603 | - |
604 | -static void init_signals(void) |
605 | -{ |
606 | - sigset_t set; |
607 | - struct sigaction sa; |
608 | - |
609 | - if (!(test_flags.test(TEST_NO_STACKTRACE) || |
610 | - test_flags.test(TEST_CORE_ON_SIGNAL))) |
611 | - { |
612 | - sa.sa_flags = SA_RESETHAND | SA_NODEFER; |
613 | - sigemptyset(&sa.sa_mask); |
614 | - sigprocmask(SIG_SETMASK,&sa.sa_mask,NULL); |
615 | - |
616 | - init_stacktrace(); |
617 | - sa.sa_handler=handle_segfault; |
618 | - sigaction(SIGSEGV, &sa, NULL); |
619 | - sigaction(SIGABRT, &sa, NULL); |
620 | -#ifdef SIGBUS |
621 | - sigaction(SIGBUS, &sa, NULL); |
622 | -#endif |
623 | - sigaction(SIGILL, &sa, NULL); |
624 | - sigaction(SIGFPE, &sa, NULL); |
625 | - } |
626 | - |
627 | - if (test_flags.test(TEST_CORE_ON_SIGNAL)) |
628 | - { |
629 | - /* Change limits so that we will get a core file */ |
630 | - struct rlimit rl; |
631 | - rl.rlim_cur = rl.rlim_max = RLIM_INFINITY; |
632 | - if (setrlimit(RLIMIT_CORE, &rl) && global_system_variables.log_warnings) |
633 | - errmsg_printf(ERRMSG_LVL_WARN, |
634 | - _("setrlimit could not change the size of core files " |
635 | - "to 'infinity'; We may not be able to generate a " |
636 | - "core file on signals")); |
637 | - } |
638 | - (void) sigemptyset(&set); |
639 | - my_sigset(SIGPIPE,SIG_IGN); |
640 | - sigaddset(&set,SIGPIPE); |
641 | -#ifndef IGNORE_SIGHUP_SIGQUIT |
642 | - sigaddset(&set,SIGQUIT); |
643 | - sigaddset(&set,SIGHUP); |
644 | -#endif |
645 | - sigaddset(&set,SIGTERM); |
646 | - |
647 | - /* Fix signals if blocked by parents (can happen on Mac OS X) */ |
648 | - sigemptyset(&sa.sa_mask); |
649 | - sa.sa_flags = 0; |
650 | - sa.sa_handler = print_signal_warning; |
651 | - sigaction(SIGTERM, &sa, (struct sigaction*) 0); |
652 | - sa.sa_flags = 0; |
653 | - sa.sa_handler = print_signal_warning; |
654 | - sigaction(SIGHUP, &sa, (struct sigaction*) 0); |
655 | -#ifdef SIGTSTP |
656 | - sigaddset(&set,SIGTSTP); |
657 | -#endif |
658 | - if (test_flags.test(TEST_SIGINT)) |
659 | - { |
660 | - my_sigset(thr_kill_signal, end_thread_signal); |
661 | - // May be SIGINT |
662 | - sigdelset(&set, thr_kill_signal); |
663 | - } |
664 | - else |
665 | - sigaddset(&set,SIGINT); |
666 | - sigprocmask(SIG_SETMASK,&set,NULL); |
667 | - pthread_sigmask(SIG_SETMASK,&set,NULL); |
668 | - return;; |
669 | -} |
670 | - |
671 | -int main(int argc, char **argv) |
672 | -{ |
673 | -#if defined(ENABLE_NLS) |
674 | -# if defined(HAVE_LOCALE_H) |
675 | - setlocale(LC_ALL, ""); |
676 | -# endif |
677 | - bindtextdomain("drizzle", LOCALEDIR); |
678 | - textdomain("drizzle"); |
679 | -#endif |
680 | - |
681 | - plugin::Registry &plugins= plugin::Registry::singleton(); |
682 | - plugin::Client *client; |
683 | - Session *session; |
684 | - |
685 | - MY_INIT(argv[0]); // init my_sys library & pthreads |
686 | - /* nothing should come before this line ^^^ */ |
687 | - |
688 | - /* Set signal used to kill Drizzle */ |
689 | -#if defined(SIGUSR2) |
690 | - thr_kill_signal= internal::thd_lib_detected == THD_LIB_LT ? SIGINT : SIGUSR2; |
691 | -#else |
692 | - thr_kill_signal= SIGINT; |
693 | -#endif |
694 | - |
695 | - if (init_common_variables(DRIZZLE_CONFIG_NAME, |
696 | - argc, argv, load_default_groups)) |
697 | - unireg_abort(1); // Will do exit |
698 | - |
699 | - init_signals(); |
700 | - |
701 | - |
702 | - select_thread=pthread_self(); |
703 | - select_thread_in_use=1; |
704 | - |
705 | - if (chdir(drizzle_real_data_home) && !opt_help) |
706 | - { |
707 | - errmsg_printf(ERRMSG_LVL_ERROR, _("Data directory %s does not exist\n"), drizzle_real_data_home); |
708 | - unireg_abort(1); |
709 | - } |
710 | - drizzle_data_home= drizzle_data_home_buff; |
711 | - drizzle_data_home[0]=FN_CURLIB; // all paths are relative from here |
712 | - drizzle_data_home[1]=0; |
713 | - drizzle_data_home_len= 2; |
714 | - |
715 | - if ((user_info= check_user(drizzled_user))) |
716 | - { |
717 | - set_user(drizzled_user, user_info); |
718 | - } |
719 | - |
720 | - if (server_id == 0) |
721 | - { |
722 | - server_id= 1; |
723 | - } |
724 | - |
725 | - if (init_server_components(plugins)) |
726 | - unireg_abort(1); |
727 | - |
728 | - if (plugin::Listen::setup()) |
729 | - unireg_abort(1); |
730 | - |
731 | - /* |
732 | - init signals & alarm |
733 | - After this we can't quit by a simple unireg_abort |
734 | - */ |
735 | - error_handler_hook= my_message_sql; |
736 | - |
737 | - assert(plugin::num_trx_monitored_objects > 0); |
738 | - if (drizzle_rm_tmp_tables() || |
739 | - my_tz_init((Session *)0, default_tz_name)) |
740 | - { |
741 | - abort_loop= true; |
742 | - select_thread_in_use=0; |
743 | - (void) pthread_kill(signal_thread, SIGTERM); |
744 | - |
745 | - (void) unlink(pidfile_name); // Not needed anymore |
746 | - |
747 | - exit(1); |
748 | - } |
749 | - |
750 | - init_status_vars(); |
751 | - |
752 | - errmsg_printf(ERRMSG_LVL_INFO, _(ER(ER_STARTUP)), internal::my_progname, |
753 | - PANDORA_RELEASE_VERSION, COMPILATION_COMMENT); |
754 | - |
755 | - |
756 | - /* Listen for new connections and start new session for each connection |
757 | - accepted. The listen.getClient() method will return NULL when the server |
758 | - should be shutdown. */ |
759 | - while ((client= plugin::Listen::getClient()) != NULL) |
760 | - { |
761 | - if (!(session= new Session(client))) |
762 | - { |
763 | - delete client; |
764 | - continue; |
765 | - } |
766 | - |
767 | - /* If we error on creation we drop the connection and delete the session. */ |
768 | - if (session->schedule()) |
769 | - Session::unlink(session); |
770 | - } |
771 | - |
772 | - /* (void) pthread_attr_destroy(&connection_attrib); */ |
773 | - |
774 | - |
775 | - (void) pthread_mutex_lock(&LOCK_thread_count); |
776 | - select_thread_in_use=0; // For close_connections |
777 | - (void) pthread_mutex_unlock(&LOCK_thread_count); |
778 | - (void) pthread_cond_broadcast(&COND_thread_count); |
779 | - |
780 | - /* Wait until cleanup is done */ |
781 | - (void) pthread_mutex_lock(&LOCK_thread_count); |
782 | - while (!ready_to_exit) |
783 | - pthread_cond_wait(&COND_server_end,&LOCK_thread_count); |
784 | - (void) pthread_mutex_unlock(&LOCK_thread_count); |
785 | - |
786 | - clean_up(1); |
787 | - plugin::Registry::shutdown(); |
788 | - clean_up_mutexes(); |
789 | - internal::my_end(); |
790 | - return 0; |
791 | -} |
792 | - |
793 | |
794 | === added file 'drizzled/drizzled.h' |
795 | --- drizzled/drizzled.h 1970-01-01 00:00:00 +0000 |
796 | +++ drizzled/drizzled.h 2010-04-01 19:20:51 +0000 |
797 | @@ -0,0 +1,65 @@ |
798 | +/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- |
799 | + * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: |
800 | + * |
801 | + * Copyright (C) 2008 Sun Microsystems |
802 | + * Copyright (C) 2010 Monty Taylor |
803 | + * |
804 | + * This program is free software; you can redistribute it and/or modify |
805 | + * it under the terms of the GNU General Public License as published by |
806 | + * the Free Software Foundation; version 2 of the License. |
807 | + * |
808 | + * This program is distributed in the hope that it will be useful, |
809 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
810 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
811 | + * GNU General Public License for more details. |
812 | + * |
813 | + * You should have received a copy of the GNU General Public License |
814 | + * along with this program; if not, write to the Free Software |
815 | + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
816 | + */ |
817 | + |
818 | +#ifndef DRIZZLED_DRIZZLED_H |
819 | +#define DRIZZLED_DRIZZLED_H |
820 | + |
821 | +#include <bitset> |
822 | + |
823 | +#include "drizzled/atomics.h" |
824 | + |
825 | +struct passwd; |
826 | + |
827 | +namespace drizzled |
828 | +{ |
829 | + |
830 | +namespace plugin |
831 | +{ |
832 | +class Registry; |
833 | +} |
834 | + |
835 | +extern std::bitset<12> test_flags; |
836 | +extern uint32_t max_used_connections; |
837 | +extern atomic<uint32_t> connection_count; |
838 | +extern bool calling_initgroups; |
839 | +extern const char *load_default_groups[]; |
840 | +extern bool volatile select_thread_in_use; |
841 | +extern bool volatile abort_loop; |
842 | +extern bool volatile ready_to_exit; |
843 | +extern bool opt_help; |
844 | +extern bool opt_help_extended; |
845 | +extern passwd *user_info; |
846 | +extern char *drizzled_user; |
847 | + |
848 | +extern const char * const DRIZZLE_CONFIG_NAME; |
849 | + |
850 | +int init_server_components(plugin::Registry &plugins); |
851 | +int init_common_variables(const char *conf_file_name, int argc, |
852 | + char **argv, const char **groups); |
853 | + |
854 | +passwd *check_user(const char *user); |
855 | +void set_user(const char *user, passwd *user_info_arg); |
856 | +void clean_up(bool print_message); |
857 | +void clean_up_mutexes(void); |
858 | +bool drizzle_rm_tmp_tables(); |
859 | + |
860 | +} /* namespace drizzled */ |
861 | + |
862 | +#endif /* DRIZZLED_DRIZZLED_H */ |
863 | |
864 | === modified file 'drizzled/function/str/load_file.cc' |
865 | --- drizzled/function/str/load_file.cc 2010-02-04 08:14:46 +0000 |
866 | +++ drizzled/function/str/load_file.cc 2010-04-01 19:20:51 +0000 |
867 | @@ -42,7 +42,7 @@ |
868 | if (!(file_name= args[0]->val_str(str))) |
869 | goto err; |
870 | |
871 | - (void) internal::fn_format(path, file_name->c_ptr(), drizzle_real_data_home, "", |
872 | + (void) internal::fn_format(path, file_name->c_ptr(), data_home_real, "", |
873 | MY_RELATIVE_PATH | MY_UNPACK_FILENAME); |
874 | |
875 | /* Read only allowed from within dir specified by secure_file_priv */ |
876 | |
877 | === modified file 'drizzled/include.am' |
878 | --- drizzled/include.am 2010-04-01 19:20:50 +0000 |
879 | +++ drizzled/include.am 2010-04-01 19:20:51 +0000 |
880 | @@ -18,8 +18,6 @@ |
881 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
882 | |
883 | |
884 | -sbin_PROGRAMS= drizzled/drizzled |
885 | - |
886 | DTRACEFILES= \ |
887 | drizzled/cursor.o \ |
888 | drizzled/drizzled.o \ |
889 | @@ -60,6 +58,7 @@ |
890 | drizzled/definitions.h \ |
891 | drizzled/diagnostics_area.h \ |
892 | drizzled/discrete_interval.h \ |
893 | + drizzled/drizzled.h \ |
894 | drizzled/dtcollation.h \ |
895 | drizzled/dynamic_array.h \ |
896 | drizzled/enum.h \ |
897 | @@ -265,7 +264,7 @@ |
898 | drizzled/natural_join_column.h \ |
899 | drizzled/nested_join.h \ |
900 | drizzled/open_tables_state.h \ |
901 | - drizzled/optimizer/cost_vector.h \ |
902 | + drizzled/optimizer/cost_vector.h \ |
903 | drizzled/optimizer/key_field.h \ |
904 | drizzled/optimizer/key_use.h \ |
905 | drizzled/optimizer/explain_plan.h \ |
906 | @@ -313,8 +312,8 @@ |
907 | drizzled/plugin/transaction_reader.h \ |
908 | drizzled/plugin/transaction_replicator.h \ |
909 | drizzled/plugin/transactional_storage_engine.h \ |
910 | + drizzled/plugin/xa_resource_manager.h \ |
911 | drizzled/plugin/xa_storage_engine.h \ |
912 | - drizzled/plugin/xa_resource_manager.h \ |
913 | drizzled/plugin/version.h \ |
914 | drizzled/pthread_globals.h \ |
915 | drizzled/probes.h \ |
916 | @@ -343,6 +342,7 @@ |
917 | drizzled/session_list.h \ |
918 | drizzled/set_var.h \ |
919 | drizzled/show.h \ |
920 | + drizzled/signal_handler.h \ |
921 | drizzled/sql_base.h \ |
922 | drizzled/sql_bitmap.h \ |
923 | drizzled/sql_error.h \ |
924 | @@ -431,334 +431,346 @@ |
925 | drizzled/visibility.h \ |
926 | drizzled/xid.h |
927 | |
928 | -DRIZZLED_LDADD= \ |
929 | - drizzled/internal/libinternal.la \ |
930 | - $(LIBZ) \ |
931 | - $(LIBINTL) \ |
932 | - ${LIBC_P} |
933 | - |
934 | +lib_LTLIBRARIES+= drizzled/libdrizzled.la |
935 | +drizzled_libdrizzled_la_LIBADD= \ |
936 | + drizzled/algorithm/libhash.la \ |
937 | + drizzled/util/libutil.la \ |
938 | + drizzled/internal/libinternal.la \ |
939 | + drizzled/message/libdrizzledmessage.la \ |
940 | + gnulib/libgnu.la \ |
941 | + $(LIBZ) \ |
942 | + $(LIBINTL) \ |
943 | + ${LIBC_P} \ |
944 | + $(pandora_plugin_libs) \ |
945 | + $(LDADD) \ |
946 | + $(LIBUUID) \ |
947 | + $(LIBDL_LIBS) \ |
948 | + $(LIBPROTOBUF) \ |
949 | + $(LIBPCRE) \ |
950 | + $(LIBTBB) \ |
951 | + $(GCOV_LIBS) |
952 | + |
953 | +drizzled_libdrizzled_la_DEPENDENCIES= \ |
954 | + drizzled/message/libdrizzledmessage.la \ |
955 | + ${noinst_LTLIBRARIES} \ |
956 | + $(pandora_plugin_libs) |
957 | + |
958 | +drizzled_libdrizzled_la_SOURCES= \ |
959 | + drizzled/alter_info.cc \ |
960 | + drizzled/cached_item.cc \ |
961 | + drizzled/calendar.cc \ |
962 | + drizzled/check_stack_overrun.cc \ |
963 | + drizzled/comp_creator.cc \ |
964 | + drizzled/create_field.cc \ |
965 | + drizzled/current_session.cc \ |
966 | + drizzled/cursor.cc \ |
967 | + drizzled/decimal.cc \ |
968 | + drizzled/diagnostics_area.cc \ |
969 | + drizzled/drizzled.cc \ |
970 | + drizzled/dtcollation.cc \ |
971 | + drizzled/errmsg_print.cc \ |
972 | + drizzled/field.cc \ |
973 | + drizzled/field/blob.cc \ |
974 | + drizzled/field/date.cc \ |
975 | + drizzled/field/datetime.cc \ |
976 | + drizzled/field/decimal.cc \ |
977 | + drizzled/field/double.cc \ |
978 | + drizzled/field/enum.cc \ |
979 | + drizzled/field/int64_t.cc \ |
980 | + drizzled/field/long.cc \ |
981 | + drizzled/field/null.cc \ |
982 | + drizzled/field/num.cc \ |
983 | + drizzled/field/real.cc \ |
984 | + drizzled/field/str.cc \ |
985 | + drizzled/field/timestamp.cc \ |
986 | + drizzled/field/varstring.cc \ |
987 | + drizzled/field_conv.cc \ |
988 | + drizzled/field_iterator.cc \ |
989 | + drizzled/file_exchange.cc \ |
990 | + drizzled/filesort.cc \ |
991 | + drizzled/foreign_key.cc \ |
992 | + drizzled/function/additive_op.cc \ |
993 | + drizzled/function/coercibility.cc \ |
994 | + drizzled/function/field.cc \ |
995 | + drizzled/function/find_in_set.cc \ |
996 | + drizzled/function/found_rows.cc \ |
997 | + drizzled/function/func.cc \ |
998 | + drizzled/function/get_system_var.cc \ |
999 | + drizzled/function/get_user_var.cc \ |
1000 | + drizzled/function/last_insert.cc \ |
1001 | + drizzled/function/locate.cc \ |
1002 | + drizzled/function/math/abs.cc \ |
1003 | + drizzled/function/math/acos.cc \ |
1004 | + drizzled/function/math/asin.cc \ |
1005 | + drizzled/function/math/atan.cc \ |
1006 | + drizzled/function/math/ceiling.cc \ |
1007 | + drizzled/function/math/cos.cc \ |
1008 | + drizzled/function/math/decimal_typecast.cc \ |
1009 | + drizzled/function/math/divide.cc \ |
1010 | + drizzled/function/math/exp.cc \ |
1011 | + drizzled/function/math/floor.cc \ |
1012 | + drizzled/function/math/int.cc \ |
1013 | + drizzled/function/math/int_divide.cc \ |
1014 | + drizzled/function/math/int_val.cc \ |
1015 | + drizzled/function/math/integer.cc \ |
1016 | + drizzled/function/math/ln.cc \ |
1017 | + drizzled/function/math/log.cc \ |
1018 | + drizzled/function/math/minus.cc \ |
1019 | + drizzled/function/math/mod.cc \ |
1020 | + drizzled/function/math/multiply.cc \ |
1021 | + drizzled/function/math/neg.cc \ |
1022 | + drizzled/function/math/ord.cc \ |
1023 | + drizzled/function/math/plus.cc \ |
1024 | + drizzled/function/math/pow.cc \ |
1025 | + drizzled/function/math/rand.cc \ |
1026 | + drizzled/function/math/real.cc \ |
1027 | + drizzled/function/math/round.cc \ |
1028 | + drizzled/function/math/sin.cc \ |
1029 | + drizzled/function/math/sqrt.cc \ |
1030 | + drizzled/function/math/tan.cc \ |
1031 | + drizzled/function/min_max.cc \ |
1032 | + drizzled/function/num1.cc \ |
1033 | + drizzled/function/num_op.cc \ |
1034 | + drizzled/function/numhybrid.cc \ |
1035 | + drizzled/function/row_count.cc \ |
1036 | + drizzled/function/set_user_var.cc \ |
1037 | + drizzled/function/sign.cc \ |
1038 | + drizzled/function/str/alloc_buffer.cc \ |
1039 | + drizzled/function/str/binary.cc \ |
1040 | + drizzled/function/str/char.cc \ |
1041 | + drizzled/function/str/collation.cc \ |
1042 | + drizzled/function/str/concat.cc \ |
1043 | + drizzled/function/str/conv.cc \ |
1044 | + drizzled/function/str/conv_charset.cc \ |
1045 | + drizzled/function/str/elt.cc \ |
1046 | + drizzled/function/str/export_set.cc \ |
1047 | + drizzled/function/str/format.cc \ |
1048 | + drizzled/function/str/insert.cc \ |
1049 | + drizzled/function/str/left.cc \ |
1050 | + drizzled/function/str/load_file.cc \ |
1051 | + drizzled/function/str/make_set.cc \ |
1052 | + drizzled/function/str/pad.cc \ |
1053 | + drizzled/function/str/quote.cc \ |
1054 | + drizzled/function/str/repeat.cc \ |
1055 | + drizzled/function/str/replace.cc \ |
1056 | + drizzled/function/str/right.cc \ |
1057 | + drizzled/function/str/set_collation.cc \ |
1058 | + drizzled/function/str/str_conv.cc \ |
1059 | + drizzled/function/str/strfunc.cc \ |
1060 | + drizzled/function/str/trim.cc \ |
1061 | + drizzled/function/time/curdate.cc \ |
1062 | + drizzled/function/time/date.cc \ |
1063 | + drizzled/function/time/date_add_interval.cc \ |
1064 | + drizzled/function/time/date_format.cc \ |
1065 | + drizzled/function/time/dayname.cc \ |
1066 | + drizzled/function/time/dayofmonth.cc \ |
1067 | + drizzled/function/time/dayofyear.cc \ |
1068 | + drizzled/function/time/extract.cc \ |
1069 | + drizzled/function/time/from_days.cc \ |
1070 | + drizzled/function/time/from_unixtime.cc \ |
1071 | + drizzled/function/time/hour.cc \ |
1072 | + drizzled/function/time/last_day.cc \ |
1073 | + drizzled/function/time/makedate.cc \ |
1074 | + drizzled/function/time/microsecond.cc \ |
1075 | + drizzled/function/time/minute.cc \ |
1076 | + drizzled/function/time/month.cc \ |
1077 | + drizzled/function/time/now.cc \ |
1078 | + drizzled/function/time/period_add.cc \ |
1079 | + drizzled/function/time/period_diff.cc \ |
1080 | + drizzled/function/time/quarter.cc \ |
1081 | + drizzled/function/time/second.cc \ |
1082 | + drizzled/function/time/sysdate_local.cc \ |
1083 | + drizzled/function/time/timestamp_diff.cc \ |
1084 | + drizzled/function/time/to_days.cc \ |
1085 | + drizzled/function/time/typecast.cc \ |
1086 | + drizzled/function/time/unix_timestamp.cc \ |
1087 | + drizzled/function/time/weekday.cc \ |
1088 | + drizzled/function/time/year.cc \ |
1089 | + drizzled/function/units.cc \ |
1090 | + drizzled/function/user_var_as_out_param.cc \ |
1091 | + drizzled/ha_commands.cc \ |
1092 | + drizzled/hybrid_type_traits.cc \ |
1093 | + drizzled/hybrid_type_traits_decimal.cc \ |
1094 | + drizzled/hybrid_type_traits_integer.cc \ |
1095 | + drizzled/index_hint.cc \ |
1096 | + drizzled/item.cc \ |
1097 | + drizzled/item/bin_string.cc \ |
1098 | + drizzled/item/cache.cc \ |
1099 | + drizzled/item/cache_decimal.cc \ |
1100 | + drizzled/item/cache_int.cc \ |
1101 | + drizzled/item/cache_real.cc \ |
1102 | + drizzled/item/cache_row.cc \ |
1103 | + drizzled/item/cache_str.cc \ |
1104 | + drizzled/item/cmpfunc.cc \ |
1105 | + drizzled/item/copy_string.cc \ |
1106 | + drizzled/item/create.cc \ |
1107 | + drizzled/item/decimal.cc \ |
1108 | + drizzled/item/default_value.cc \ |
1109 | + drizzled/item/direct_ref.cc \ |
1110 | + drizzled/item/empty_string.cc \ |
1111 | + drizzled/item/field.cc \ |
1112 | + drizzled/item/float.cc \ |
1113 | + drizzled/item/hex_string.cc \ |
1114 | + drizzled/item/ident.cc \ |
1115 | + drizzled/item/insert_value.cc \ |
1116 | + drizzled/item/int.cc \ |
1117 | + drizzled/item/int_with_ref.cc \ |
1118 | + drizzled/item/null.cc \ |
1119 | + drizzled/item/num.cc \ |
1120 | + drizzled/item/outer_ref.cc \ |
1121 | + drizzled/item/ref.cc \ |
1122 | + drizzled/item/ref_null_helper.cc \ |
1123 | + drizzled/item/row.cc \ |
1124 | + drizzled/item/string.cc \ |
1125 | + drizzled/item/subselect.cc \ |
1126 | + drizzled/item/sum.cc \ |
1127 | + drizzled/item/type_holder.cc \ |
1128 | + drizzled/item/uint.cc \ |
1129 | + drizzled/join.cc \ |
1130 | + drizzled/join_cache.cc \ |
1131 | + drizzled/join_table.cc \ |
1132 | + drizzled/key.cc \ |
1133 | + drizzled/key_map.cc \ |
1134 | + drizzled/lock.cc \ |
1135 | + drizzled/lookup_symbol.cc \ |
1136 | + drizzled/my_getsystime.cc \ |
1137 | + drizzled/my_hash.cc \ |
1138 | + drizzled/my_time.cc \ |
1139 | + drizzled/my_tree.cc \ |
1140 | + drizzled/name_resolution_context_state.cc \ |
1141 | + drizzled/natural_join_column.cc \ |
1142 | + drizzled/optimizer/explain_plan.cc \ |
1143 | + drizzled/optimizer/key_field.cc \ |
1144 | + drizzled/optimizer/quick_group_min_max_select.cc \ |
1145 | + drizzled/optimizer/quick_index_merge_select.cc \ |
1146 | + drizzled/optimizer/quick_range.cc \ |
1147 | + drizzled/optimizer/quick_range_select.cc \ |
1148 | + drizzled/optimizer/quick_ror_intersect_select.cc \ |
1149 | + drizzled/optimizer/quick_ror_union_select.cc \ |
1150 | + drizzled/optimizer/range.cc \ |
1151 | + drizzled/optimizer/sel_arg.cc \ |
1152 | + drizzled/optimizer/sel_imerge.cc \ |
1153 | + drizzled/optimizer/sel_tree.cc \ |
1154 | + drizzled/optimizer/sum.cc \ |
1155 | + drizzled/plugin/authentication.cc \ |
1156 | + drizzled/plugin/authorization.cc \ |
1157 | + drizzled/plugin/client.cc \ |
1158 | + drizzled/plugin/error_message.cc \ |
1159 | + drizzled/plugin/function.cc \ |
1160 | + drizzled/plugin/library.cc \ |
1161 | + drizzled/plugin/listen.cc \ |
1162 | + drizzled/plugin/listen_tcp.cc \ |
1163 | + drizzled/plugin/loader.cc \ |
1164 | + drizzled/plugin/logging.cc \ |
1165 | + drizzled/plugin/monitored_in_transaction.cc \ |
1166 | + drizzled/plugin/plugin.cc \ |
1167 | + drizzled/plugin/query_cache.cc \ |
1168 | + drizzled/plugin/query_rewrite.cc \ |
1169 | + drizzled/plugin/registry.cc \ |
1170 | + drizzled/plugin/scheduler.cc \ |
1171 | + drizzled/plugin/schema_engine.cc \ |
1172 | + drizzled/plugin/storage_engine.cc \ |
1173 | + drizzled/plugin/table_function.cc \ |
1174 | + drizzled/plugin/transaction_applier.cc \ |
1175 | + drizzled/plugin/transaction_replicator.cc \ |
1176 | + drizzled/plugin/transactional_storage_engine.cc \ |
1177 | + drizzled/plugin/xa_storage_engine.cc \ |
1178 | + drizzled/query_id.cc \ |
1179 | + drizzled/records.cc \ |
1180 | + drizzled/replication_services.cc \ |
1181 | + drizzled/resource_context.cc \ |
1182 | + drizzled/schema_identifier.cc \ |
1183 | + drizzled/session.cc \ |
1184 | + drizzled/session_list.cc \ |
1185 | + drizzled/set_var.cc \ |
1186 | + drizzled/show.cc \ |
1187 | + drizzled/signal_handler.cc \ |
1188 | + drizzled/sql_base.cc \ |
1189 | + drizzled/sql_bitmap.cc \ |
1190 | + drizzled/sql_delete.cc \ |
1191 | + drizzled/sql_derived.cc \ |
1192 | + drizzled/sql_error.cc \ |
1193 | + drizzled/sql_insert.cc \ |
1194 | + drizzled/sql_lex.cc \ |
1195 | + drizzled/sql_list.cc \ |
1196 | + drizzled/sql_load.cc \ |
1197 | + drizzled/sql_locale.cc \ |
1198 | + drizzled/sql_parse.cc \ |
1199 | + drizzled/sql_select.cc \ |
1200 | + drizzled/sql_state.cc \ |
1201 | + drizzled/sql_string.cc \ |
1202 | + drizzled/sql_table.cc \ |
1203 | + drizzled/sql_union.cc \ |
1204 | + drizzled/sql_update.cc \ |
1205 | + drizzled/sql_yacc.yy \ |
1206 | + drizzled/stacktrace.cc \ |
1207 | + drizzled/statement/alter_schema.cc \ |
1208 | + drizzled/statement/alter_table.cc \ |
1209 | + drizzled/statement/analyze.cc \ |
1210 | + drizzled/statement/change_schema.cc \ |
1211 | + drizzled/statement/check.cc \ |
1212 | + drizzled/statement/checksum.cc \ |
1213 | + drizzled/statement/commit.cc \ |
1214 | + drizzled/statement/create_index.cc \ |
1215 | + drizzled/statement/create_schema.cc \ |
1216 | + drizzled/statement/create_table.cc \ |
1217 | + drizzled/statement/delete.cc \ |
1218 | + drizzled/statement/drop_index.cc \ |
1219 | + drizzled/statement/drop_schema.cc \ |
1220 | + drizzled/statement/drop_table.cc \ |
1221 | + drizzled/statement/empty_query.cc \ |
1222 | + drizzled/statement/flush.cc \ |
1223 | + drizzled/statement/insert.cc \ |
1224 | + drizzled/statement/insert_select.cc \ |
1225 | + drizzled/statement/kill.cc \ |
1226 | + drizzled/statement/load.cc \ |
1227 | + drizzled/statement/release_savepoint.cc \ |
1228 | + drizzled/statement/rename_table.cc \ |
1229 | + drizzled/statement/replace.cc \ |
1230 | + drizzled/statement/replace_select.cc \ |
1231 | + drizzled/statement/rollback.cc \ |
1232 | + drizzled/statement/rollback_to_savepoint.cc \ |
1233 | + drizzled/statement/savepoint.cc \ |
1234 | + drizzled/statement/select.cc \ |
1235 | + drizzled/statement/set_option.cc \ |
1236 | + drizzled/statement/show_create.cc \ |
1237 | + drizzled/statement/show_create_schema.cc \ |
1238 | + drizzled/statement/show_errors.cc \ |
1239 | + drizzled/statement/show_warnings.cc \ |
1240 | + drizzled/statement/start_transaction.cc \ |
1241 | + drizzled/statement/truncate.cc \ |
1242 | + drizzled/statement/unlock_tables.cc \ |
1243 | + drizzled/statement/update.cc \ |
1244 | + drizzled/strfunc.cc \ |
1245 | + drizzled/table.cc \ |
1246 | + drizzled/table_function_container.cc \ |
1247 | + drizzled/table_identifier.cc \ |
1248 | + drizzled/table_list.cc \ |
1249 | + drizzled/table_share.cc \ |
1250 | + drizzled/temporal.cc \ |
1251 | + drizzled/temporal_format.cc \ |
1252 | + drizzled/temporal_interval.cc \ |
1253 | + drizzled/thr_lock.cc \ |
1254 | + drizzled/time_functions.cc \ |
1255 | + drizzled/transaction_services.cc \ |
1256 | + drizzled/tztime.cc \ |
1257 | + drizzled/uniques.cc \ |
1258 | + drizzled/user_var_entry.cc \ |
1259 | + drizzled/version.cc \ |
1260 | + drizzled/plugin/xa_resource_manager.cc \ |
1261 | + drizzled/xid.cc |
1262 | + |
1263 | +sbin_PROGRAMS+= drizzled/drizzled |
1264 | + |
1265 | +drizzled_drizzled_SOURCES= \ |
1266 | + drizzled/main.cc |
1267 | drizzled_drizzled_LDADD= \ |
1268 | - ${DRIZZLED_LDADD} \ |
1269 | - ${noinst_LTLIBRARIES} \ |
1270 | - drizzled/algorithm/libhash.la \ |
1271 | - drizzled/util/libutil.la \ |
1272 | - drizzled/message/libdrizzledmessage.la \ |
1273 | - drizzled/libcached_directory.la \ |
1274 | - drizzled/liberror.la \ |
1275 | - drizzled/libmemory.la \ |
1276 | - $(pandora_plugin_libs) \ |
1277 | - $(LDADD) $(LIBUUID) gnulib/libgnu.la \ |
1278 | - $(LIBDL_LIBS) $(LIBPROTOBUF) $(LIBPCRE) $(LIBTBB) \ |
1279 | - $(PANDORA_PLUGIN_DEP_LIBS) $(GCOV_LIBS) |
1280 | - |
1281 | -drizzled_drizzled_DEPENDENCIES= ${noinst_LTLIBRARIES} $(pandora_plugin_libs) |
1282 | + $(LIBPCRE) \ |
1283 | + $(LIBINTL) \ |
1284 | + drizzled/libdrizzled.la |
1285 | |
1286 | drizzled_drizzled_LDFLAGS= -export-dynamic |
1287 | |
1288 | -drizzled_drizzled_SOURCES= \ |
1289 | - drizzled/alter_info.cc \ |
1290 | - drizzled/cached_item.cc \ |
1291 | - drizzled/calendar.cc \ |
1292 | - drizzled/check_stack_overrun.cc \ |
1293 | - drizzled/comp_creator.cc \ |
1294 | - drizzled/create_field.cc \ |
1295 | - drizzled/current_session.cc \ |
1296 | - drizzled/cursor.cc \ |
1297 | - drizzled/decimal.cc \ |
1298 | - drizzled/diagnostics_area.cc \ |
1299 | - drizzled/drizzled.cc \ |
1300 | - drizzled/dtcollation.cc \ |
1301 | - drizzled/errmsg_print.cc \ |
1302 | - drizzled/field.cc \ |
1303 | - drizzled/field/blob.cc \ |
1304 | - drizzled/field/date.cc \ |
1305 | - drizzled/field/datetime.cc \ |
1306 | - drizzled/field/decimal.cc \ |
1307 | - drizzled/field/double.cc \ |
1308 | - drizzled/field/enum.cc \ |
1309 | - drizzled/field/int64_t.cc \ |
1310 | - drizzled/field/long.cc \ |
1311 | - drizzled/field/null.cc \ |
1312 | - drizzled/field/num.cc \ |
1313 | - drizzled/field/real.cc \ |
1314 | - drizzled/field/str.cc \ |
1315 | - drizzled/field/timestamp.cc \ |
1316 | - drizzled/field/varstring.cc \ |
1317 | - drizzled/field_conv.cc \ |
1318 | - drizzled/field_iterator.cc \ |
1319 | - drizzled/file_exchange.cc \ |
1320 | - drizzled/filesort.cc \ |
1321 | - drizzled/foreign_key.cc \ |
1322 | - drizzled/function/additive_op.cc \ |
1323 | - drizzled/function/coercibility.cc \ |
1324 | - drizzled/function/field.cc \ |
1325 | - drizzled/function/find_in_set.cc \ |
1326 | - drizzled/function/found_rows.cc \ |
1327 | - drizzled/function/func.cc \ |
1328 | - drizzled/function/get_system_var.cc \ |
1329 | - drizzled/function/get_user_var.cc \ |
1330 | - drizzled/function/last_insert.cc \ |
1331 | - drizzled/function/locate.cc \ |
1332 | - drizzled/function/math/abs.cc \ |
1333 | - drizzled/function/math/acos.cc \ |
1334 | - drizzled/function/math/asin.cc \ |
1335 | - drizzled/function/math/atan.cc \ |
1336 | - drizzled/function/math/ceiling.cc \ |
1337 | - drizzled/function/math/cos.cc \ |
1338 | - drizzled/function/math/decimal_typecast.cc \ |
1339 | - drizzled/function/math/divide.cc \ |
1340 | - drizzled/function/math/exp.cc \ |
1341 | - drizzled/function/math/floor.cc \ |
1342 | - drizzled/function/math/int.cc \ |
1343 | - drizzled/function/math/int_divide.cc \ |
1344 | - drizzled/function/math/int_val.cc \ |
1345 | - drizzled/function/math/integer.cc \ |
1346 | - drizzled/function/math/ln.cc \ |
1347 | - drizzled/function/math/log.cc \ |
1348 | - drizzled/function/math/minus.cc \ |
1349 | - drizzled/function/math/mod.cc \ |
1350 | - drizzled/function/math/multiply.cc \ |
1351 | - drizzled/function/math/neg.cc \ |
1352 | - drizzled/function/math/ord.cc \ |
1353 | - drizzled/function/math/plus.cc \ |
1354 | - drizzled/function/math/pow.cc \ |
1355 | - drizzled/function/math/rand.cc \ |
1356 | - drizzled/function/math/real.cc \ |
1357 | - drizzled/function/math/round.cc \ |
1358 | - drizzled/function/math/sin.cc \ |
1359 | - drizzled/function/math/sqrt.cc \ |
1360 | - drizzled/function/math/tan.cc \ |
1361 | - drizzled/function/min_max.cc \ |
1362 | - drizzled/function/num1.cc \ |
1363 | - drizzled/function/num_op.cc \ |
1364 | - drizzled/function/numhybrid.cc \ |
1365 | - drizzled/function/row_count.cc \ |
1366 | - drizzled/function/set_user_var.cc \ |
1367 | - drizzled/function/sign.cc \ |
1368 | - drizzled/function/str/alloc_buffer.cc \ |
1369 | - drizzled/function/str/binary.cc \ |
1370 | - drizzled/function/str/char.cc \ |
1371 | - drizzled/function/str/collation.cc \ |
1372 | - drizzled/function/str/concat.cc \ |
1373 | - drizzled/function/str/conv.cc \ |
1374 | - drizzled/function/str/conv_charset.cc \ |
1375 | - drizzled/function/str/elt.cc \ |
1376 | - drizzled/function/str/export_set.cc \ |
1377 | - drizzled/function/str/format.cc \ |
1378 | - drizzled/function/str/insert.cc \ |
1379 | - drizzled/function/str/left.cc \ |
1380 | - drizzled/function/str/load_file.cc \ |
1381 | - drizzled/function/str/make_set.cc \ |
1382 | - drizzled/function/str/pad.cc \ |
1383 | - drizzled/function/str/quote.cc \ |
1384 | - drizzled/function/str/repeat.cc \ |
1385 | - drizzled/function/str/replace.cc \ |
1386 | - drizzled/function/str/right.cc \ |
1387 | - drizzled/function/str/set_collation.cc \ |
1388 | - drizzled/function/str/str_conv.cc \ |
1389 | - drizzled/function/str/strfunc.cc \ |
1390 | - drizzled/function/str/trim.cc \ |
1391 | - drizzled/function/time/curdate.cc \ |
1392 | - drizzled/function/time/date.cc \ |
1393 | - drizzled/function/time/date_add_interval.cc \ |
1394 | - drizzled/function/time/date_format.cc \ |
1395 | - drizzled/function/time/dayname.cc \ |
1396 | - drizzled/function/time/dayofmonth.cc \ |
1397 | - drizzled/function/time/dayofyear.cc \ |
1398 | - drizzled/function/time/extract.cc \ |
1399 | - drizzled/function/time/from_days.cc \ |
1400 | - drizzled/function/time/from_unixtime.cc \ |
1401 | - drizzled/function/time/hour.cc \ |
1402 | - drizzled/function/time/last_day.cc \ |
1403 | - drizzled/function/time/makedate.cc \ |
1404 | - drizzled/function/time/microsecond.cc \ |
1405 | - drizzled/function/time/minute.cc \ |
1406 | - drizzled/function/time/month.cc \ |
1407 | - drizzled/function/time/now.cc \ |
1408 | - drizzled/function/time/period_add.cc \ |
1409 | - drizzled/function/time/period_diff.cc \ |
1410 | - drizzled/function/time/quarter.cc \ |
1411 | - drizzled/function/time/second.cc \ |
1412 | - drizzled/function/time/sysdate_local.cc \ |
1413 | - drizzled/function/time/timestamp_diff.cc \ |
1414 | - drizzled/function/time/to_days.cc \ |
1415 | - drizzled/function/time/typecast.cc \ |
1416 | - drizzled/function/time/unix_timestamp.cc \ |
1417 | - drizzled/function/time/weekday.cc \ |
1418 | - drizzled/function/time/year.cc \ |
1419 | - drizzled/function/units.cc \ |
1420 | - drizzled/function/user_var_as_out_param.cc \ |
1421 | - drizzled/ha_commands.cc \ |
1422 | - drizzled/hybrid_type_traits.cc \ |
1423 | - drizzled/hybrid_type_traits_decimal.cc \ |
1424 | - drizzled/hybrid_type_traits_integer.cc \ |
1425 | - drizzled/index_hint.cc \ |
1426 | - drizzled/item.cc \ |
1427 | - drizzled/item/bin_string.cc \ |
1428 | - drizzled/item/cache.cc \ |
1429 | - drizzled/item/cache_decimal.cc \ |
1430 | - drizzled/item/cache_int.cc \ |
1431 | - drizzled/item/cache_real.cc \ |
1432 | - drizzled/item/cache_row.cc \ |
1433 | - drizzled/item/cache_str.cc \ |
1434 | - drizzled/item/cmpfunc.cc \ |
1435 | - drizzled/item/copy_string.cc \ |
1436 | - drizzled/item/create.cc \ |
1437 | - drizzled/item/decimal.cc \ |
1438 | - drizzled/item/default_value.cc \ |
1439 | - drizzled/item/direct_ref.cc \ |
1440 | - drizzled/item/empty_string.cc \ |
1441 | - drizzled/item/field.cc \ |
1442 | - drizzled/item/float.cc \ |
1443 | - drizzled/item/hex_string.cc \ |
1444 | - drizzled/item/ident.cc \ |
1445 | - drizzled/item/insert_value.cc \ |
1446 | - drizzled/item/int.cc \ |
1447 | - drizzled/item/int_with_ref.cc \ |
1448 | - drizzled/item/null.cc \ |
1449 | - drizzled/item/num.cc \ |
1450 | - drizzled/item/outer_ref.cc \ |
1451 | - drizzled/item/ref.cc \ |
1452 | - drizzled/item/ref_null_helper.cc \ |
1453 | - drizzled/item/row.cc \ |
1454 | - drizzled/item/string.cc \ |
1455 | - drizzled/item/subselect.cc \ |
1456 | - drizzled/item/sum.cc \ |
1457 | - drizzled/item/type_holder.cc \ |
1458 | - drizzled/item/uint.cc \ |
1459 | - drizzled/join.cc \ |
1460 | - drizzled/join_cache.cc \ |
1461 | - drizzled/join_table.cc \ |
1462 | - drizzled/key.cc \ |
1463 | - drizzled/key_map.cc \ |
1464 | - drizzled/lock.cc \ |
1465 | - drizzled/lookup_symbol.cc \ |
1466 | - drizzled/my_getsystime.cc \ |
1467 | - drizzled/my_hash.cc \ |
1468 | - drizzled/my_time.cc \ |
1469 | - drizzled/my_tree.cc \ |
1470 | - drizzled/name_resolution_context_state.cc \ |
1471 | - drizzled/natural_join_column.cc \ |
1472 | - drizzled/optimizer/explain_plan.cc \ |
1473 | - drizzled/optimizer/key_field.cc \ |
1474 | - drizzled/optimizer/quick_group_min_max_select.cc \ |
1475 | - drizzled/optimizer/quick_index_merge_select.cc \ |
1476 | - drizzled/optimizer/quick_range.cc \ |
1477 | - drizzled/optimizer/quick_range_select.cc \ |
1478 | - drizzled/optimizer/quick_ror_intersect_select.cc \ |
1479 | - drizzled/optimizer/quick_ror_union_select.cc \ |
1480 | - drizzled/optimizer/range.cc \ |
1481 | - drizzled/optimizer/sel_arg.cc \ |
1482 | - drizzled/optimizer/sel_imerge.cc \ |
1483 | - drizzled/optimizer/sel_tree.cc \ |
1484 | - drizzled/optimizer/sum.cc \ |
1485 | - drizzled/plugin/authentication.cc \ |
1486 | - drizzled/plugin/authorization.cc \ |
1487 | - drizzled/plugin/client.cc \ |
1488 | - drizzled/plugin/error_message.cc \ |
1489 | - drizzled/plugin/function.cc \ |
1490 | - drizzled/plugin/library.cc \ |
1491 | - drizzled/plugin/listen.cc \ |
1492 | - drizzled/plugin/listen_tcp.cc \ |
1493 | - drizzled/plugin/loader.cc \ |
1494 | - drizzled/plugin/logging.cc \ |
1495 | - drizzled/plugin/monitored_in_transaction.cc \ |
1496 | - drizzled/plugin/plugin.cc \ |
1497 | - drizzled/plugin/query_cache.cc \ |
1498 | - drizzled/plugin/query_rewrite.cc \ |
1499 | - drizzled/plugin/registry.cc \ |
1500 | - drizzled/plugin/scheduler.cc \ |
1501 | - drizzled/plugin/schema_engine.cc \ |
1502 | - drizzled/plugin/storage_engine.cc \ |
1503 | - drizzled/plugin/table_function.cc \ |
1504 | - drizzled/plugin/transaction_applier.cc \ |
1505 | - drizzled/plugin/transaction_replicator.cc \ |
1506 | - drizzled/plugin/transactional_storage_engine.cc \ |
1507 | - drizzled/plugin/xa_resource_manager.cc \ |
1508 | - drizzled/plugin/xa_storage_engine.cc \ |
1509 | - drizzled/query_id.cc \ |
1510 | - drizzled/records.cc \ |
1511 | - drizzled/replication_services.cc \ |
1512 | - drizzled/resource_context.cc \ |
1513 | - drizzled/schema_identifier.cc \ |
1514 | - drizzled/session.cc \ |
1515 | - drizzled/session_list.cc \ |
1516 | - drizzled/set_var.cc \ |
1517 | - drizzled/show.cc \ |
1518 | - drizzled/sql_base.cc \ |
1519 | - drizzled/sql_bitmap.cc \ |
1520 | - drizzled/sql_delete.cc \ |
1521 | - drizzled/sql_derived.cc \ |
1522 | - drizzled/sql_error.cc \ |
1523 | - drizzled/sql_insert.cc \ |
1524 | - drizzled/sql_lex.cc \ |
1525 | - drizzled/sql_list.cc \ |
1526 | - drizzled/sql_load.cc \ |
1527 | - drizzled/sql_locale.cc \ |
1528 | - drizzled/sql_parse.cc \ |
1529 | - drizzled/sql_select.cc \ |
1530 | - drizzled/sql_state.cc \ |
1531 | - drizzled/sql_string.cc \ |
1532 | - drizzled/sql_table.cc \ |
1533 | - drizzled/sql_union.cc \ |
1534 | - drizzled/sql_update.cc \ |
1535 | - drizzled/sql_yacc.yy \ |
1536 | - drizzled/stacktrace.cc \ |
1537 | - drizzled/statement/alter_schema.cc \ |
1538 | - drizzled/statement/alter_table.cc \ |
1539 | - drizzled/statement/analyze.cc \ |
1540 | - drizzled/statement/change_schema.cc \ |
1541 | - drizzled/statement/check.cc \ |
1542 | - drizzled/statement/checksum.cc \ |
1543 | - drizzled/statement/commit.cc \ |
1544 | - drizzled/statement/create_index.cc \ |
1545 | - drizzled/statement/create_schema.cc \ |
1546 | - drizzled/statement/create_table.cc \ |
1547 | - drizzled/statement/delete.cc \ |
1548 | - drizzled/statement/drop_index.cc \ |
1549 | - drizzled/statement/drop_schema.cc \ |
1550 | - drizzled/statement/drop_table.cc \ |
1551 | - drizzled/statement/empty_query.cc \ |
1552 | - drizzled/statement/flush.cc \ |
1553 | - drizzled/statement/insert.cc \ |
1554 | - drizzled/statement/insert_select.cc \ |
1555 | - drizzled/statement/kill.cc \ |
1556 | - drizzled/statement/load.cc \ |
1557 | - drizzled/statement/release_savepoint.cc \ |
1558 | - drizzled/statement/rename_table.cc \ |
1559 | - drizzled/statement/replace.cc \ |
1560 | - drizzled/statement/replace_select.cc \ |
1561 | - drizzled/statement/rollback.cc \ |
1562 | - drizzled/statement/rollback_to_savepoint.cc \ |
1563 | - drizzled/statement/savepoint.cc \ |
1564 | - drizzled/statement/select.cc \ |
1565 | - drizzled/statement/set_option.cc \ |
1566 | - drizzled/statement/show_create.cc \ |
1567 | - drizzled/statement/show_create_schema.cc \ |
1568 | - drizzled/statement/show_errors.cc \ |
1569 | - drizzled/statement/show_warnings.cc \ |
1570 | - drizzled/statement/start_transaction.cc \ |
1571 | - drizzled/statement/truncate.cc \ |
1572 | - drizzled/statement/unlock_tables.cc \ |
1573 | - drizzled/statement/update.cc \ |
1574 | - drizzled/strfunc.cc \ |
1575 | - drizzled/table.cc \ |
1576 | - drizzled/table_function_container.cc \ |
1577 | - drizzled/table_identifier.cc \ |
1578 | - drizzled/table_list.cc \ |
1579 | - drizzled/table_share.cc \ |
1580 | - drizzled/temporal.cc \ |
1581 | - drizzled/temporal_format.cc \ |
1582 | - drizzled/temporal_interval.cc \ |
1583 | - drizzled/thr_lock.cc \ |
1584 | - drizzled/time_functions.cc \ |
1585 | - drizzled/transaction_services.cc \ |
1586 | - drizzled/tztime.cc \ |
1587 | - drizzled/uniques.cc \ |
1588 | - drizzled/user_var_entry.cc \ |
1589 | - drizzled/version.cc \ |
1590 | - drizzled/xid.cc |
1591 | - |
1592 | noinst_LTLIBRARIES+= \ |
1593 | drizzled/libcached_directory.la \ |
1594 | drizzled/libcharset.la \ |
1595 | |
1596 | === modified file 'drizzled/internal/include.am' |
1597 | --- drizzled/internal/include.am 2010-02-04 08:14:46 +0000 |
1598 | +++ drizzled/internal/include.am 2010-04-01 19:20:51 +0000 |
1599 | @@ -34,7 +34,8 @@ |
1600 | drizzled/liberror.la \ |
1601 | drizzled/libgetopt.la \ |
1602 | drizzled/libmemory.la \ |
1603 | - drizzled/libtypelib.la |
1604 | + drizzled/libtypelib.la \ |
1605 | + drizzled/libserialutil.la |
1606 | |
1607 | drizzled_internal_libinternal_la_SOURCES= \ |
1608 | drizzled/internal/bmove_upp.cc \ |
1609 | |
1610 | === modified file 'drizzled/internal/my_pthread.h' |
1611 | --- drizzled/internal/my_pthread.h 2010-02-04 08:14:46 +0000 |
1612 | +++ drizzled/internal/my_pthread.h 2010-04-01 19:20:51 +0000 |
1613 | @@ -19,7 +19,6 @@ |
1614 | #define DRIZZLED_INTERNAL_MY_PTHREAD_H |
1615 | |
1616 | #include <unistd.h> |
1617 | -#include <signal.h> |
1618 | |
1619 | #ifndef ETIME |
1620 | #define ETIME ETIMEDOUT /* For FreeBSD */ |
1621 | @@ -45,29 +44,6 @@ |
1622 | #define pthread_handler_t void * |
1623 | typedef void *(* pthread_handler)(void *); |
1624 | |
1625 | - |
1626 | -/* |
1627 | - We define my_sigset() and use that instead of the system sigset() so that |
1628 | - we can favor an implementation based on sigaction(). On some systems, such |
1629 | - as Mac OS X, sigset() results in flags such as SA_RESTART being set, and |
1630 | - we want to make sure that no such flags are set. |
1631 | -*/ |
1632 | -#if !defined(my_sigset) |
1633 | -#define my_sigset(A,B) do { struct sigaction l_s; sigset_t l_set; int l_rc; \ |
1634 | - assert((A) != 0); \ |
1635 | - sigemptyset(&l_set); \ |
1636 | - l_s.sa_handler = (B); \ |
1637 | - l_s.sa_mask = l_set; \ |
1638 | - l_s.sa_flags = 0; \ |
1639 | - l_rc= sigaction((A), &l_s, (struct sigaction *) NULL);\ |
1640 | - assert(l_rc == 0); \ |
1641 | - } while (0) |
1642 | -#elif defined(HAVE_SIGSET) && !defined(my_sigset) |
1643 | -#define my_sigset(A,B) sigset((A),(B)) |
1644 | -#elif !defined(my_sigset) |
1645 | -#define my_sigset(A,B) signal((A),(B)) |
1646 | -#endif |
1647 | - |
1648 | #ifndef my_pthread_attr_setprio |
1649 | #ifdef HAVE_PTHREAD_ATTR_SETPRIO |
1650 | #define my_pthread_attr_setprio(A,B) pthread_attr_setprio((A),(B)) |
1651 | |
1652 | === added file 'drizzled/main.cc' |
1653 | --- drizzled/main.cc 1970-01-01 00:00:00 +0000 |
1654 | +++ drizzled/main.cc 2010-04-01 19:20:51 +0000 |
1655 | @@ -0,0 +1,313 @@ |
1656 | +/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- |
1657 | + * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: |
1658 | + * |
1659 | + * Copyright (C) 2008 Sun Microsystems |
1660 | + * |
1661 | + * This program is free software; you can redistribute it and/or modify |
1662 | + * it under the terms of the GNU General Public License as published by |
1663 | + * the Free Software Foundation; version 2 of the License. |
1664 | + * |
1665 | + * This program is distributed in the hope that it will be useful, |
1666 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1667 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1668 | + * GNU General Public License for more details. |
1669 | + * |
1670 | + * You should have received a copy of the GNU General Public License |
1671 | + * along with this program; if not, write to the Free Software |
1672 | + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
1673 | + */ |
1674 | + |
1675 | +#include "config.h" |
1676 | + |
1677 | +#include <pthread.h> |
1678 | +#include <signal.h> |
1679 | +#include <sys/resource.h> |
1680 | +#include <unistd.h> |
1681 | + |
1682 | +#if TIME_WITH_SYS_TIME |
1683 | +# include <sys/time.h> |
1684 | +# include <time.h> |
1685 | +#else |
1686 | +# if HAVE_SYS_TIME_H |
1687 | +# include <sys/time.h> |
1688 | +# else |
1689 | +# include <time.h> |
1690 | +# endif |
1691 | +#endif |
1692 | + |
1693 | +#if defined(HAVE_LOCALE_H) |
1694 | +# include <locale.h> |
1695 | +#endif |
1696 | + |
1697 | + |
1698 | +#include "drizzled/plugin.h" |
1699 | +#include "drizzled/gettext.h" |
1700 | +#include "drizzled/configmake.h" |
1701 | +#include "drizzled/session.h" |
1702 | +#include "drizzled/internal/my_sys.h" |
1703 | +#include "drizzled/unireg.h" |
1704 | +#include "drizzled/stacktrace.h" |
1705 | +#include "drizzled/drizzled.h" |
1706 | +#include "drizzled/errmsg_print.h" |
1707 | +#include "drizzled/data_home.h" |
1708 | +#include "drizzled/plugin/listen.h" |
1709 | +#include "drizzled/plugin/client.h" |
1710 | +#include "drizzled/pthread_globals.h" |
1711 | +#include "drizzled/tztime.h" |
1712 | +#include "drizzled/signal_handler.h" |
1713 | + |
1714 | +using namespace drizzled; |
1715 | +using namespace std; |
1716 | + |
1717 | +static pthread_t select_thread; |
1718 | +static uint32_t thr_kill_signal; |
1719 | + |
1720 | +/** |
1721 | + All global error messages are sent here where the first one is stored |
1722 | + for the client. |
1723 | +*/ |
1724 | +static void my_message_sql(uint32_t error, const char *str, myf MyFlags) |
1725 | +{ |
1726 | + Session *session; |
1727 | + /* |
1728 | + Put here following assertion when situation with EE_* error codes |
1729 | + will be fixed |
1730 | + */ |
1731 | + if ((session= current_session)) |
1732 | + { |
1733 | + if (MyFlags & ME_FATALERROR) |
1734 | + session->is_fatal_error= 1; |
1735 | + |
1736 | + /* |
1737 | + TODO: There are two exceptions mechanism (Session and sp_rcontext), |
1738 | + this could be improved by having a common stack of handlers. |
1739 | + */ |
1740 | + if (session->handle_error(error, str, |
1741 | + DRIZZLE_ERROR::WARN_LEVEL_ERROR)) |
1742 | + return;; |
1743 | + |
1744 | + /* |
1745 | + session->lex->current_select == 0 if lex structure is not inited |
1746 | + (not query command (COM_QUERY)) |
1747 | + */ |
1748 | + if (! (session->lex->current_select && |
1749 | + session->lex->current_select->no_error && !session->is_fatal_error)) |
1750 | + { |
1751 | + if (! session->main_da.is_error()) // Return only first message |
1752 | + { |
1753 | + if (error == 0) |
1754 | + error= ER_UNKNOWN_ERROR; |
1755 | + if (str == NULL) |
1756 | + str= ER(error); |
1757 | + session->main_da.set_error_status(error, str); |
1758 | + } |
1759 | + } |
1760 | + |
1761 | + if (!session->no_warnings_for_error && !session->is_fatal_error) |
1762 | + { |
1763 | + /* |
1764 | + Suppress infinite recursion if there a memory allocation error |
1765 | + inside push_warning. |
1766 | + */ |
1767 | + session->no_warnings_for_error= true; |
1768 | + push_warning(session, DRIZZLE_ERROR::WARN_LEVEL_ERROR, error, str); |
1769 | + session->no_warnings_for_error= false; |
1770 | + } |
1771 | + } |
1772 | + if (!session || MyFlags & ME_NOREFRESH) |
1773 | + errmsg_printf(ERRMSG_LVL_ERROR, "%s: %s",internal::my_progname,str); |
1774 | +} |
1775 | + |
1776 | +static void init_signals(void) |
1777 | +{ |
1778 | + sigset_t set; |
1779 | + struct sigaction sa; |
1780 | + |
1781 | + if (!(test_flags.test(TEST_NO_STACKTRACE) || |
1782 | + test_flags.test(TEST_CORE_ON_SIGNAL))) |
1783 | + { |
1784 | + sa.sa_flags = SA_RESETHAND | SA_NODEFER; |
1785 | + sigemptyset(&sa.sa_mask); |
1786 | + sigprocmask(SIG_SETMASK,&sa.sa_mask,NULL); |
1787 | + |
1788 | + init_stacktrace(); |
1789 | + sa.sa_handler= drizzled_handle_segfault; |
1790 | + sigaction(SIGSEGV, &sa, NULL); |
1791 | + sigaction(SIGABRT, &sa, NULL); |
1792 | +#ifdef SIGBUS |
1793 | + sigaction(SIGBUS, &sa, NULL); |
1794 | +#endif |
1795 | + sigaction(SIGILL, &sa, NULL); |
1796 | + sigaction(SIGFPE, &sa, NULL); |
1797 | + } |
1798 | + |
1799 | + if (test_flags.test(TEST_CORE_ON_SIGNAL)) |
1800 | + { |
1801 | + /* Change limits so that we will get a core file */ |
1802 | + struct rlimit rl; |
1803 | + rl.rlim_cur = rl.rlim_max = RLIM_INFINITY; |
1804 | + if (setrlimit(RLIMIT_CORE, &rl) && global_system_variables.log_warnings) |
1805 | + errmsg_printf(ERRMSG_LVL_WARN, |
1806 | + _("setrlimit could not change the size of core files " |
1807 | + "to 'infinity'; We may not be able to generate a " |
1808 | + "core file on signals")); |
1809 | + } |
1810 | + (void) sigemptyset(&set); |
1811 | + ignore_signal(SIGPIPE); |
1812 | + sigaddset(&set,SIGPIPE); |
1813 | +#ifndef IGNORE_SIGHUP_SIGQUIT |
1814 | + sigaddset(&set,SIGQUIT); |
1815 | + sigaddset(&set,SIGHUP); |
1816 | +#endif |
1817 | + sigaddset(&set,SIGTERM); |
1818 | + |
1819 | + /* Fix signals if blocked by parents (can happen on Mac OS X) */ |
1820 | + sigemptyset(&sa.sa_mask); |
1821 | + sa.sa_flags = 0; |
1822 | + sa.sa_handler = drizzled_print_signal_warning; |
1823 | + sigaction(SIGTERM, &sa, NULL); |
1824 | + sa.sa_flags = 0; |
1825 | + sa.sa_handler = drizzled_print_signal_warning; |
1826 | + sigaction(SIGHUP, &sa, NULL); |
1827 | +#ifdef SIGTSTP |
1828 | + sigaddset(&set,SIGTSTP); |
1829 | +#endif |
1830 | + if (test_flags.test(TEST_SIGINT)) |
1831 | + { |
1832 | + sa.sa_flags= 0; |
1833 | + sa.sa_handler= drizzled_end_thread_signal; |
1834 | + sigaction(thr_kill_signal, &sa, NULL); |
1835 | + |
1836 | + // May be SIGINT |
1837 | + sigdelset(&set, thr_kill_signal); |
1838 | + } |
1839 | + else |
1840 | + sigaddset(&set,SIGINT); |
1841 | + sigprocmask(SIG_SETMASK,&set,NULL); |
1842 | + pthread_sigmask(SIG_SETMASK,&set,NULL); |
1843 | + return; |
1844 | +} |
1845 | + |
1846 | + |
1847 | +int main(int argc, char **argv) |
1848 | +{ |
1849 | +#if defined(ENABLE_NLS) |
1850 | +# if defined(HAVE_LOCALE_H) |
1851 | + setlocale(LC_ALL, ""); |
1852 | +# endif |
1853 | + bindtextdomain("drizzle", LOCALEDIR); |
1854 | + textdomain("drizzle"); |
1855 | +#endif |
1856 | + |
1857 | + plugin::Registry &plugins= plugin::Registry::singleton(); |
1858 | + plugin::Client *client; |
1859 | + Session *session; |
1860 | + |
1861 | + MY_INIT(argv[0]); // init my_sys library & pthreads |
1862 | + /* nothing should come before this line ^^^ */ |
1863 | + |
1864 | + /* Set signal used to kill Drizzle */ |
1865 | +#if defined(SIGUSR2) |
1866 | + thr_kill_signal= internal::thd_lib_detected == THD_LIB_LT ? SIGINT : SIGUSR2; |
1867 | +#else |
1868 | + thr_kill_signal= SIGINT; |
1869 | +#endif |
1870 | + |
1871 | + if (init_common_variables(DRIZZLE_CONFIG_NAME, |
1872 | + argc, argv, load_default_groups)) |
1873 | + unireg_abort(1); // Will do exit |
1874 | + |
1875 | + init_signals(); |
1876 | + |
1877 | + |
1878 | + select_thread=pthread_self(); |
1879 | + select_thread_in_use=1; |
1880 | + |
1881 | + if (chdir(data_home_real) && !opt_help) |
1882 | + { |
1883 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Data directory %s does not exist\n"), data_home_real); |
1884 | + unireg_abort(1); |
1885 | + } |
1886 | + data_home= data_home_buff; |
1887 | + data_home[0]=FN_CURLIB; // all paths are relative from here |
1888 | + data_home[1]=0; |
1889 | + data_home_len= 2; |
1890 | + |
1891 | + if ((user_info= check_user(drizzled_user))) |
1892 | + { |
1893 | + set_user(drizzled_user, user_info); |
1894 | + } |
1895 | + |
1896 | + if (server_id == 0) |
1897 | + { |
1898 | + server_id= 1; |
1899 | + } |
1900 | + |
1901 | + if (init_server_components(plugins)) |
1902 | + unireg_abort(1); |
1903 | + |
1904 | + if (plugin::Listen::setup()) |
1905 | + unireg_abort(1); |
1906 | + |
1907 | + /* |
1908 | + init signals & alarm |
1909 | + After this we can't quit by a simple unireg_abort |
1910 | + */ |
1911 | + error_handler_hook= my_message_sql; |
1912 | + |
1913 | + assert(plugin::num_trx_monitored_objects > 0); |
1914 | + if (drizzle_rm_tmp_tables() || |
1915 | + my_tz_init((Session *)0, default_tz_name)) |
1916 | + { |
1917 | + abort_loop= true; |
1918 | + select_thread_in_use=0; |
1919 | + (void) pthread_kill(signal_thread, SIGTERM); |
1920 | + |
1921 | + (void) unlink(pidfile_name); // Not needed anymore |
1922 | + |
1923 | + exit(1); |
1924 | + } |
1925 | + |
1926 | + init_status_vars(); |
1927 | + |
1928 | + errmsg_printf(ERRMSG_LVL_INFO, _(ER(ER_STARTUP)), internal::my_progname, |
1929 | + PANDORA_RELEASE_VERSION, COMPILATION_COMMENT); |
1930 | + |
1931 | + |
1932 | + /* Listen for new connections and start new session for each connection |
1933 | + accepted. The listen.getClient() method will return NULL when the server |
1934 | + should be shutdown. */ |
1935 | + while ((client= plugin::Listen::getClient()) != NULL) |
1936 | + { |
1937 | + if (!(session= new Session(client))) |
1938 | + { |
1939 | + delete client; |
1940 | + continue; |
1941 | + } |
1942 | + |
1943 | + /* If we error on creation we drop the connection and delete the session. */ |
1944 | + if (session->schedule()) |
1945 | + Session::unlink(session); |
1946 | + } |
1947 | + |
1948 | + /* (void) pthread_attr_destroy(&connection_attrib); */ |
1949 | + |
1950 | + |
1951 | + (void) pthread_mutex_lock(&LOCK_thread_count); |
1952 | + select_thread_in_use=0; // For close_connections |
1953 | + (void) pthread_mutex_unlock(&LOCK_thread_count); |
1954 | + (void) pthread_cond_broadcast(&COND_thread_count); |
1955 | + |
1956 | + /* Wait until cleanup is done */ |
1957 | + (void) pthread_mutex_lock(&LOCK_thread_count); |
1958 | + while (!ready_to_exit) |
1959 | + pthread_cond_wait(&COND_server_end,&LOCK_thread_count); |
1960 | + (void) pthread_mutex_unlock(&LOCK_thread_count); |
1961 | + |
1962 | + clean_up(1); |
1963 | + plugin::Registry::shutdown(); |
1964 | + clean_up_mutexes(); |
1965 | + internal::my_end(); |
1966 | + return 0; |
1967 | +} |
1968 | + |
1969 | |
1970 | === modified file 'drizzled/message/include.am' |
1971 | --- drizzled/message/include.am 2010-02-24 00:03:28 +0000 |
1972 | +++ drizzled/message/include.am 2010-04-01 19:20:51 +0000 |
1973 | @@ -35,11 +35,12 @@ |
1974 | drizzled/message/transaction_reader \ |
1975 | drizzled/message/transaction_writer |
1976 | |
1977 | -noinst_LTLIBRARIES += drizzled/message/libdrizzledmessage.la |
1978 | +lib_LTLIBRARIES += drizzled/message/libdrizzledmessage.la |
1979 | |
1980 | drizzled_message_libdrizzledmessage_la_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS} ${NO_WERROR} |
1981 | |
1982 | drizzled_message_libdrizzledmessage_la_SOURCES = drizzled/message/statement_transform.cc |
1983 | +drizzled_message_libdrizzledmessage_la_LIBADD= ${LTLIBPROTOBUF} |
1984 | |
1985 | nobase_dist_include_HEADERS+= drizzled/message/statement_transform.h |
1986 | |
1987 | @@ -88,11 +89,11 @@ |
1988 | drizzled_message_master_list_reader_LDADD = ${MESSAGE_LDADD} |
1989 | drizzled_message_master_list_reader_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS} |
1990 | |
1991 | -drizzled_message_transaction_writer_SOURCES = drizzled/message/transaction_writer.cc drizzled/message/transaction.pb.cc |
1992 | +drizzled_message_transaction_writer_SOURCES = drizzled/message/transaction_writer.cc |
1993 | drizzled_message_transaction_writer_LDADD = ${MESSAGE_LDADD} ${top_builddir}/drizzled/algorithm/libhash.la |
1994 | drizzled_message_transaction_writer_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS} ${NO_WERROR} |
1995 | |
1996 | -drizzled_message_transaction_reader_SOURCES = drizzled/message/transaction_reader.cc drizzled/message/transaction.pb.cc |
1997 | +drizzled_message_transaction_reader_SOURCES = drizzled/message/transaction_reader.cc |
1998 | drizzled_message_transaction_reader_LDADD = ${MESSAGE_LDADD} ${top_builddir}/drizzled/algorithm/libhash.la ${top_builddir}/drizzled/util/libutil.la |
1999 | drizzled_message_transaction_reader_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS} ${NO_WERROR} |
2000 | |
2001 | |
2002 | === modified file 'drizzled/pthread_globals.h' |
2003 | --- drizzled/pthread_globals.h 2010-02-04 08:14:46 +0000 |
2004 | +++ drizzled/pthread_globals.h 2010-04-01 19:20:51 +0000 |
2005 | @@ -36,6 +36,7 @@ |
2006 | extern pthread_cond_t COND_refresh; |
2007 | extern pthread_cond_t COND_thread_count; |
2008 | extern pthread_cond_t COND_global_read_lock; |
2009 | +extern pthread_cond_t COND_server_end; |
2010 | extern pthread_attr_t connection_attrib; |
2011 | extern pthread_t signal_thread; |
2012 | |
2013 | |
2014 | === modified file 'drizzled/schema_identifier.cc' |
2015 | --- drizzled/schema_identifier.cc 2010-03-31 18:01:35 +0000 |
2016 | +++ drizzled/schema_identifier.cc 2010-04-01 19:20:51 +0000 |
2017 | @@ -61,7 +61,7 @@ |
2018 | |
2019 | |
2020 | int rootdir_len= strlen(FN_ROOTDIR); |
2021 | - path.append(drizzle_data_home); |
2022 | + path.append(data_home); |
2023 | ssize_t without_rootdir= path.length() - rootdir_len; |
2024 | |
2025 | /* Don't add FN_ROOTDIR if dirzzle_data_home already includes it */ |
2026 | |
2027 | === modified file 'drizzled/session.cc' |
2028 | --- drizzled/session.cc 2010-03-31 22:22:16 +0000 |
2029 | +++ drizzled/session.cc 2010-04-01 19:20:51 +0000 |
2030 | @@ -46,6 +46,7 @@ |
2031 | #include "drizzled/db.h" |
2032 | #include "drizzled/pthread_globals.h" |
2033 | #include "drizzled/transaction_services.h" |
2034 | +#include "drizzled/drizzled.h" |
2035 | |
2036 | #include "plugin/myisam/myisam.h" |
2037 | #include "drizzled/internal/iocache.h" |
2038 | @@ -74,8 +75,6 @@ |
2039 | const char * const Session::DEFAULT_WHERE= "field list"; |
2040 | extern pthread_key_t THR_Session; |
2041 | extern pthread_key_t THR_Mem_root; |
2042 | -extern uint32_t max_used_connections; |
2043 | -extern atomic<uint32_t> connection_count; |
2044 | |
2045 | |
2046 | /**************************************************************************** |
2047 | @@ -1048,13 +1047,13 @@ |
2048 | |
2049 | if (!internal::dirname_length(exchange->file_name)) |
2050 | { |
2051 | - strcpy(path, drizzle_real_data_home); |
2052 | + strcpy(path, data_home_real); |
2053 | if (! session->db.empty()) |
2054 | - strncat(path, session->db.c_str(), FN_REFLEN-strlen(drizzle_real_data_home)-1); |
2055 | + strncat(path, session->db.c_str(), FN_REFLEN-strlen(data_home_real)-1); |
2056 | (void) internal::fn_format(path, exchange->file_name, path, "", option); |
2057 | } |
2058 | else |
2059 | - (void) internal::fn_format(path, exchange->file_name, drizzle_real_data_home, "", option); |
2060 | + (void) internal::fn_format(path, exchange->file_name, data_home_real, "", option); |
2061 | |
2062 | if (opt_secure_file_priv && |
2063 | strncmp(opt_secure_file_priv, path, strlen(opt_secure_file_priv))) |
2064 | |
2065 | === modified file 'drizzled/set_var.cc' |
2066 | --- drizzled/set_var.cc 2010-02-23 18:09:22 +0000 |
2067 | +++ drizzled/set_var.cc 2010-04-01 19:20:51 +0000 |
2068 | @@ -143,7 +143,7 @@ |
2069 | fix_completion_type); |
2070 | static sys_var_collation_sv |
2071 | sys_collation_server(&vars, "collation_server", &system_variables::collation_server, &default_charset_info); |
2072 | -static sys_var_const_str sys_datadir(&vars, "datadir", drizzle_real_data_home); |
2073 | +static sys_var_const_str sys_datadir(&vars, "datadir", data_home_real); |
2074 | |
2075 | static sys_var_session_uint64_t sys_join_buffer_size(&vars, "join_buffer_size", |
2076 | &system_variables::join_buff_size); |
2077 | |
2078 | === added file 'drizzled/signal_handler.cc' |
2079 | --- drizzled/signal_handler.cc 1970-01-01 00:00:00 +0000 |
2080 | +++ drizzled/signal_handler.cc 2010-04-01 19:20:51 +0000 |
2081 | @@ -0,0 +1,212 @@ |
2082 | +/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- |
2083 | + * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: |
2084 | + * |
2085 | + * Copyright (C) 2008 Sun Microsystems |
2086 | + * |
2087 | + * This program is free software; you can redistribute it and/or modify |
2088 | + * it under the terms of the GNU General Public License as published by |
2089 | + * the Free Software Foundation; version 2 of the License. |
2090 | + * |
2091 | + * This program is distributed in the hope that it will be useful, |
2092 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2093 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2094 | + * GNU General Public License for more details. |
2095 | + * |
2096 | + * You should have received a copy of the GNU General Public License |
2097 | + * along with this program; if not, write to the Free Software |
2098 | + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
2099 | + */ |
2100 | + |
2101 | +#include "config.h" |
2102 | + |
2103 | +#include <signal.h> |
2104 | + |
2105 | +#include "drizzled/signal_handler.h" |
2106 | +#include "drizzled/drizzled.h" |
2107 | +#include "drizzled/session.h" |
2108 | +#include "drizzled/internal/my_sys.h" |
2109 | +#include "drizzled/probes.h" |
2110 | +#include "drizzled/plugin.h" |
2111 | +#include "drizzled/plugin/scheduler.h" |
2112 | +#include "plugin/myisam/keycache.h" |
2113 | + |
2114 | +using namespace drizzled; |
2115 | + |
2116 | +static uint32_t killed_threads; |
2117 | +static bool segfaulted= false; |
2118 | + |
2119 | +/* |
2120 | + * We declare these extern "C" because they are passed to system callback functions |
2121 | + * and Sun Studio does not like it when those don't have C linkage. We prefix them |
2122 | + * because extern "C"-ing something effectively removes the namespace from the |
2123 | + * linker symbols, meaning they would be exporting symbols like "print_signal_warning |
2124 | + */ |
2125 | +extern "C" |
2126 | +{ |
2127 | + |
2128 | +void drizzled_print_signal_warning(int sig) |
2129 | +{ |
2130 | + if (global_system_variables.log_warnings) |
2131 | + errmsg_printf(ERRMSG_LVL_WARN, _("Got signal %d from thread %"PRIu64), |
2132 | + sig, global_thread_id); |
2133 | +#ifndef HAVE_BSD_SIGNALS |
2134 | + sigset_t set; |
2135 | + sigemptyset(&set); |
2136 | + |
2137 | + struct sigaction sa; |
2138 | + sa.sa_handler= drizzled_print_signal_warning; |
2139 | + sa.sa_mask= set; |
2140 | + sa.sa_flags= 0; |
2141 | + sigaction(sig, &sa, NULL); /* int. thread system calls */ |
2142 | +#endif |
2143 | + if (sig == SIGALRM) |
2144 | + alarm(2); /* reschedule alarm */ |
2145 | +} |
2146 | + |
2147 | +/** Called when a thread is aborted. */ |
2148 | +void drizzled_end_thread_signal(int ) |
2149 | +{ |
2150 | + Session *session=current_session; |
2151 | + if (session) |
2152 | + { |
2153 | + statistic_increment(killed_threads, &LOCK_status); |
2154 | + session->scheduler->killSessionNow(session); |
2155 | + DRIZZLE_CONNECTION_DONE(session->thread_id); |
2156 | + } |
2157 | + return; |
2158 | +} |
2159 | + |
2160 | +void drizzled_handle_segfault(int sig) |
2161 | +{ |
2162 | + time_t curr_time; |
2163 | + struct tm tm; |
2164 | + |
2165 | + /* |
2166 | + Strictly speaking, one needs a mutex here |
2167 | + but since we have got SIGSEGV already, things are a mess |
2168 | + so not having the mutex is not as bad as possibly using a buggy |
2169 | + mutex - so we keep things simple |
2170 | + */ |
2171 | + if (segfaulted) |
2172 | + { |
2173 | + fprintf(stderr, _("Fatal signal %d while backtracing\n"), sig); |
2174 | + exit(1); |
2175 | + } |
2176 | + |
2177 | + segfaulted= true; |
2178 | + |
2179 | + curr_time= time(NULL); |
2180 | + if(curr_time == (time_t)-1) |
2181 | + { |
2182 | + fprintf(stderr, _("Fatal: time() call failed\n")); |
2183 | + exit(1); |
2184 | + } |
2185 | + |
2186 | + localtime_r(&curr_time, &tm); |
2187 | + |
2188 | + fprintf(stderr,_("%02d%02d%02d %2d:%02d:%02d - drizzled got signal %d;\n" |
2189 | + "This could be because you hit a bug. It is also possible that " |
2190 | + "this binary\n or one of the libraries it was linked against is " |
2191 | + "corrupt, improperly built,\n or misconfigured. This error can " |
2192 | + "also be caused by malfunctioning hardware.\n"), |
2193 | + tm.tm_year % 100, tm.tm_mon+1, tm.tm_mday, |
2194 | + tm.tm_hour, tm.tm_min, tm.tm_sec, |
2195 | + sig); |
2196 | + fprintf(stderr, _("We will try our best to scrape up some info that " |
2197 | + "will hopefully help diagnose\n" |
2198 | + "the problem, but since we have already crashed, " |
2199 | + "something is definitely wrong\nand this may fail.\n\n")); |
2200 | + fprintf(stderr, "key_buffer_size=%u\n", |
2201 | + (uint32_t) dflt_key_cache->key_cache_mem_size); |
2202 | + fprintf(stderr, "read_buffer_size=%ld\n", (long) global_system_variables.read_buff_size); |
2203 | + fprintf(stderr, "max_used_connections=%u\n", max_used_connections); |
2204 | + fprintf(stderr, "connection_count=%u\n", uint32_t(connection_count)); |
2205 | + fprintf(stderr, _("It is possible that drizzled could use up to \n" |
2206 | + "key_buffer_size + (read_buffer_size + " |
2207 | + "sort_buffer_size)*thread_count\n" |
2208 | + "bytes of memory\n" |
2209 | + "Hope that's ok; if not, decrease some variables in the " |
2210 | + "equation.\n\n")); |
2211 | + |
2212 | +#ifdef HAVE_STACKTRACE |
2213 | + Session *session= current_session; |
2214 | + |
2215 | + if (! (test_flags.test(TEST_NO_STACKTRACE))) |
2216 | + { |
2217 | + fprintf(stderr,"session: 0x%lx\n",(long) session); |
2218 | + fprintf(stderr,_("Attempting backtrace. You can use the following " |
2219 | + "information to find out\n" |
2220 | + "where drizzled died. If you see no messages after this, " |
2221 | + "something went\n" |
2222 | + "terribly wrong...\n")); |
2223 | + print_stacktrace(session ? (unsigned char*) session->thread_stack : (unsigned char*) 0, |
2224 | + my_thread_stack_size); |
2225 | + } |
2226 | + if (session) |
2227 | + { |
2228 | + const char *kreason= "UNKNOWN"; |
2229 | + switch (session->killed) { |
2230 | + case Session::NOT_KILLED: |
2231 | + kreason= "NOT_KILLED"; |
2232 | + break; |
2233 | + case Session::KILL_BAD_DATA: |
2234 | + kreason= "KILL_BAD_DATA"; |
2235 | + break; |
2236 | + case Session::KILL_CONNECTION: |
2237 | + kreason= "KILL_CONNECTION"; |
2238 | + break; |
2239 | + case Session::KILL_QUERY: |
2240 | + kreason= "KILL_QUERY"; |
2241 | + break; |
2242 | + case Session::KILLED_NO_VALUE: |
2243 | + kreason= "KILLED_NO_VALUE"; |
2244 | + break; |
2245 | + } |
2246 | + fprintf(stderr, _("Trying to get some variables.\n" |
2247 | + "Some pointers may be invalid and cause the " |
2248 | + "dump to abort...\n")); |
2249 | + safe_print_str("session->query", session->query, 1024); |
2250 | + fprintf(stderr, "session->thread_id=%"PRIu32"\n", (uint32_t) session->thread_id); |
2251 | + fprintf(stderr, "session->killed=%s\n", kreason); |
2252 | + } |
2253 | + fflush(stderr); |
2254 | +#endif /* HAVE_STACKTRACE */ |
2255 | + |
2256 | + if (calling_initgroups) |
2257 | + fprintf(stderr, _("\nThis crash occurred while the server was calling " |
2258 | + "initgroups(). This is\n" |
2259 | + "often due to the use of a drizzled that is statically " |
2260 | + "linked against glibc\n" |
2261 | + "and configured to use LDAP in /etc/nsswitch.conf. " |
2262 | + "You will need to either\n" |
2263 | + "upgrade to a version of glibc that does not have this " |
2264 | + "problem (2.3.4 or\n" |
2265 | + "later when used with nscd), disable LDAP in your " |
2266 | + "nsswitch.conf, or use a\n" |
2267 | + "drizzled that is not statically linked.\n")); |
2268 | + |
2269 | + if (internal::thd_lib_detected == THD_LIB_LT && !getenv("LD_ASSUME_KERNEL")) |
2270 | + fprintf(stderr, |
2271 | + _("\nYou are running a statically-linked LinuxThreads binary " |
2272 | + "on an NPTL system.\n" |
2273 | + "This can result in crashes on some distributions due " |
2274 | + "to LT/NPTL conflicts.\n" |
2275 | + "You should either build a dynamically-linked binary, or force " |
2276 | + "LinuxThreads\n" |
2277 | + "to be used with the LD_ASSUME_KERNEL environment variable. " |
2278 | + "Please consult\n" |
2279 | + "the documentation for your distribution on how to do that.\n")); |
2280 | + |
2281 | +#ifdef HAVE_WRITE_CORE |
2282 | + if (test_flags.test(TEST_CORE_ON_SIGNAL)) |
2283 | + { |
2284 | + fprintf(stderr, _("Writing a core file\n")); |
2285 | + fflush(stderr); |
2286 | + write_core(sig); |
2287 | + } |
2288 | +#endif |
2289 | + |
2290 | + exit(1); |
2291 | +} |
2292 | + |
2293 | +} /* extern "C" */ |
2294 | |
2295 | === added file 'drizzled/signal_handler.h' |
2296 | --- drizzled/signal_handler.h 1970-01-01 00:00:00 +0000 |
2297 | +++ drizzled/signal_handler.h 2010-04-01 19:20:51 +0000 |
2298 | @@ -0,0 +1,55 @@ |
2299 | +/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- |
2300 | + * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: |
2301 | + * |
2302 | + * Copyright (C) 2008 Sun Microsystems |
2303 | + * Copyright (C) 2010 Monty Taylor |
2304 | + * |
2305 | + * This program is free software; you can redistribute it and/or modify |
2306 | + * it under the terms of the GNU General Public License as published by |
2307 | + * the Free Software Foundation; version 2 of the License. |
2308 | + * |
2309 | + * This program is distributed in the hope that it will be useful, |
2310 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2311 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2312 | + * GNU General Public License for more details. |
2313 | + * |
2314 | + * You should have received a copy of the GNU General Public License |
2315 | + * along with this program; if not, write to the Free Software |
2316 | + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
2317 | + */ |
2318 | + |
2319 | +#ifndef DRIZZLED_SIGNAL_HANDLER_H |
2320 | +#define DRIZZLED_SIGNAL_HANDLER_H |
2321 | + |
2322 | +#include <signal.h> |
2323 | + |
2324 | +#include <cstdlib> |
2325 | +#include <cassert> |
2326 | + |
2327 | +extern "C" void drizzled_print_signal_warning(int sig); |
2328 | +extern "C" void drizzled_handle_segfault(int sig); |
2329 | +extern "C" void drizzled_end_thread_signal(int sig); |
2330 | + |
2331 | +/* |
2332 | + posix sigaction() based signal handler implementation |
2333 | + On some systems, such as Mac OS X, sigset() results in flags |
2334 | + such as SA_RESTART being set, and we want to make sure that no such |
2335 | + flags are set. |
2336 | +*/ |
2337 | +static inline void ignore_signal(int sig) |
2338 | +{ |
2339 | + /* Wow. There is a function sigaction which takes a pointer to a |
2340 | + struct sigaction. */ |
2341 | + struct sigaction l_s; |
2342 | + sigset_t l_set; |
2343 | + sigemptyset(&l_set); |
2344 | + |
2345 | + assert(sig != 0); |
2346 | + l_s.sa_handler= SIG_IGN; |
2347 | + l_s.sa_mask= l_set; |
2348 | + l_s.sa_flags= 0; |
2349 | + int l_rc= sigaction(sig, &l_s, NULL); |
2350 | + assert(l_rc == 0); |
2351 | +} |
2352 | + |
2353 | +#endif /* DRIZZLED_SIGNAL_HANDLER_H */ |
2354 | |
2355 | === modified file 'drizzled/sql_base.cc' |
2356 | --- drizzled/sql_base.cc 2010-03-31 15:37:34 +0000 |
2357 | +++ drizzled/sql_base.cc 2010-04-01 19:20:51 +0000 |
2358 | @@ -51,6 +51,7 @@ |
2359 | #include "drizzled/global_charset_info.h" |
2360 | #include "drizzled/pthread_globals.h" |
2361 | #include "drizzled/internal/iocache.h" |
2362 | +#include "drizzled/drizzled.h" |
2363 | #include "drizzled/plugin/authorization.h" |
2364 | |
2365 | using namespace std; |
2366 | @@ -60,8 +61,6 @@ |
2367 | |
2368 | extern bool volatile shutdown_in_progress; |
2369 | |
2370 | -bool drizzle_rm_tmp_tables(); |
2371 | - |
2372 | /** |
2373 | @defgroup Data_Dictionary Data Dictionary |
2374 | @{ |
2375 | |
2376 | === modified file 'drizzled/sql_load.cc' |
2377 | --- drizzled/sql_load.cc 2010-03-31 21:15:40 +0000 |
2378 | +++ drizzled/sql_load.cc 2010-04-01 19:20:51 +0000 |
2379 | @@ -258,14 +258,14 @@ |
2380 | #endif |
2381 | if (!internal::dirname_length(ex->file_name)) |
2382 | { |
2383 | - strcpy(name, drizzle_real_data_home); |
2384 | - strncat(name, tdb, FN_REFLEN-strlen(drizzle_real_data_home)-1); |
2385 | + strcpy(name, data_home_real); |
2386 | + strncat(name, tdb, FN_REFLEN-strlen(data_home_real)-1); |
2387 | (void) internal::fn_format(name, ex->file_name, name, "", |
2388 | MY_RELATIVE_PATH | MY_UNPACK_FILENAME); |
2389 | } |
2390 | else |
2391 | { |
2392 | - (void) internal::fn_format(name, ex->file_name, drizzle_real_data_home, "", |
2393 | + (void) internal::fn_format(name, ex->file_name, data_home_real, "", |
2394 | MY_RELATIVE_PATH | MY_UNPACK_FILENAME); |
2395 | |
2396 | if (opt_secure_file_priv && |
2397 | |
2398 | === modified file 'drizzled/stacktrace.cc' |
2399 | --- drizzled/stacktrace.cc 2010-02-04 08:14:46 +0000 |
2400 | +++ drizzled/stacktrace.cc 2010-04-01 19:20:51 +0000 |
2401 | @@ -36,6 +36,10 @@ |
2402 | #include <cstdio> |
2403 | #include <algorithm> |
2404 | |
2405 | +#if defined(BACKTRACE_DEMANGLE) |
2406 | +# include <cxxabi.h> |
2407 | +#endif |
2408 | + |
2409 | #include "drizzled/definitions.h" |
2410 | |
2411 | using namespace std; |
2412 | @@ -74,8 +78,13 @@ |
2413 | #define SIGRETURN_FRAME_OFFSET 23 |
2414 | #endif |
2415 | |
2416 | - |
2417 | -#if BACKTRACE_DEMANGLE |
2418 | +#if defined(BACKTRACE_DEMANGLE) |
2419 | + |
2420 | +static inline char *my_demangle(const char *mangled_name, int *status) |
2421 | +{ |
2422 | + return abi::__cxa_demangle(mangled_name, NULL, NULL, status); |
2423 | +} |
2424 | + |
2425 | static void my_demangle_symbols(char **addrs, int n) |
2426 | { |
2427 | int status, i; |
2428 | |
2429 | === modified file 'drizzled/stacktrace.h' |
2430 | --- drizzled/stacktrace.h 2010-02-04 08:14:46 +0000 |
2431 | +++ drizzled/stacktrace.h 2010-04-01 19:20:51 +0000 |
2432 | @@ -35,10 +35,6 @@ |
2433 | #define BACKTRACE_DEMANGLE 1 |
2434 | #endif |
2435 | |
2436 | -#if defined(BACKTRACE_DEMANGLE) |
2437 | -extern "C" char *my_demangle(const char *mangled_name, int *status); |
2438 | -#endif |
2439 | - |
2440 | #ifdef TARGET_OS_LINUX |
2441 | #if defined(HAVE_STACKTRACE) || (defined (__x86_64__) || defined (__i386__) ) |
2442 | #undef HAVE_STACKTRACE |
2443 | |
2444 | === modified file 'drizzled/table_identifier.cc' |
2445 | --- drizzled/table_identifier.cc 2010-03-31 06:34:03 +0000 |
2446 | +++ drizzled/table_identifier.cc 2010-04-01 19:20:51 +0000 |
2447 | @@ -201,7 +201,7 @@ |
2448 | |
2449 | |
2450 | int rootdir_len= strlen(FN_ROOTDIR); |
2451 | - path.append(drizzle_data_home); |
2452 | + path.append(data_home); |
2453 | ssize_t without_rootdir= path.length() - rootdir_len; |
2454 | |
2455 | /* Don't add FN_ROOTDIR if dirzzle_data_home already includes it */ |
2456 | |
2457 | === modified file 'extra/include.am' |
2458 | --- extra/include.am 2010-01-11 23:50:15 +0000 |
2459 | +++ extra/include.am 2010-04-01 19:20:51 +0000 |
2460 | @@ -4,7 +4,4 @@ |
2461 | |
2462 | |
2463 | extra_my_print_defaults_SOURCES= extra/my_print_defaults.cc |
2464 | -extra_my_print_defaults_LDADD= \ |
2465 | - drizzled/internal/libinternal.la \ |
2466 | - gnulib/libgnu.la \ |
2467 | - $(LIBINTL) |
2468 | +extra_my_print_defaults_LDADD= $(CLIENT_LDADD) |
2469 | |
2470 | === modified file 'plugin/innobase/handler/ha_innodb.cc' |
2471 | --- plugin/innobase/handler/ha_innodb.cc 2010-03-31 15:37:34 +0000 |
2472 | +++ plugin/innobase/handler/ha_innodb.cc 2010-04-01 19:20:51 +0000 |
2473 | @@ -6438,7 +6438,7 @@ |
2474 | } |
2475 | |
2476 | snprintf(path, sizeof(path), "%s/%s%s", |
2477 | - drizzle_data_home, ib_table->name, ".dfe"); |
2478 | + data_home, ib_table->name, ".dfe"); |
2479 | |
2480 | internal::unpack_filename(path,path); |
2481 | |
2482 | |
2483 | === modified file 'plugin/myisam/plugin.ini' |
2484 | --- plugin/myisam/plugin.ini 2010-02-04 08:14:46 +0000 |
2485 | +++ plugin/myisam/plugin.ini 2010-04-01 19:20:51 +0000 |
2486 | @@ -18,6 +18,6 @@ |
2487 | description=Legacy non-transactional MySQL tables |
2488 | load_by_default=yes |
2489 | sources=ha_myisam.cc |
2490 | -libs=plugin/myisam/libmyisam.la drizzled/internal/libinternal.la |
2491 | +libs=plugin/myisam/libmyisam.la |
2492 | ldflags=$(LIBZ) $(LIBINTL) |
2493 | static=yes |
2494 | |
2495 | === modified file 'plugin/schema_engine/schema.cc' |
2496 | --- plugin/schema_engine/schema.cc 2010-03-31 15:37:34 +0000 |
2497 | +++ plugin/schema_engine/schema.cc 2010-04-01 19:20:51 +0000 |
2498 | @@ -69,7 +69,7 @@ |
2499 | |
2500 | void Schema::prime() |
2501 | { |
2502 | - CachedDirectory directory(drizzle_data_home, CachedDirectory::DIRECTORY); |
2503 | + CachedDirectory directory(data_home, CachedDirectory::DIRECTORY); |
2504 | CachedDirectory::Entries files= directory.getEntries(); |
2505 | |
2506 | pthread_rwlock_wrlock(&schema_lock); |
2507 | @@ -113,7 +113,7 @@ |
2508 | |
2509 | // If for some reason getting a lock should fail, we resort to disk |
2510 | |
2511 | - CachedDirectory directory(drizzle_data_home, CachedDirectory::DIRECTORY); |
2512 | + CachedDirectory directory(data_home, CachedDirectory::DIRECTORY); |
2513 | |
2514 | CachedDirectory::Entries files= directory.getEntries(); |
2515 | |
2516 | |
2517 | === modified file 'plugin/schema_engine/tests/r/exists.result' |
2518 | --- plugin/schema_engine/tests/r/exists.result 2010-04-01 19:20:50 +0000 |
2519 | +++ plugin/schema_engine/tests/r/exists.result 2010-03-24 05:40:58 +0000 |
2520 | @@ -1,3 +1,3 @@ |
2521 | select * from data_dictionary.plugins WHERE PLUGIN_TYPE="storageengine" AND PLUGIN_NAME="schema"; |
2522 | PLUGIN_NAME PLUGIN_TYPE IS_ACTIVE MODULE_NAME |
2523 | -schema StorageEngine TRUE schema_engine |
2524 | +schema StorageEngine TRUE SchemaEngine |
2525 | |
2526 | === modified file 'plugin/signal_handler/signal_handler.cc' |
2527 | --- plugin/signal_handler/signal_handler.cc 2010-03-26 21:36:11 +0000 |
2528 | +++ plugin/signal_handler/signal_handler.cc 2010-04-01 19:20:51 +0000 |
2529 | @@ -23,6 +23,7 @@ |
2530 | #include "drizzled/internal/my_pthread.h" |
2531 | #include "drizzled/internal/my_sys.h" |
2532 | #include "drizzled/plugin/daemon.h" |
2533 | +#include "drizzled/signal_handler.h" |
2534 | |
2535 | #include <sys/stat.h> |
2536 | #include <fcntl.h> |
2537 | @@ -67,7 +68,7 @@ |
2538 | kill_in_progress=true; |
2539 | abort_loop=1; // This should be set |
2540 | if (sig != 0) // 0 is not a valid signal number |
2541 | - my_sigset(sig, SIG_IGN); /* purify inspected */ |
2542 | + ignore_signal(sig); /* purify inspected */ |
2543 | if (sig == SIGTERM || sig == 0) |
2544 | errmsg_printf(ERRMSG_LVL_INFO, _(ER(ER_NORMAL_SHUTDOWN)),internal::my_progname); |
2545 | else |
2546 | |
2547 | === modified file 'support-files/drizzle.spec.in' |
2548 | --- support-files/drizzle.spec.in 2010-03-27 10:10:49 +0000 |
2549 | +++ support-files/drizzle.spec.in 2010-04-01 19:20:51 +0000 |
2550 | @@ -479,6 +479,12 @@ |
2551 | %{_includedir}/drizzled/version.h |
2552 | %{_includedir}/drizzled/visibility.h |
2553 | %{_includedir}/drizzled/xid.h |
2554 | +%{_libdir}/libdrizzled.la |
2555 | +%{_libdir}/libdrizzled.so |
2556 | +%{_libdir}/libdrizzled.so.* |
2557 | +%{_libdir}/libdrizzledmessage.la |
2558 | +%{_libdir}/libdrizzledmessage.so |
2559 | +%{_libdir}/libdrizzledmessage.so.* |
2560 | %{_libdir}/drizzle/libarchive_plugin.la |
2561 | %{_libdir}/drizzle/libarchive_plugin.so |
2562 | %{_libdir}/drizzle/libascii_plugin.la |
2563 | |
2564 | === modified file 'tests/test-run.pl' |
2565 | --- tests/test-run.pl 2010-03-31 18:10:36 +0000 |
2566 | +++ tests/test-run.pl 2010-04-01 19:20:51 +0000 |
2567 | @@ -3337,10 +3337,12 @@ |
2568 | # write init file for mysqld |
2569 | mtr_tofile($gdb_init_file, |
2570 | "set args $str\n" . |
2571 | + "set breakpoint pending on\n" . |
2572 | "break drizzled::mysql_parse\n" . |
2573 | "commands 1\n" . |
2574 | "disable 1\n" . |
2575 | "end\n" . |
2576 | + "set breakpoint pending off\n" . |
2577 | "run"); |
2578 | } |
2579 | |
2580 | |
2581 | === modified file 'tests/valgrind.supp' |
2582 | --- tests/valgrind.supp 2010-03-24 19:45:37 +0000 |
2583 | +++ tests/valgrind.supp 2010-04-01 19:20:51 +0000 |
2584 | @@ -782,6 +782,30 @@ |
2585 | } |
2586 | |
2587 | { |
2588 | + thr_local_hash static initialization |
2589 | + Memcheck:Leak |
2590 | + fun:malloc |
2591 | + fun:mem_heap_create_block |
2592 | + ... |
2593 | + fun:_ZL13innobase_initR14PluginRegistry |
2594 | + fun:_Z11plugin_initPiPPci |
2595 | + fun:_ZL22init_server_componentsv |
2596 | + fun:main |
2597 | +} |
2598 | + |
2599 | +{ |
2600 | + thr_local_hash static initialization |
2601 | + Memcheck:Leak |
2602 | + fun:malloc |
2603 | + fun:ut_malloc_low |
2604 | + ... |
2605 | + fun:_ZL13innobase_initR14PluginRegistry |
2606 | + fun:_Z11plugin_initPiPPci |
2607 | + fun:_ZL22init_server_componentsv |
2608 | + fun:main |
2609 | +} |
2610 | + |
2611 | +{ |
2612 | InnoDB Garbage |
2613 | Memcheck:Value8 |
2614 | ... |
Looks great! Excited to get the new main.cc whittled down even more.