~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Brian Aker
  • Date: 2009-01-24 16:18:44 UTC
  • Revision ID: brian@gir-3.local-20090124161844-yeo4yhpw5d4ur780
Refactor of scheduler plugin code to simplify around one structure. Also
enhanced failure code for multi load attempts (and moved it out of
sql_plugin and just into the actual plugin container).

Set pool_of_threads to be default.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
#include <drizzled/function/time/get_format.h>
45
45
#include <drizzled/errmsg.h>
46
46
#include <drizzled/unireg.h>
 
47
#include <drizzled/plugin_scheduling.h>
47
48
 
48
49
 
49
50
#if TIME_WITH_SYS_TIME
455
456
 
456
457
bool mysqld_embedded=0;
457
458
 
458
 
scheduler_functions thread_scheduler;
 
459
extern scheduling_st thread_scheduler;
459
460
 
460
461
/**
461
462
  Number of currently active user connections. The variable is protected by
1146
1147
  if (session)
1147
1148
  {
1148
1149
    statistic_increment(killed_threads, &LOCK_status);
1149
 
    thread_scheduler.end_thread(session,0);             /* purecov: inspected */
 
1150
    (void)thread_scheduler.end_thread(session, 0);              /* purecov: inspected */
1150
1151
  }
1151
1152
  return;;                              /* purecov: deadcode */
1152
1153
}
1875
1876
          happen if max_connections is decreased above).
1876
1877
        */
1877
1878
        table_cache_size= (uint32_t) cmin(cmax((files-10-max_connections)/2,
1878
 
                                          (uint32_t)TABLE_OPEN_CACHE_MIN),
1879
 
                                      table_cache_size);
 
1879
                                               (uint32_t)TABLE_OPEN_CACHE_MIN),
 
1880
                                          table_cache_size);
1880
1881
        if (global_system_variables.log_warnings)
1881
1882
              errmsg_printf(ERRMSG_LVL_WARN, _("Changed limits: max_open_files: %u  "
1882
 
                              "max_connections: %"PRIu64"  table_cache: %"PRIu64""),
 
1883
                                               "max_connections: %"PRIu64"  table_cache: %"PRIu64""),
1883
1884
                            files, max_connections, table_cache_size);
1884
1885
      }
1885
1886
      else if (global_system_variables.log_warnings)
2961
2962
  {"max_connections", OPT_MAX_CONNECTIONS,
2962
2963
   N_("The number of simultaneous clients allowed."),
2963
2964
   (char**) &max_connections,
2964
 
   (char**) &max_connections, 0, GET_ULONG, REQUIRED_ARG, 151, 1, 100000, 0, 1,
2965
 
   0},
 
2965
   (char**) &max_connections, 0, GET_ULONG, REQUIRED_ARG, 2048, 1, 100000, 0, 1, 0},
2966
2966
  {"max_error_count", OPT_MAX_ERROR_COUNT,
2967
2967
   N_("Max number of errors/warnings to store for a statement."),
2968
2968
   (char**) &global_system_variables.max_error_count,