~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/info_schema/info_schema.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-06-29 16:05:47 UTC
  • mto: This revision was merged to the branch mainline in revision 1081.
  • Revision ID: osullivan.padraig@gmail.com-20090629160547-0c2ktadq91vx6id0
Extracted the PLUGINS table into the I_S plugin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
static vector<const ColumnInfo *> collation_columns;
40
40
static vector<const ColumnInfo *> coll_char_columns;
41
41
static vector<const ColumnInfo *> key_col_usage_columns;
 
42
static vector<const ColumnInfo *> plugin_columns;
42
43
static vector<const ColumnInfo *> processlist_columns;
43
44
static vector<const ColumnInfo *> ref_constraint_columns;
44
45
static vector<const ColumnInfo *> tab_constraints_columns;
50
51
static InfoSchemaMethods *collation_methods= NULL;
51
52
static InfoSchemaMethods *coll_char_methods= NULL;
52
53
static InfoSchemaMethods *key_col_usage_methods= NULL;
 
54
static InfoSchemaMethods *plugins_methods= NULL;
53
55
static InfoSchemaMethods *processlist_methods= NULL;
54
56
static InfoSchemaMethods *ref_constraint_methods= NULL;
55
57
static InfoSchemaMethods *tab_constraints_methods= NULL;
61
63
static InfoSchemaTable *collation_table= NULL;
62
64
static InfoSchemaTable *coll_char_set_table= NULL;
63
65
static InfoSchemaTable *key_col_usage_table= NULL;
 
66
static InfoSchemaTable *plugins_table= NULL;
64
67
static InfoSchemaTable *processlist_table= NULL;
65
68
static InfoSchemaTable *ref_constraint_table= NULL;
66
69
static InfoSchemaTable *tab_constraints_table= NULL;
94
97
    return true;
95
98
  }
96
99
 
 
100
  if ((retval= createPluginsColumns(plugin_columns)) == true)
 
101
  {
 
102
    return true;
 
103
  }
 
104
 
97
105
  if ((retval= createProcessListColumns(processlist_columns)) == true)
98
106
  {
99
107
    return true;
121
129
  clearColumns(collation_columns);
122
130
  clearColumns(coll_char_columns);
123
131
  clearColumns(key_col_usage_columns);
 
132
  clearColumns(plugin_columns);
124
133
  clearColumns(processlist_columns);
125
134
  clearColumns(ref_constraint_columns);
126
135
  clearColumns(tab_constraints_columns);
153
162
    return true;
154
163
  }
155
164
 
 
165
  if ((plugins_methods= new(std::nothrow) PluginsISMethods()) == NULL)
 
166
  {
 
167
    return true;
 
168
  }
 
169
 
156
170
  if ((processlist_methods= new(std::nothrow) ProcessListISMethods()) == NULL)
157
171
  {
158
172
    return true;
180
194
  delete collation_methods;
181
195
  delete coll_char_methods;
182
196
  delete key_col_usage_methods;
 
197
  delete plugins_methods;
183
198
  delete processlist_methods;
184
199
  delete ref_constraint_methods;
185
200
  delete tab_constraints_methods;
230
245
    return true;
231
246
  }
232
247
 
 
248
  plugins_table= new(std::nothrow) InfoSchemaTable("PLUGINS",
 
249
                                                   plugin_columns,
 
250
                                                   -1, -1, false, false, 0,
 
251
                                                   plugins_methods);
 
252
  if (plugins_table == NULL)
 
253
  {
 
254
    return true;
 
255
  }
 
256
 
233
257
  processlist_table= new(std::nothrow) InfoSchemaTable("PROCESSLIST",
234
258
                                                       processlist_columns,
235
259
                                                       -1, -1, false, false, 0,
271
295
  delete collation_table;
272
296
  delete coll_char_set_table;
273
297
  delete key_col_usage_table;
 
298
  delete plugins_table;
274
299
  delete processlist_table;
275
300
  delete ref_constraint_table;
276
301
  delete tab_constraints_table;
305
330
  registry.add(collation_table);
306
331
  registry.add(coll_char_set_table);
307
332
  registry.add(key_col_usage_table);
 
333
  registry.add(plugins_table);
308
334
  registry.add(processlist_table);
309
335
  registry.add(ref_constraint_table);
310
336
  registry.add(tab_constraints_table);
324
350
  registry.remove(collation_table);
325
351
  registry.remove(coll_char_set_table);
326
352
  registry.remove(key_col_usage_table);
 
353
  registry.remove(plugins_table);
327
354
  registry.remove(processlist_table);
328
355
  registry.remove(ref_constraint_table);
329
356
  registry.remove(tab_constraints_table);