~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/info_schema/info_schema_columns.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-06-27 16:33:55 UTC
  • mfrom: (1067.3.1 full-i-s-plugin)
  • mto: This revision was merged to the branch mainline in revision 1079.
  • Revision ID: osullivan.padraig@gmail.com-20090627163355-iyclbhr9901qlmjh
Extracted the CHARACTER_SET table into the I_S plugin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
using namespace std;
36
36
 
 
37
void createCharSetColumns(vector<const ColumnInfo *>& cols)
 
38
{
 
39
  /*
 
40
   * Create each column for the CHARACTER_SET table.
 
41
   */
 
42
  const ColumnInfo *name_col= new ColumnInfo("CHARACTER_SET_NAME",
 
43
                                             64,
 
44
                                             DRIZZLE_TYPE_VARCHAR,
 
45
                                             0,
 
46
                                             0,
 
47
                                             "Charset",
 
48
                                             SKIP_OPEN_TABLE);
 
49
  const ColumnInfo *collate_col= new ColumnInfo("DEFAULT_COLLATE_NAME",
 
50
                                                64,
 
51
                                                DRIZZLE_TYPE_VARCHAR,
 
52
                                                0,
 
53
                                                0,
 
54
                                                "Default collation",
 
55
                                                SKIP_OPEN_TABLE);
 
56
  const ColumnInfo *descrip_col= new ColumnInfo("DESCRIPTION",
 
57
                                                60,
 
58
                                                DRIZZLE_TYPE_VARCHAR,
 
59
                                                0,
 
60
                                                0,
 
61
                                                "Description",
 
62
                                                SKIP_OPEN_TABLE);
 
63
  const ColumnInfo *len_col= new ColumnInfo("MAXLEN",
 
64
                                            3,
 
65
                                            DRIZZLE_TYPE_LONGLONG,
 
66
                                            0,
 
67
                                            0,
 
68
                                            "Maxlen",
 
69
                                            SKIP_OPEN_TABLE);
 
70
 
 
71
  /*
 
72
   * Add the columns to the vector.
 
73
   */
 
74
  cols.push_back(name_col);
 
75
  cols.push_back(collate_col);
 
76
  cols.push_back(descrip_col);
 
77
  cols.push_back(len_col);
 
78
}
 
79
 
37
80
void createProcessListColumns(vector<const ColumnInfo *>& cols)
38
81
{
39
82
  /*