~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Brian Aker
  • Date: 2008-11-26 17:28:06 UTC
  • Revision ID: brian@tangent.org-20081126172806-k2gfluduwnsmz7sg
ulong/64 bit straighten out.

Show diffs side-by-side

added added

removed removed

Lines of Context:
233
233
 {&Arg_comparator::compare_row,        &Arg_comparator::compare_e_row},
234
234
 {&Arg_comparator::compare_decimal,    &Arg_comparator::compare_e_decimal}};
235
235
 
236
 
const char *log_output_names[] = { "NONE", "FILE", NULL};
237
 
static const unsigned int log_output_names_len[]= { 4, 4, 0 };
238
 
TYPELIB log_output_typelib= {array_elements(log_output_names)-1,"",
239
 
                             log_output_names,
240
 
                             (unsigned int *) log_output_names_len};
241
 
 
242
236
/* static variables */
243
237
 
244
238
/* the default log output is log tables */
262
256
/* Global variables */
263
257
 
264
258
bool opt_bin_log;
265
 
ulong log_output_options;
266
259
bool opt_log_queries_not_using_indexes= false;
267
260
bool opt_error_log= 0;
268
261
bool opt_skip_show_db= false;
319
312
uint64_t table_def_size;
320
313
ulong what_to_log;
321
314
uint64_t slow_launch_time;
322
 
ulong slave_open_temp_tables;
323
 
ulong open_files_limit;
 
315
uint64_t slave_open_temp_tables;
 
316
uint64_t open_files_limit;
324
317
uint64_t max_binlog_size;
325
318
uint64_t max_relay_log_size;
326
319
uint64_t slave_net_timeout;
333
326
uint64_t binlog_cache_size= 0;
334
327
uint64_t max_binlog_cache_size= 0;
335
328
uint32_t refresh_version;  /* Increments on each reload */
336
 
ulong aborted_threads;
337
 
ulong aborted_connects;
338
 
ulong specialflag= 0;
339
 
ulong binlog_cache_use= 0;
340
 
ulong binlog_cache_disk_use= 0;
 
329
uint64_t aborted_threads;
 
330
uint64_t aborted_connects;
 
331
uint64_t binlog_cache_use= 0;
 
332
uint64_t binlog_cache_disk_use= 0;
341
333
uint64_t max_connections;
342
334
uint64_t max_connect_errors;
343
335
ulong thread_id=1L;
344
336
pid_t current_pid;
345
 
ulong slow_launch_threads = 0;
 
337
uint64_t slow_launch_threads= 0;
346
338
uint64_t sync_binlog_period;
347
339
uint64_t expire_logs_days= 0;
348
 
const char *log_output_str= "FILE";
349
340
 
350
341
const double log_10[] = {
351
342
  1e000, 1e001, 1e002, 1e003, 1e004, 1e005, 1e006, 1e007, 1e008, 1e009,
1832
1823
  {"unlock_tables",        (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_UNLOCK_TABLES]), SHOW_LONG_STATUS},
1833
1824
  {"update",               (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_UPDATE]), SHOW_LONG_STATUS},
1834
1825
  {"update_multi",         (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_UPDATE_MULTI]), SHOW_LONG_STATUS},
1835
 
  {NULL, NULL, SHOW_LONG}
 
1826
  {NULL, NULL, SHOW_LONGLONG}
1836
1827
};
1837
1828
 
