Merge lp:~stewart/drizzle/remove-more-unireg into lp:drizzle

Proposed by Stewart Smith
Status: Merged
Merged at revision: 2629
Proposed branch: lp:~stewart/drizzle/remove-more-unireg
Merge into: lp:drizzle
Diff against target: 789 lines (+94/-95)
5 files modified
drizzled/drizzled.cc (+68/-68)
drizzled/drizzled_abort.h (+10/-11)
drizzled/include.am (+1/-1)
drizzled/main.cc (+11/-11)
drizzled/module/registry.h (+4/-4)
To merge this branch: bzr merge lp:~stewart/drizzle/remove-more-unireg
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Drizzle Trunk Pending
Review via email: mp+150857@code.launchpad.net

Description of the change

unireg.h now has nothing to do with UNIREG. Let's stop confusing people.

To post a comment you must log in.
Revision history for this message
Stewart Smith (stewart) wrote :

discussed (and approved) with Brian over email

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'drizzled/drizzled.cc'
2--- drizzled/drizzled.cc 2012-12-13 18:45:19 +0000
3+++ drizzled/drizzled.cc 2013-02-27 17:19:19 +0000
4@@ -77,7 +77,7 @@
5 #include <drizzled/statistics_variables.h>
6 #include <drizzled/table/cache.h>
7 #include <drizzled/temporal_format.h> /* For init_temporal_formats() */
8-#include <drizzled/unireg.h>
9+#include <drizzled/drizzled_abort.h>
10 #include <plugin/myisam/myisam.h>
11 #include <drizzled/typelib.h>
12 #include <drizzled/visibility.h>
13@@ -437,7 +437,7 @@
14 (void)close(file); /* We can ignore the error, since we are going to error anyway at this point */
15 }
16
17- unireg_abort << "Can't start server, was unable to create PID file: " << pid_file.string();
18+ drizzled_abort << "Can't start server, was unable to create PID file: " << pid_file.string();
19 }
20
21 #ifdef DEFINED_O_CLOEXEC
22@@ -524,20 +524,20 @@
23 }
24 }
25
26-static bool unireg_startup_completed= false;
27-void unireg_startup_finished()
28+static bool drizzled_startup_completed= false;
29+void drizzled_startup_finished()
30 {
31- unireg_startup_completed= true;
32+ drizzled_startup_completed= true;
33 }
34
35-void unireg_exit()
36+void drizzled_exit()
37 {
38 internal::my_end();
39- assert(unireg_startup_completed == false);
40+ assert(drizzled_startup_completed == false);
41 exit(EXIT_SUCCESS);
42 }
43
44-void unireg_actual_abort(const char *file, int line, const char *func, const std::string& message)
45+void drizzled_actual_abort(const char *file, int line, const char *func, const std::string& message)
46 {
47 std::stringstream temp;
48 temp << _("Aborting:") << "\"" << message << "\"" << ". Abort was called from " << file << ":" << line << " in " << func << "()";
49@@ -546,7 +546,7 @@
50 clean_up(vm.count("help") == 0);
51 internal::my_end();
52
53- assert(unireg_startup_completed == false);
54+ assert(drizzled_startup_completed == false);
55 exit(EXIT_FAILURE);
56 }
57
58@@ -607,7 +607,7 @@
59 }
60 if (not user)
61 {
62- unireg_abort << _("drizzled cannot be run as root, use --user to start drizzled up as another user");
63+ drizzled_abort << _("drizzled cannot be run as root, use --user to start drizzled up as another user");
64 }
65
66 if (strcmp(user, "root") == 0)
67@@ -635,7 +635,7 @@
68
69 if (failed)
70 {
71- unireg_abort << "Fatal error: Can't change to run as user '" << user << "' ; Please check that the user exists!";
72+ drizzled_abort << "Fatal error: Can't change to run as user '" << user << "' ; Please check that the user exists!";
73
74 #ifdef PR_SET_DUMPABLE
75 if (getDebug().test(debug::CORE_ON_SIGNAL))
76@@ -657,11 +657,11 @@
77 initgroups(user, user_info_arg->pw_gid);
78 if (setgid(user_info_arg->pw_gid) == -1)
79 {
80- unireg_abort << _("Set process group ID failed ") << strerror(errno);
81+ drizzled_abort << _("Set process group ID failed ") << strerror(errno);
82 }
83 if (setuid(user_info_arg->pw_uid) == -1)
84 {
85- unireg_abort << _("Set process user ID failed") << strerror(errno);
86+ drizzled_abort << _("Set process user ID failed") << strerror(errno);
87 }
88 }
89
90@@ -672,7 +672,7 @@
91 {
92 if ((chroot(path) == -1) or chdir("/") == 0)
93 {
94- unireg_abort << _("Process chroot failed");
95+ drizzled_abort << _("Process chroot failed");
96 }
97 }
98
99@@ -771,7 +771,7 @@
100 global_system_variables.auto_increment_increment= 1;
101 if (in_auto_increment_increment < 1 || in_auto_increment_increment > UINT64_MAX)
102 {
103- unireg_abort << _("Invalid Value for auto_increment_increment");
104+ drizzled_abort << _("Invalid Value for auto_increment_increment");
105 }
106 global_system_variables.auto_increment_increment= in_auto_increment_increment;
107 }
108@@ -781,7 +781,7 @@
109 global_system_variables.auto_increment_offset= 1;
110 if (in_auto_increment_offset < 1 || in_auto_increment_offset > UINT64_MAX)
111 {
112- unireg_abort << _("Invalid Value for auto_increment_offset");
113+ drizzled_abort << _("Invalid Value for auto_increment_offset");
114 }
115 global_system_variables.auto_increment_offset= in_auto_increment_offset;
116 }
117@@ -791,7 +791,7 @@
118 global_system_variables.completion_type= 0;
119 if (in_completion_type > 2)
120 {
121- unireg_abort << _("Invalid Value for completion_type");
122+ drizzled_abort << _("Invalid Value for completion_type");
123 }
124 global_system_variables.completion_type= in_completion_type;
125 }
126@@ -802,7 +802,7 @@
127 global_system_variables.div_precincrement= 4;
128 if (in_div_precincrement > DECIMAL_MAX_SCALE)
129 {
130- unireg_abort << _("Invalid Value for div-precision-increment");
131+ drizzled_abort << _("Invalid Value for div-precision-increment");
132 }
133 global_system_variables.div_precincrement= in_div_precincrement;
134 }
135@@ -812,7 +812,7 @@
136 global_system_variables.group_concat_max_len= 1024;
137 if (in_group_concat_max_len > ULONG_MAX || in_group_concat_max_len < 4)
138 {
139- unireg_abort << _("Invalid Value for group_concat_max_len");
140+ drizzled_abort << _("Invalid Value for group_concat_max_len");
141 }
142 global_system_variables.group_concat_max_len= in_group_concat_max_len;
143 }
144@@ -822,7 +822,7 @@
145 global_system_variables.join_buff_size= (128*1024L);
146 if (in_join_buffer_size < IO_SIZE*2 || in_join_buffer_size > ULONG_MAX)
147 {
148- unireg_abort << _("Invalid Value for join_buffer_size");
149+ drizzled_abort << _("Invalid Value for join_buffer_size");
150 }
151 in_join_buffer_size-= in_join_buffer_size % IO_SIZE;
152 global_system_variables.join_buff_size= in_join_buffer_size;
153@@ -833,7 +833,7 @@
154 global_system_variables.max_allowed_packet= (64*1024*1024L);
155 if (in_max_allowed_packet < 1024 || in_max_allowed_packet > 1024*1024L*1024L)
156 {
157- unireg_abort << _("Invalid Value for max_allowed_packet");
158+ drizzled_abort << _("Invalid Value for max_allowed_packet");
159 }
160 in_max_allowed_packet-= in_max_allowed_packet % 1024;
161 global_system_variables.max_allowed_packet= in_max_allowed_packet;
162@@ -844,7 +844,7 @@
163 global_system_variables.max_error_count= DEFAULT_ERROR_COUNT;
164 if (in_max_error_count > 65535)
165 {
166- unireg_abort << _("Invalid Value for max_error_count");
167+ drizzled_abort << _("Invalid Value for max_error_count");
168 }
169 global_system_variables.max_error_count= in_max_error_count;
170 }
171@@ -854,7 +854,7 @@
172 global_system_variables.max_heap_table_size= (16*1024*1024L);
173 if (in_max_heap_table_size < 16384 || in_max_heap_table_size > MAX_MEM_TABLE_SIZE)
174 {
175- unireg_abort << _("Invalid Value for max_heap_table_size");
176+ drizzled_abort << _("Invalid Value for max_heap_table_size");
177 }
178 in_max_heap_table_size-= in_max_heap_table_size % 1024;
179 global_system_variables.max_heap_table_size= in_max_heap_table_size;
180@@ -865,7 +865,7 @@
181 global_system_variables.min_examined_row_limit= 0;
182 if (in_min_examined_row_limit > ULONG_MAX)
183 {
184- unireg_abort << _("Invalid Value for min_examined_row_limit");
185+ drizzled_abort << _("Invalid Value for min_examined_row_limit");
186 }
187 global_system_variables.min_examined_row_limit= in_min_examined_row_limit;
188 }
189@@ -875,7 +875,7 @@
190 global_system_variables.max_join_size= INT32_MAX;
191 if ((uint64_t)in_max_join_size < 1 || (uint64_t)in_max_join_size > INT32_MAX)
192 {
193- unireg_abort << _("Invalid Value for max_join_size");
194+ drizzled_abort << _("Invalid Value for max_join_size");
195 }
196 global_system_variables.max_join_size= in_max_join_size;
197 }
198@@ -885,7 +885,7 @@
199 global_system_variables.max_length_for_sort_data= 1024;
200 if (in_max_length_for_sort_data < 4 || in_max_length_for_sort_data > 8192*1024L)
201 {
202- unireg_abort << _("Invalid Value for max_length_for_sort_data");
203+ drizzled_abort << _("Invalid Value for max_length_for_sort_data");
204 }
205 global_system_variables.max_length_for_sort_data= in_max_length_for_sort_data;
206 }
207@@ -895,7 +895,7 @@
208 global_system_variables.max_seeks_for_key= ULONG_MAX;
209 if (in_max_seeks_for_key < 1 || in_max_seeks_for_key > ULONG_MAX)
210 {
211- unireg_abort << _("Invalid Value for max_seeks_for_key");
212+ drizzled_abort << _("Invalid Value for max_seeks_for_key");
213 }
214 global_system_variables.max_seeks_for_key= in_max_seeks_for_key;
215 }
216@@ -905,7 +905,7 @@
217 global_system_variables.max_sort_length= 1024;
218 if ((int64_t)in_max_sort_length < 4 || (int64_t)in_max_sort_length > 8192*1024L)
219 {
220- unireg_abort << _("Invalid Value for max_sort_length");
221+ drizzled_abort << _("Invalid Value for max_sort_length");
222 }
223 global_system_variables.max_sort_length= in_max_sort_length;
224 }
225@@ -915,7 +915,7 @@
226 global_system_variables.optimizer_search_depth= 0;
227 if (in_optimizer_search_depth > MAX_TABLES + 2)
228 {
229- unireg_abort << _("Invalid Value for optimizer_search_depth");
230+ drizzled_abort << _("Invalid Value for optimizer_search_depth");
231 }
232 global_system_variables.optimizer_search_depth= in_optimizer_search_depth;
233 }
234@@ -925,7 +925,7 @@
235 global_system_variables.preload_buff_size= (32*1024L);
236 if (in_preload_buff_size < 1024 || in_preload_buff_size > 1024*1024*1024L)
237 {
238- unireg_abort << _("Invalid Value for preload_buff_size");
239+ drizzled_abort << _("Invalid Value for preload_buff_size");
240 }
241 global_system_variables.preload_buff_size= in_preload_buff_size;
242 }
243@@ -935,7 +935,7 @@
244 global_system_variables.query_alloc_block_size= QUERY_ALLOC_BLOCK_SIZE;
245 if (in_query_alloc_block_size < 1024)
246 {
247- unireg_abort << _("Invalid Value for query_alloc_block_size");
248+ drizzled_abort << _("Invalid Value for query_alloc_block_size");
249 }
250 in_query_alloc_block_size-= in_query_alloc_block_size % 1024;
251 global_system_variables.query_alloc_block_size= in_query_alloc_block_size;
252@@ -946,7 +946,7 @@
253 global_system_variables.query_prealloc_size= QUERY_ALLOC_PREALLOC_SIZE;
254 if (in_query_prealloc_size < QUERY_ALLOC_PREALLOC_SIZE)
255 {
256- unireg_abort << _("Invalid Value for query_prealloc_size");
257+ drizzled_abort << _("Invalid Value for query_prealloc_size");
258 }
259 in_query_prealloc_size-= in_query_prealloc_size % 1024;
260 global_system_variables.query_prealloc_size= in_query_prealloc_size;
261@@ -957,7 +957,7 @@
262 global_system_variables.range_alloc_block_size= RANGE_ALLOC_BLOCK_SIZE;
263 if (in_range_alloc_block_size < RANGE_ALLOC_BLOCK_SIZE)
264 {
265- unireg_abort << _("Invalid Value for range_alloc_block_size");
266+ drizzled_abort << _("Invalid Value for range_alloc_block_size");
267 }
268 in_range_alloc_block_size-= in_range_alloc_block_size % 1024;
269 global_system_variables.range_alloc_block_size= in_range_alloc_block_size;
270@@ -968,7 +968,7 @@
271 global_system_variables.read_buff_size= (128*1024L);
272 if (in_read_buff_size < IO_SIZE*2 || in_read_buff_size > INT32_MAX)
273 {
274- unireg_abort << _("Invalid Value for read_buff_size");
275+ drizzled_abort << _("Invalid Value for read_buff_size");
276 }
277 in_read_buff_size-= in_read_buff_size % IO_SIZE;
278 global_system_variables.read_buff_size= in_read_buff_size;
279@@ -979,7 +979,7 @@
280 global_system_variables.read_rnd_buff_size= (256*1024L);
281 if (in_read_rnd_buff_size < 64 || in_read_rnd_buff_size > UINT32_MAX)
282 {
283- unireg_abort << _("Invalid Value for read_rnd_buff_size");
284+ drizzled_abort << _("Invalid Value for read_rnd_buff_size");
285 }
286 global_system_variables.read_rnd_buff_size= in_read_rnd_buff_size;
287 }
288@@ -989,7 +989,7 @@
289 global_system_variables.sortbuff_size= MAX_SORT_MEMORY;
290 if ((uint32_t)in_sortbuff_size < MIN_SORT_MEMORY)
291 {
292- unireg_abort << _("Invalid Value for sort_buff_size");
293+ drizzled_abort << _("Invalid Value for sort_buff_size");
294 }
295 global_system_variables.sortbuff_size= in_sortbuff_size;
296 }
297@@ -999,7 +999,7 @@
298 table_def_size= 128;
299 if (in_table_def_size < 1 || in_table_def_size > 512*1024L)
300 {
301- unireg_abort << _("Invalid Value for table_def_size");
302+ drizzled_abort << _("Invalid Value for table_def_size");
303 }
304 table_def_size= in_table_def_size;
305 }
306@@ -1009,7 +1009,7 @@
307 table_cache_size= TABLE_OPEN_CACHE_DEFAULT;
308 if (in_table_cache_size < TABLE_OPEN_CACHE_MIN || in_table_cache_size > 512*1024L)
309 {
310- unireg_abort << _("Invalid Value for table_cache_size");
311+ drizzled_abort << _("Invalid Value for table_cache_size");
312 }
313 table_cache_size= in_table_cache_size;
314 }
315@@ -1019,7 +1019,7 @@
316 table_lock_wait_timeout= 50;
317 if (in_table_lock_wait_timeout < 1 || in_table_lock_wait_timeout > 1024*1024*1024)
318 {
319- unireg_abort << _("Invalid Value for table_lock_wait_timeout");
320+ drizzled_abort << _("Invalid Value for table_lock_wait_timeout");
321 }
322 table_lock_wait_timeout= in_table_lock_wait_timeout;
323 }
324@@ -1034,7 +1034,7 @@
325 global_system_variables.tmp_table_size= 16*1024*1024L;
326 if (in_tmp_table_size < 1024 || in_tmp_table_size > MAX_MEM_TABLE_SIZE)
327 {
328- unireg_abort << _("Invalid Value for table_lock_wait_timeout");
329+ drizzled_abort << _("Invalid Value for table_lock_wait_timeout");
330 }
331 global_system_variables.tmp_table_size= in_tmp_table_size;
332 }
333@@ -1044,7 +1044,7 @@
334 transaction_message_threshold= 1024*1024;
335 if ((int64_t) in_transaction_message_threshold < 128*1024 || (int64_t)in_transaction_message_threshold > 1024*1024)
336 {
337- unireg_abort << _("Invalid Value for transaction_message_threshold valid values are between 131072 - 1048576 bytes");
338+ drizzled_abort << _("Invalid Value for transaction_message_threshold valid values are between 131072 - 1048576 bytes");
339 }
340 transaction_message_threshold= in_transaction_message_threshold;
341 }
342@@ -1092,7 +1092,7 @@
343 }
344 else
345 {
346- unireg_abort << "Defaults file '" << it << "' not found";
347+ drizzled_abort << "Defaults file '" << it << "' not found";
348 }
349 }
350 }
351@@ -1347,7 +1347,7 @@
352 }
353 catch (std::exception&)
354 {
355- unireg_abort << _("Duplicate entry for command line option");
356+ drizzled_abort << _("Duplicate entry for command line option");
357 }
358
359 /* TODO: here is where we should add a process_env_vars */
360@@ -1359,13 +1359,13 @@
361 }
362 catch (po::validation_error &err)
363 {
364- unireg_abort << err.what() << ". " << "Use --help to get a list of available options. ";
365+ drizzled_abort << err.what() << ". " << "Use --help to get a list of available options. ";
366 }
367
368 if (vm.count("version"))
369 {
370 print_version();
371- unireg_exit();
372+ drizzled_exit();
373 }
374
375 if (!vm["no-defaults"].as<bool>())
376@@ -1400,13 +1400,13 @@
377 }
378 catch (po::validation_error &err)
379 {
380- unireg_abort << err.what() << ". " << "Use --help to get a list of available options. ";
381+ drizzled_abort << err.what() << ". " << "Use --help to get a list of available options. ";
382 }
383
384 return true;
385 }
386
387-// Return failure if we can't pass this, unireg_abort() will then be called
388+// Return failure if we can't pass this, drizzled_abort() will then be called
389 // by the caller.
390 bool init_variables_after_daemonizing(module::Registry &plugins)
391 {
392@@ -1420,7 +1420,7 @@
393
394 if (plugin_init(plugins, plugin_options))
395 {
396- unireg_abort << _("Failed to initialize plugins");
397+ drizzled_abort << _("Failed to initialize plugins");
398 }
399
400 full_options.add(plugin_options);
401@@ -1446,15 +1446,15 @@
402 }
403 catch (po::validation_error &err)
404 {
405- unireg_abort << err.what() << ". " << "Use --help to get a list of available options. ";
406+ drizzled_abort << err.what() << ". " << "Use --help to get a list of available options. ";
407 }
408 catch (po::invalid_command_line_syntax &err)
409 {
410- unireg_abort << err.what() << ". " << "Use --help to get a list of available options. ";
411+ drizzled_abort << err.what() << ". " << "Use --help to get a list of available options. ";
412 }
413 catch (po::unknown_option &err)
414 {
415- unireg_abort << err.what() << ". " << "Use --help to get a list of available options. ";
416+ drizzled_abort << err.what() << ". " << "Use --help to get a list of available options. ";
417 }
418
419 try
420@@ -1463,7 +1463,7 @@
421 }
422 catch (po::validation_error &err)
423 {
424- unireg_abort << err.what() << ". " << "Use --help to get a list of available options. ";
425+ drizzled_abort << err.what() << ". " << "Use --help to get a list of available options. ";
426 }
427
428 get_options();
429@@ -1546,7 +1546,7 @@
430
431 /*
432 We need to call each of these following functions to ensure that
433- all things are initialized so that unireg_abort() doesn't fail
434+ all things are initialized so that drizzled_abort() doesn't fail
435 */
436
437 // Resize the definition Cache at startup
438@@ -1561,12 +1561,12 @@
439
440 if (plugin_finalize(plugins))
441 {
442- unireg_abort << "plugin_finalize() failed";
443+ drizzled_abort << "plugin_finalize() failed";
444 }
445
446 if (plugin::Scheduler::setPlugin(opt_scheduler))
447 {
448- unireg_abort << _("No scheduler found");
449+ drizzled_abort << _("No scheduler found");
450 }
451
452 /*
453@@ -1584,7 +1584,7 @@
454 plugin::StorageEngine *engine= plugin::StorageEngine::findByName(default_storage_engine_str);
455 if (engine == NULL)
456 {
457- unireg_abort << _("Unknown/unsupported storage engine: ") << default_storage_engine_str;
458+ drizzled_abort << _("Unknown/unsupported storage engine: ") << default_storage_engine_str;
459 }
460 global_system_variables.storage_engine= engine;
461 }
462@@ -1592,7 +1592,7 @@
463 if (plugin::XaResourceManager::recoverAllXids())
464 {
465 /* This function alredy generates error messages */
466- unireg_abort << "plugin::XaResourceManager::recoverAllXids() failed";
467+ drizzled_abort << "plugin::XaResourceManager::recoverAllXids() failed";
468 }
469
470 init_update_queries();
471@@ -1949,7 +1949,7 @@
472 {
473 if ((default_charset_info= get_charset_by_csname(default_character_set_name, MY_CS_PRIMARY)) == NULL)
474 {
475- unireg_abort << "Failed to load default_charset_info:" << default_character_set_name;
476+ drizzled_abort << "Failed to load default_charset_info:" << default_character_set_name;
477 }
478
479 if (default_collation_name == NULL)
480@@ -1975,7 +1975,7 @@
481 all_options.add(plugin_options);
482 cout << all_options << endl;
483
484- unireg_exit();
485+ drizzled_exit();
486 }
487
488 /**
489@@ -2087,7 +2087,7 @@
490 if ((vm["sort-heap-threshold"].as<uint64_t>() > 0) and
491 (vm["sort-heap-threshold"].as<uint64_t>() < global_system_variables.sortbuff_size))
492 {
493- unireg_abort << _("sort-heap-threshold cannot be less than sort-buffer-size");
494+ drizzled_abort << _("sort-heap-threshold cannot be less than sort-buffer-size");
495 }
496
497 global_sort_buffer.setMaxSize(vm["sort-heap-threshold"].as<uint64_t>());
498@@ -2098,7 +2098,7 @@
499 if ((vm["join-heap-threshold"].as<uint64_t>() > 0) and
500 (vm["join-heap-threshold"].as<uint64_t>() < global_system_variables.join_buff_size))
501 {
502- unireg_abort << _("join-heap-threshold cannot be less than join-buffer-size");
503+ drizzled_abort << _("join-heap-threshold cannot be less than join-buffer-size");
504 }
505
506 global_join_buffer.setMaxSize(vm["join-heap-threshold"].as<uint64_t>());
507@@ -2109,7 +2109,7 @@
508 if ((vm["read-rnd-threshold"].as<uint64_t>() > 0) and
509 (vm["read-rnd-threshold"].as<uint64_t>() < global_system_variables.read_rnd_buff_size))
510 {
511- unireg_abort << _("read-rnd-threshold cannot be less than read-rnd-buffer-size");
512+ drizzled_abort << _("read-rnd-threshold cannot be less than read-rnd-buffer-size");
513 }
514
515 global_read_rnd_buffer.setMaxSize(vm["read-rnd-threshold"].as<uint64_t>());
516@@ -2120,7 +2120,7 @@
517 if ((vm["read-buffer-threshold"].as<uint64_t>() > 0) and
518 (vm["read-buffer-threshold"].as<uint64_t>() < global_system_variables.read_buff_size))
519 {
520- unireg_abort << _("read-buffer-threshold cannot be less than read-buffer-size");
521+ drizzled_abort << _("read-buffer-threshold cannot be less than read-buffer-size");
522 }
523
524 global_read_buffer.setMaxSize(vm["read-buffer-threshold"].as<uint64_t>());
525@@ -2154,12 +2154,12 @@
526 const charset_info_st * const default_collation= get_charset_by_name(vm["collation-server"].as<string>().c_str());
527 if (not default_collation)
528 {
529- unireg_abort << "Unknown collation: " << default_collation_name;
530+ drizzled_abort << "Unknown collation: " << default_collation_name;
531 }
532
533 if (not my_charset_same(default_charset_info, default_collation))
534 {
535- unireg_abort << "COLLATION '" << default_collation_name << "' is not valid for CHARACTER SET '" << default_charset_info->csname << "'";
536+ drizzled_abort << "COLLATION '" << default_collation_name << "' is not valid for CHARACTER SET '" << default_charset_info->csname << "'";
537 }
538 default_charset_info= default_collation;
539 }
540@@ -2252,14 +2252,14 @@
541 assert(getuid() != 0 and geteuid() != 0);
542 if (getuid() == 0 or geteuid() == 0)
543 {
544- unireg_abort << "Drizzle cannot be run as root, please see the Security piece of the manual for more information.";
545+ drizzled_abort << "Drizzle cannot be run as root, please see the Security piece of the manual for more information.";
546 }
547
548 if (mkdir(drizzle_tmpdir.c_str(), 0777) == -1)
549 {
550 if (errno != EEXIST)
551 {
552- unireg_abort << "There was an error creating the '"
553+ drizzled_abort << "There was an error creating the '"
554 << fs::path(drizzle_tmpdir).leaf()
555 << "' part of the path '"
556 << drizzle_tmpdir
557@@ -2269,7 +2269,7 @@
558
559 if (stat(drizzle_tmpdir.c_str(), &buf) || not S_ISDIR(buf.st_mode))
560 {
561- unireg_abort << "There was an error opening the path '" << drizzle_tmpdir << "', please check the path exists and is writable.";
562+ drizzled_abort << "There was an error opening the path '" << drizzle_tmpdir << "', please check the path exists and is writable.";
563 }
564 }
565
566
567=== renamed file 'drizzled/unireg.h' => 'drizzled/drizzled_abort.h'
568--- drizzled/unireg.h 2011-07-19 02:02:52 +0000
569+++ drizzled/drizzled_abort.h 2013-02-27 17:19:19 +0000
570@@ -2,6 +2,8 @@
571 * vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
572 *
573 * Copyright (C) 2008 Sun Microsystems, Inc.
574+ * Copyright (C) 2011 Brian Aker
575+ * Copyright (C) 2013 Stewart Smith
576 *
577 * This program is free software; you can redistribute it and/or modify
578 * it under the terms of the GNU General Public License as published by
579@@ -17,9 +19,6 @@
580 * along with this program; if not, write to the Free Software
581 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
582 */
583-
584-/* Extra functions used by unireg library */
585-
586 #pragma once
587
588 #include <drizzled/visibility.h>
589@@ -28,16 +27,16 @@
590 namespace drizzled
591 {
592
593-void unireg_exit() __attribute__((noreturn));
594-DRIZZLED_API void unireg_actual_abort(const char *file, int line, const char *func, const std::string& message) __attribute__((noreturn));
595-void unireg_startup_finished();
596+void drizzled_exit() __attribute__((noreturn));
597+DRIZZLED_API void drizzled_actual_abort(const char *file, int line, const char *func, const std::string& message) __attribute__((noreturn));
598+void drizzled_startup_finished();
599
600 namespace stream {
601
602 namespace detail {
603
604 template<class Ch, class Tr, class A>
605- class _unireg {
606+ class _drizzled_abort_log {
607 private:
608
609 public:
610@@ -46,7 +45,7 @@
611 public:
612 void operator()(const stream_buffer &s, const char *filename, int line, const char *func)
613 {
614- unireg_actual_abort(filename, line, func, s.str());
615+ drizzled_actual_abort(filename, line, func, s.str());
616 }
617 };
618
619@@ -90,9 +89,9 @@
620 };
621 } // namespace detail
622
623-class _unireg : public detail::log<detail::_unireg> {
624+class _drizzled_abort_log : public detail::log<detail::_drizzled_abort_log> {
625 public:
626- _unireg(const char *filename, int line_number, const char *func)
627+ _drizzled_abort_log(const char *filename, int line_number, const char *func)
628 {
629 set_filename(filename, line_number, func);
630 }
631@@ -100,6 +99,6 @@
632
633 } // namespace stream
634
635-#define unireg_abort stream::_unireg(__FILE__, __LINE__, __func__)
636+#define drizzled_abort stream::_drizzled_abort_log(__FILE__, __LINE__, __func__)
637
638 } /* namespace drizzled */
639
640=== modified file 'drizzled/include.am'
641--- drizzled/include.am 2013-01-20 11:22:10 +0000
642+++ drizzled/include.am 2013-02-27 17:19:19 +0000
643@@ -83,6 +83,7 @@
644 drizzled/discrete_interval.h \
645 drizzled/display.h \
646 drizzled/drizzled.h \
647+ drizzled/drizzled_abort.h \
648 drizzled/dtcollation.h \
649 drizzled/dynamic_array.h \
650 drizzled/enum.h \
651@@ -512,7 +513,6 @@
652 drizzled/type/ipv6.h \
653 drizzled/typelib.h \
654 drizzled/unique.h \
655- drizzled/unireg.h \
656 drizzled/user_var_entry.h \
657 drizzled/utf8/checked.h \
658 drizzled/utf8/core.h \
659
660=== modified file 'drizzled/main.cc'
661--- drizzled/main.cc 2012-10-20 23:08:23 +0000
662+++ drizzled/main.cc 2013-02-27 17:19:19 +0000
663@@ -63,7 +63,7 @@
664 #include <drizzled/session/cache.h>
665 #include <drizzled/signal_handler.h>
666 #include <drizzled/transaction_services.h>
667-#include <drizzled/unireg.h>
668+#include <drizzled/drizzled_abort.h>
669 #include <drizzled/util/backtrace.h>
670 #include <drizzled/current_session.h>
671 #include <drizzled/daemon.h>
672@@ -272,7 +272,7 @@
673 /* init_common_variables must get basic settings such as data_home_dir and plugin_load_list. */
674 if (init_variables_before_daemonizing(argc, argv) == false)
675 {
676- unireg_abort << "init_variables_before_daemonizing() failed"; // Will do exit
677+ drizzled_abort << "init_variables_before_daemonizing() failed"; // Will do exit
678 }
679
680 if (opt_daemon and was_help_requested() == false)
681@@ -284,18 +284,18 @@
682
683 if (daemonize())
684 {
685- unireg_abort << "--daemon failed";
686+ drizzled_abort << "--daemon failed";
687 }
688 }
689
690 if (init_variables_after_daemonizing(modules) == false)
691 {
692- unireg_abort << "init_variables_after_daemonizing() failed"; // Will do exit
693+ drizzled_abort << "init_variables_after_daemonizing() failed"; // Will do exit
694 }
695
696 /*
697 init signals & alarm
698- After this we can't quit by a simple unireg_abort
699+ After this we can't quit by a simple drizzled_abort
700 */
701
702 init_signals();
703@@ -307,7 +307,7 @@
704 {
705 if (chdir(getDataHome().string().c_str()))
706 {
707- unireg_abort << "Data directory " << getDataHome().string() << " does not exist";
708+ drizzled_abort << "Data directory " << getDataHome().string() << " does not exist";
709 }
710
711 ifstream old_uuid_file ("server.uuid");
712@@ -338,13 +338,13 @@
713 case EACCES:
714 {
715 char cwd[1024];
716- unireg_abort << "Could not create local catalog, permission denied in directory:" << getcwd(cwd, sizeof(cwd));
717+ drizzled_abort << "Could not create local catalog, permission denied in directory:" << getcwd(cwd, sizeof(cwd));
718 }
719
720 default:
721 {
722 char cwd[1024];
723- unireg_abort << "Could not create local catalog, in directory:" << getcwd(cwd, sizeof(cwd)) << " system error was:" << strerror(errno);
724+ drizzled_abort << "Could not create local catalog, in directory:" << getcwd(cwd, sizeof(cwd)) << " system error was:" << strerror(errno);
725 }
726 }
727 }
728@@ -370,7 +370,7 @@
729 cout << _("In File: ") << *::boost::get_error_info<boost::throw_file>(ex) << endl;
730 cout << _("On Line: ") << *::boost::get_error_info<boost::throw_line>(ex) << endl;
731 #endif
732- unireg_abort << "init_server_components() failed";
733+ drizzled_abort << "init_server_components() failed";
734 }
735
736
737@@ -383,13 +383,13 @@
738 *
739 * @todo
740 *
741- * not checking return since unireg_abort() hangs
742+ * not checking return since drizzled_abort() hangs
743 */
744 (void) ReplicationServices::evaluateRegisteredPlugins();
745
746 if (plugin::Listen::setup())
747 {
748- unireg_abort << "Failed plugin::Listen::setup()";
749+ drizzled_abort << "Failed plugin::Listen::setup()";
750 }
751
752 assert(plugin::num_trx_monitored_objects > 0);
753
754=== modified file 'drizzled/module/registry.h'
755--- drizzled/module/registry.h 2011-08-16 01:07:54 +0000
756+++ drizzled/module/registry.h 2013-02-27 17:19:19 +0000
757@@ -29,7 +29,7 @@
758 #include <boost/scoped_ptr.hpp>
759
760 #include <drizzled/gettext.h>
761-#include <drizzled/unireg.h>
762+#include <drizzled/drizzled_abort.h>
763 #include <drizzled/errmsg_print.h>
764 #include <drizzled/plugin/plugin.h>
765 #include <drizzled/util/find_ptr.h>
766@@ -102,7 +102,7 @@
767 error_message+= plugin->getTypeName();
768 error_message+= ":";
769 error_message+= plugin->getName();
770- unireg_actual_abort(__FILE__, __LINE__, __func__, error_message);
771+ drizzled_actual_abort(__FILE__, __LINE__, __func__, error_message);
772 }
773
774 if (T::addPlugin(plugin))
775@@ -112,12 +112,12 @@
776 error_message+= plugin->getTypeName();
777 error_message+= ":";
778 error_message+= plugin->getName();
779- unireg_actual_abort(__FILE__, __LINE__, __func__, error_message);
780+ drizzled_actual_abort(__FILE__, __LINE__, __func__, error_message);
781 }
782
783 if (failed)
784 {
785- unireg_abort << _("Fatal error: Failed initializing: ") << plugin->getTypeName() << ":" << plugin->getName();
786+ drizzled_abort << _("Fatal error: Failed initializing: ") << plugin->getTypeName() << ":" << plugin->getName();
787 }
788 plugin_registry.insert(std::make_pair(std::make_pair(plugin_type, plugin_name), plugin));
789 }

Subscribers

People subscribed via source and target branches

to all changes: