~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-07-04 19:11:47 UTC
  • mto: This revision was merged to the branch mainline in revision 2367.
  • Revision ID: olafvdspek@gmail.com-20110704191147-s99ojek811zi1fzj
RemoveĀ unusedĀ Name_resolution_context::error_reporter

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
#include <drizzled/table_proto.h>
24
25
 
25
26
using namespace std;
26
27
using namespace drizzled;
45
46
TablesTool::TablesTool() :
46
47
  plugin::TableFunction("DATA_DICTIONARY", "TABLES")
47
48
{
48
 
  add_field("TABLE_SCHEMA");
49
 
  add_field("TABLE_NAME");
 
49
  add_field("TABLE_SCHEMA", plugin::TableFunction::STRING, MAXIMUM_IDENTIFIER_LENGTH, false);
 
50
  add_field("TABLE_NAME", plugin::TableFunction::STRING, MAXIMUM_IDENTIFIER_LENGTH, false);
50
51
  add_field("TABLE_TYPE");
51
52
  add_field("TABLE_ARCHETYPE");
52
53
  add_field("ENGINE");
54
55
  add_field("TABLE_COLLATION");
55
56
  add_field("TABLE_CREATION_TIME");
56
57
  add_field("TABLE_UPDATE_TIME");
57
 
  add_field("TABLE_COMMENT", plugin::TableFunction::STRING, 2048, true);
 
58
  add_field("TABLE_COMMENT", plugin::TableFunction::STRING,
 
59
            TABLE_COMMENT_MAXLEN, true);
58
60
  add_field("AUTO_INCREMENT", plugin::TableFunction::NUMBER, 0, false);
59
61
  add_field("TABLE_UUID", plugin::TableFunction::STRING, 36, true);
60
62
  add_field("TABLE_VERSION", plugin::TableFunction::NUMBER, 0, true);
 
63
  add_field("IS_REPLICATED", plugin::TableFunction::BOOLEAN, 0, false);
 
64
  add_field("TABLE_DEFINER", plugin::TableFunction::STRING, 64, true);
61
65
}
62
66
 
63
67
TablesTool::Generator::Generator(Field **arg) :
188
192
 
189
193
  /* TABLE_VERSION */
190
194
  push(getTableMessage().version());
 
195
 
 
196
  /* IS_REPLICATED */
 
197
  push(message::is_replicated(getTableMessage()));
 
198
 
 
199
  /* _DEFINER */
 
200
  if (message::has_definer(getTableMessage()))
 
201
  {
 
202
    push(message::definer(getTableMessage()));
 
203
  }
 
204
  else
 
205
  {
 
206
    push();
 
207
  }
191
208
}