~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/qcache.cc

  • Committer: Brian Aker
  • Date: 2008-10-20 04:28:21 UTC
  • mto: (492.3.21 drizzle-clean-code)
  • mto: This revision was merged to the branch mainline in revision 530.
  • Revision ID: brian@tangent.org-20081020042821-rqqdrccuu8195k3y
Second pass of thd cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
 
71
71
/* The plugin_foreach() iterator requires that we
72
72
   convert all the parameters of a plugin api entry point
73
 
   into just one single void ptr, plus the thd.
 
73
   into just one single void ptr, plus the session.
74
74
   So we will take all the additional paramters of qcache_do1,
75
75
   and marshall them into a struct of this type, and
76
76
   then just pass in a pointer to it.
82
82
} qcache_do1_parms_t;
83
83
 
84
84
/* This gets called by plugin_foreach once for each loaded qcache plugin */
85
 
static bool qcache_do1_iterate (Session *thd, plugin_ref plugin, void *p)
 
85
static bool qcache_do1_iterate (Session *session, plugin_ref plugin, void *p)
86
86
{
87
87
  qcache_t *l= plugin_data(plugin, qcache_t *);
88
88
  qcache_do1_parms_t *parms= (qcache_do1_parms_t *) p;
90
90
  /* call this loaded qcache plugin's qcache_func1 function pointer */
91
91
  if (l && l->qcache_func1)
92
92
  {
93
 
    if (l->qcache_func1(thd, parms->parm1, parms->parm2))
 
93
    if (l->qcache_func1(session, parms->parm1, parms->parm2))
94
94
    {
95
95
      /* TRANSLATORS: The leading word "qcache" is the name
96
96
         of the plugin api, and so should not be translated. */
104
104
 
105
105
/* This is the qcache_do1 entry point.
106
106
   This gets called by the rest of the Drizzle server code */
107
 
bool qcache_do1 (Session *thd, void *parm1, void *parm2)
 
107
bool qcache_do1 (Session *session, void *parm1, void *parm2)
108
108
{
109
109
  qcache_do1_parms_t parms;
110
110
  bool foreach_rv;
115
115
 
116
116
  /* call qcache_do1_iterate
117
117
     once for each loaded qcache plugin */
118
 
  foreach_rv= plugin_foreach(thd,
 
118
  foreach_rv= plugin_foreach(session,
119
119
                             qcache_do1_iterate,
120
120
                             DRIZZLE_QCACHE_PLUGIN,
121
121
                             (void *) &parms);
124
124
 
125
125
/* The plugin_foreach() iterator requires that we
126
126
   convert all the parameters of a plugin api entry point
127
 
   into just one single void ptr, plus the thd.
 
127
   into just one single void ptr, plus the session.
128
128
   So we will take all the additional paramters of qcache_do2,
129
129
   and marshall them into a struct of this type, and
130
130
   then just pass in a pointer to it.
136
136
} qcache_do2_parms_t;
137
137
 
138
138
/* This gets called by plugin_foreach once for each loaded qcache plugin */
139
 
static bool qcache_do2_iterate (Session *thd, plugin_ref plugin, void *p)
 
139
static bool qcache_do2_iterate (Session *session, plugin_ref plugin, void *p)
140
140
{
141
141
  qcache_t *l= plugin_data(plugin, qcache_t *);
142
142
  qcache_do2_parms_t *parms= (qcache_do2_parms_t *) p;
144
144
  /* call this loaded qcache plugin's qcache_func1 function pointer */
145
145
  if (l && l->qcache_func1)
146
146
  {
147
 
    if (l->qcache_func2(thd, parms->parm3, parms->parm4))
 
147
    if (l->qcache_func2(session, parms->parm3, parms->parm4))
148
148
    {
149
149
      /* TRANSLATORS: The leading word "qcache" is the name
150
150
         of the plugin api, and so should not be translated. */
159
159
 
160
160
/* This is the qcache_do2 entry point.
161
161
   This gets called by the rest of the Drizzle server code */
162
 
bool qcache_do2 (Session *thd, void *parm3, void *parm4)
 
162
bool qcache_do2 (Session *session, void *parm3, void *parm4)
163
163
{
164
164
  qcache_do2_parms_t parms;
165
165
  bool foreach_rv;
170
170
 
171
171
  /* call qcache_do2_iterate
172
172
     once for each loaded qcache plugin */
173
 
  foreach_rv= plugin_foreach(thd,
 
173
  foreach_rv= plugin_foreach(session,
174
174
                             qcache_do2_iterate,
175
175
                             DRIZZLE_QCACHE_PLUGIN,
176
176
                             (void *) &parms);