~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/single_thread/single_thread.cc

  • Committer: Brian Aker
  • Date: 2009-02-10 00:14:40 UTC
  • Revision ID: brian@tangent.org-20090210001440-qjg8eofh3h93064b
Adding Multi-threaded Scheduler into the system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include <string>
26
26
using namespace std;
27
27
 
28
 
static bool isEnabled= false;
29
28
static bool init_new_connection_thread(void) {return 0;}
30
29
 
31
30
/*
63
62
{
64
63
  scheduling_st* func= (scheduling_st *)p;
65
64
 
66
 
  if (isEnabled == false)
67
 
  {
68
 
    func->is_used= false;
69
 
    return 0;
70
 
  }
71
 
  func->is_used= true;
72
 
 
73
65
  func->max_threads= 1;
74
66
  func->add_connection= add_connection;
75
67
  func->init_new_connection_thread= init_new_connection_thread;
83
75
  return 0;
84
76
}
85
77
 
86
 
static DRIZZLE_SYSVAR_BOOL(enabled, isEnabled,
87
 
                           PLUGIN_VAR_NOCMDARG,
88
 
                           N_("Enable One Thread per Connection Scheduler"),
89
 
                           NULL, /* check func */
90
 
                           NULL, /* update func */
91
 
                           false /* default */);
92
 
 
93
78
static struct st_mysql_sys_var* system_variables[]= {
94
 
  DRIZZLE_SYSVAR(enabled),
95
79
  NULL
96
80
};
97
81