1838
1829
static int init_common_variables(const char *conf_file_name, int argc,
3007
2998
#ifdef HAVE_MMAP
3008
2999
  {"log-tc-size", OPT_LOG_TC_SIZE,
3009
3000
   N_("Size of transaction coordinator log."),
3010
 
   (char**) &opt_tc_log_size, (char**) &opt_tc_log_size, 0, GET_ULONG,
 
3001
   (char**) &opt_tc_log_size, (char**) &opt_tc_log_size, 0, GET_ULL,
3011
3002
   REQUIRED_ARG, TC_LOG_MIN_SIZE, TC_LOG_MIN_SIZE, ULONG_MAX, 0,
3012
3003
   TC_LOG_PAGE_SIZE, 0},
3013
3004
#endif
3776
3767
*/
3777
3768
 
3778
3769
SHOW_VAR status_vars[]= {
3779
 
  {"Aborted_clients",          (char*) &aborted_threads,        SHOW_LONG},
3780
 
  {"Aborted_connects",         (char*) &aborted_connects,       SHOW_LONG},
3781
 
  {"Binlog_cache_disk_use",    (char*) &binlog_cache_disk_use,  SHOW_LONG},
3782
 
  {"Binlog_cache_use",         (char*) &binlog_cache_use,       SHOW_LONG},
 
3770
  {"Aborted_clients",          (char*) &aborted_threads,        SHOW_LONGLONG},
 
3771
  {"Aborted_connects",         (char*) &aborted_connects,       SHOW_LONGLONG},
 
3772
  {"Binlog_cache_disk_use",    (char*) &binlog_cache_disk_use,  SHOW_LONGLONG},
 
3773
  {"Binlog_cache_use",         (char*) &binlog_cache_use,       SHOW_LONGLONG},
3783
3774
  {"Bytes_received",           (char*) offsetof(STATUS_VAR, bytes_received), SHOW_LONGLONG_STATUS},
3784
3775
  {"Bytes_sent",               (char*) offsetof(STATUS_VAR, bytes_sent), SHOW_LONGLONG_STATUS},
3785
3776
  {"Com",                      (char*) com_status_vars, SHOW_ARRAY},
3786
3777
  {"Compression",              (char*) &show_net_compression_cont, SHOW_FUNC},
3787
3778
  {"Connections",              (char*) &thread_id,              SHOW_LONG_NOFLUSH},
3788
3779
  {"Created_tmp_disk_tables",  (char*) offsetof(STATUS_VAR, created_tmp_disk_tables), SHOW_LONG_STATUS},
3789
 
  {"Created_tmp_files",        (char*) &my_tmp_file_created,    SHOW_LONG},
 
3780
  {"Created_tmp_files",        (char*) &my_tmp_file_created,    SHOW_INT},
3790
3781
  {"Created_tmp_tables",       (char*) offsetof(STATUS_VAR, created_tmp_tables), SHOW_LONG_STATUS},
3791
3782
  {"Flush_commands",           (char*) &refresh_version,        SHOW_LONG_NOFLUSH},
3792
3783
  {"Handler_commit",           (char*) offsetof(STATUS_VAR, ha_commit_count), SHOW_LONG_STATUS},
3812
3803
  {"Key_write_requests",       (char*) offsetof(KEY_CACHE, global_cache_w_requests), SHOW_KEY_CACHE_LONGLONG},
3813
3804
  {"Key_writes",               (char*) offsetof(KEY_CACHE, global_cache_write), SHOW_KEY_CACHE_LONGLONG},
3814
3805
  {"Last_query_cost",          (char*) offsetof(STATUS_VAR, last_query_cost), SHOW_DOUBLE_STATUS},
3815
 
  {"Max_used_connections",     (char*) &max_used_connections,  SHOW_LONG},
 
3806
  {"Max_used_connections",     (char*) &max_used_connections,  SHOW_INT},
3816
3807
  {"Open_files",               (char*) &my_file_opened,         SHOW_LONG_NOFLUSH},
3817
3808
  {"Open_streams",             (char*) &my_stream_opened,       SHOW_LONG_NOFLUSH},
3818
3809
  {"Open_table_definitions",   (char*) &show_table_definitions_cont, SHOW_FUNC},
3826
3817
  {"Select_range",             (char*) offsetof(STATUS_VAR, select_range_count), SHOW_LONG_STATUS},
3827
3818
  {"Select_range_check",       (char*) offsetof(STATUS_VAR, select_range_check_count), SHOW_LONG_STATUS},
3828
3819
  {"Select_scan",              (char*) offsetof(STATUS_VAR, select_scan_count), SHOW_LONG_STATUS},
3829
 
  {"Slave_open_temp_tables",   (char*) &slave_open_temp_tables, SHOW_LONG},
 
3820
  {"Slave_open_temp_tables",   (char*) &slave_open_temp_tables, SHOW_LONGLONG},
3830
3821
  {"Slave_retried_transactions",(char*) &show_slave_retried_trans_cont, SHOW_FUNC},
3831
3822
  {"Slave_heartbeat_period",   (char*) &show_heartbeat_period_cont, SHOW_FUNC},
3832
3823
  {"Slave_received_heartbeats",(char*) &show_slave_received_heartbeats_cont, SHOW_FUNC},
3833
3824
  {"Slave_running",            (char*) &show_slave_running_cont,     SHOW_FUNC},
3834
 
  {"Slow_launch_threads",      (char*) &slow_launch_threads,    SHOW_LONG},
 
3825
  {"Slow_launch_threads",      (char*) &slow_launch_threads,    SHOW_LONGLONG},
3835
3826
  {"Slow_queries",             (char*) offsetof(STATUS_VAR, long_query_count), SHOW_LONG_STATUS},
3836
3827
  {"Sort_merge_passes",        (char*) offsetof(STATUS_VAR, filesort_merge_passes), SHOW_LONG_STATUS},
3837
3828
  {"Sort_range",               (char*) offsetof(STATUS_VAR, filesort_range_count), SHOW_LONG_STATUS},
3838
3829
  {"Sort_rows",                (char*) offsetof(STATUS_VAR, filesort_rows), SHOW_LONG_STATUS},
3839
3830
  {"Sort_scan",                (char*) offsetof(STATUS_VAR, filesort_scan_count), SHOW_LONG_STATUS},
3840
 
  {"Table_locks_immediate",    (char*) &locks_immediate,        SHOW_LONG},
3841
 
  {"Table_locks_waited",       (char*) &locks_waited,           SHOW_LONG},
 
3831
  {"Table_locks_immediate",    (char*) &locks_immediate,        SHOW_INT},
 
3832
  {"Table_locks_waited",       (char*) &locks_waited,           SHOW_INT},
3842
3833
#ifdef HAVE_MMAP
3843
 
  {"Tc_log_max_pages_used",    (char*) &tc_log_max_pages_used,  SHOW_LONG},
3844
 
  {"Tc_log_page_size",         (char*) &tc_log_page_size,       SHOW_LONG},
3845
 
  {"Tc_log_page_waits",        (char*) &tc_log_page_waits,      SHOW_LONG},
 
3834
  {"Tc_log_max_pages_used",    (char*) &tc_log_max_pages_used,  SHOW_LONGLONG},
 
3835
  {"Tc_log_page_size",         (char*) &tc_log_page_size,       SHOW_LONGLONG},
 
3836
  {"Tc_log_page_waits",        (char*) &tc_log_page_waits,      SHOW_LONGLONG},
3846
3837
#endif
3847
3838
  {"Threads_connected",        (char*) &connection_count,       SHOW_INT},
3848
3839
  {"Threads_created",          (char*) &thread_created,         SHOW_LONG_NOFLUSH},
3849
3840
  {"Threads_running",          (char*) &thread_running,         SHOW_INT},
3850
3841
  {"Uptime",                   (char*) &show_starttime_cont,         SHOW_FUNC},
3851
3842
  {"Uptime_since_flush_status",(char*) &show_flushstatustime_cont,   SHOW_FUNC},
3852
 
  {NULL, NULL, SHOW_LONG}
 
3843
  {NULL, NULL, SHOW_LONGLONG}
3853
3844
};
3854
3845
 
3855
3846
static void print_version(void)
3917
3908
  /* Things reset to zero */
3918
3909
  opt_skip_slave_start= opt_reckless_slave = 0;
3919
3910
  drizzle_home[0]= pidfile_name[0]= log_error_file[0]= 0;
3920
 
  log_output_options= find_bit_type(log_output_str, &log_output_typelib);
3921
3911
  opt_bin_log= 0;
3922
3912
  opt_skip_show_db=0;
3923
3913
  opt_logname= opt_binlog_index_name= 0;
3936
3926
  abort_loop= select_thread_in_use= signal_thread_in_use= 0;
3937
3927
  ready_to_exit= shutdown_in_progress= 0;
3938
3928
  aborted_threads= aborted_connects= 0;
3939
 
  specialflag= 0;
3940
3929
  binlog_cache_use=  binlog_cache_disk_use= 0;
3941
3930
  max_used_connections= slow_launch_threads = 0;
3942
3931
  drizzled_user= drizzled_chroot= opt_init_file= opt_bin_logname = 0;