~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/data_engine/status.h

VariablesĀ support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
  virtual drizzle_show_var *getVariables()= 0;
34
34
 
 
35
  virtual bool isVariables()
 
36
  {
 
37
    return false;
 
38
  }
 
39
 
35
40
  class Generator : public Tool::Generator 
36
41
  {
37
42
    bool scope;
38
43
    drizzle_show_var *variables;
39
44
    system_status_var status;
 
45
    system_status_var *status_ptr;
40
46
 
41
47
    void fill(const char *name, char *value, SHOW_TYPE show_type);
 
48
 
42
49
    system_status_var *getStatus()
43
50
    {
44
 
      Session *session= current_session;
45
 
      return scope ? &status :  &session->status_var;
 
51
      return status_ptr;
46
52
    }
47
53
 
48
 
 
49
54
  public:
50
 
    Generator(Field **arg, bool scope_arg, drizzle_show_var *);
 
55
    Generator(Field **arg, bool scope_arg,
 
56
              drizzle_show_var *show_arg,
 
57
              bool is_variables);
51
58
    ~Generator();
52
59
 
53
60
    bool populate();
56
63
 
57
64
  Generator *generator(Field **arg)
58
65
  {
59
 
    return new Generator(arg, scope, getVariables());
 
66
    return new Generator(arg, scope, getVariables(), isVariables());
60
67
  }
61
68
};
62
69
 
113
120
  {
114
121
    return getCommandStatusVars();
115
122
  }
 
123
 
 
124
  system_status_var *getStatus()
 
125
  {
 
126
    Session *session= current_session;
 
127
    return &session->status_var;
 
128
  }
116
129
};
117
130
 
118
131
#endif // PLUGIN_DATA_ENGINE_STATUS_H