~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/schema_dictionary/indexes.cc

add test for bug600088: multibyte comments not shown correctly in SHOW CREATE TABLE 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2010 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2010 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
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>
 
21
#include "config.h"
 
22
#include "plugin/schema_dictionary/dictionary.h"
23
23
 
24
24
using namespace std;
25
25
using namespace drizzled;
30
30
  add_field("TABLE_SCHEMA");
31
31
  add_field("TABLE_NAME");
32
32
  add_field("INDEX_NAME");
33
 
  add_field("IS_USED_IN_PRIMARY", plugin::TableFunction::BOOLEAN, 0, false);
34
 
  add_field("IS_UNIQUE", plugin::TableFunction::BOOLEAN, 0, false);
35
 
  add_field("IS_NULLABLE", plugin::TableFunction::BOOLEAN, 0, false);
36
 
  add_field("KEY_LENGTH", plugin::TableFunction::NUMBER, 0, false);
 
33
  add_field("IS_USED_IN_PRIMARY", plugin::TableFunction::BOOLEAN);
 
34
  add_field("IS_UNIQUE", plugin::TableFunction::BOOLEAN);
 
35
  add_field("IS_NULLABLE", plugin::TableFunction::BOOLEAN);
 
36
  add_field("KEY_LENGTH", plugin::TableFunction::NUMBER);
37
37
  add_field("INDEX_TYPE");
38
38
  add_field("INDEX_COMMENT", plugin::TableFunction::STRING, 1024, true);
39
39
}
142
142
      length= sizeof("FULLTEXT");
143
143
      break;
144
144
    }
145
 
    /* Subtract 1 here, because sizeof gives us the wrong amount */
146
 
    push(str, length - 1);
 
145
    push(str, length);
147
146
  }
148
147
 
149
148
 /* "INDEX_COMMENT" */