~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/qcache.cc

  • Committer: Mark Atwood
  • Date: 2008-10-16 16:57:55 UTC
  • mto: (520.1.13 drizzle)
  • mto: This revision was merged to the branch mainline in revision 530.
  • Revision ID: mark@fallenpegasus.com-20081016165755-3ax67kls4oftuq34
fix mistakes

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
   So we will take all the additional paramters of qcache_do1,
52
52
   and marshall them into a struct of this type, and
53
53
   then just pass in a pointer to it.
54
 
 */
 
54
*/
55
55
typedef struct qcache_do1_parms_st
56
56
{
57
57
  void *parm1;
70
70
    if (l->qcache_func1(thd, parms->parm1, parms->parm2))
71
71
    {
72
72
      sql_print_error("Qcache plugin '%s' do1() failed",
73
 
                      plugin->name.str);
 
73
                      (char *)plugin_name(plugin));
74
74
 
75
75
      return true;
 
76
    }
76
77
  }
77
78
  return false;
78
79
}
79
80
 
80
81
/* This is the qcache_do1 entry point.
81
82
   This gets called by the rest of the Drizzle server code */
82
 
bool qcache_do1 (THD *thd, void *parm1, void *parm2)
83
 
{
84
 
  qcache_do1_parms_t parms;
85
 
  bool foreach_rv;
86
 
 
87
 
  /* marshall the parameters so they will fit into the foreach */
88
 
  parms.parm1= parm1;
89
 
  parms.parm2= parm2;
90
 
 
91
 
  /* call qcache_do1_iterate
92
 
     once for each loaded qcache plugin */
93
 
  foreach_rv= plugin_foreach(thd,
94
 
                             qcache_do1_iterate,
95
 
                             DRIZZLE_QCACHE_PLUGIN,
96
 
                             (void *) &parms));
 
83
  bool qcache_do1 (THD *thd, void *parm1, void *parm2)
 
84
  {
 
85
    qcache_do1_parms_t parms;
 
86
    bool foreach_rv;
 
87
 
 
88
    /* marshall the parameters so they will fit into the foreach */
 
89
    parms.parm1= parm1;
 
90
    parms.parm2= parm2;
 
91
 
 
92
    /* call qcache_do1_iterate
 
93
       once for each loaded qcache plugin */
 
94
    foreach_rv= plugin_foreach(thd,
 
95
                               qcache_do1_iterate,
 
96
                               DRIZZLE_QCACHE_PLUGIN,
 
97
                               (void *) &parms);
97
98
  return foreach_rv;
98
99
}
99
100
 
103
104
   So we will take all the additional paramters of qcache_do2,
104
105
   and marshall them into a struct of this type, and
105
106
   then just pass in a pointer to it.
106
 
 */
 
107
*/
107
108
typedef struct qcache_do2_parms_st
108
109
{
109
110
  void *parm3;
122
123
    if (l->qcache_func1(thd, parms->parm3, parms->parm4))
123
124
    {
124
125
      sql_print_error("Qcache plugin '%s' do2() failed",
125
 
                      plugin->name.str);
 
126
                      (char *)plugin_name(plugin));
126
127
 
127
128
      return true;
 
129
    }
128
130
  }
129
131
  return false;
130
132
}
131
133
 
132
134
/* This is the qcache_do2 entry point.
133
135
   This gets called by the rest of the Drizzle server code */
134
 
bool qcache_do2 (THD *thd, void *parm3, void *parm4)
135
 
{
136
 
  qcache_do2_parms_t parms;
137
 
  bool foreach_rv;
138
 
 
139
 
  /* marshall the parameters so they will fit into the foreach */
140
 
  parms.parm3= parm3;
141
 
  parms.parm4= parm4;
142
 
 
143
 
  /* call qcache_do2_iterate
144
 
     once for each loaded qcache plugin */
145
 
  foreach_rv= plugin_foreach(thd,
146
 
                             qcache_do2_iterate,
147
 
                             DRIZZLE_QCACHE_PLUGIN,
148
 
                             (void *) &parms));
 
136
  bool qcache_do2 (THD *thd, void *parm3, void *parm4)
 
137
  {
 
138
    qcache_do2_parms_t parms;
 
139
    bool foreach_rv;
 
140
 
 
141
    /* marshall the parameters so they will fit into the foreach */
 
142
    parms.parm3= parm3;
 
143
    parms.parm4= parm4;
 
144
 
 
145
    /* call qcache_do2_iterate
 
146
       once for each loaded qcache plugin */
 
147
    foreach_rv= plugin_foreach(thd,
 
148
                               qcache_do2_iterate,
 
149
                               DRIZZLE_QCACHE_PLUGIN,
 
150
                               (void *) &parms);
149
151
  return foreach_rv;
150
152
}