~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/schema_dictionary/tables.cc

  • Committer: Olaf van der Spek
  • Date: 2011-03-28 14:32:36 UTC
  • mto: (2257.1.1 build) (2276.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2258.
  • Revision ID: olafvdspek@gmail.com-20110328143236-4ge1d793iqaktfq0
Common fwd

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include "config.h"
22
 
#include "plugin/schema_dictionary/dictionary.h"
23
 
#include "drizzled/identifier.h"
 
21
#include <config.h>
 
22
#include <plugin/schema_dictionary/dictionary.h>
 
23
#include <drizzled/identifier.h>
24
24
 
25
25
using namespace std;
26
26
using namespace drizzled;
58
58
  add_field("AUTO_INCREMENT", plugin::TableFunction::NUMBER, 0, false);
59
59
  add_field("TABLE_UUID", plugin::TableFunction::STRING, 36, true);
60
60
  add_field("TABLE_VERSION", plugin::TableFunction::NUMBER, 0, true);
 
61
  add_field("IS_REPLICATED", plugin::TableFunction::BOOLEAN, 0, false);
61
62
}
62
63
 
63
64
TablesTool::Generator::Generator(Field **arg) :
103
104
  push(getTableMessage().name());
104
105
 
105
106
  /* TABLE_TYPE */
106
 
  if (drizzled::TableIdentifier::isView(getTableMessage().type()))
 
107
  if (drizzled::identifier::Table::isView(getTableMessage().type()))
107
108
  {
108
109
    push("VIEW");
109
110
  }
133
134
  }
134
135
 
135
136
  /* ENGINE */
136
 
  push(getTableMessage().engine().name());
 
137
  const drizzled::message::Engine &engine= getTableMessage().engine();
 
138
  push(engine.name());
137
139
 
138
140
  /* ROW_FORMAT */
139
 
  push("DEFAULT");
 
141
  bool row_format_sent= false;
 
142
  for (ssize_t it= 0; it < engine.options_size(); it++)
 
143
  {
 
144
    const drizzled::message::Engine::Option &opt= engine.options(it);
 
145
    if (opt.name().compare("ROW_FORMAT") == 0)
 
146
    {
 
147
      row_format_sent= true;
 
148
      push(opt.state());
 
149
      break;
 
150
    }
 
151
  }
 
152
 
 
153
  if (not row_format_sent)
 
154
    push("DEFAULT");
140
155
 
141
156
  /* TABLE_COLLATION */
142
157
  push(getTableMessage().options().collation());
174
189
 
175
190
  /* TABLE_VERSION */
176
191
  push(getTableMessage().version());
 
192
 
 
193
  /* IS_REPLICATED */
 
194
  push(message::is_replicated(getTableMessage()));
177
195
}