1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2009 Sun Microsystems
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
* Contains methods for creating the various columns for
27
#include <drizzled/server_includes.h>
28
#include <drizzled/session.h>
29
#include <drizzled/show.h>
31
#include "info_schema_columns.h"
33
#define LIST_PROCESS_HOST_LEN 64
37
void createProcessListColumns(vector<const ColumnInfo *>& cols)
39
const ColumnInfo *id_col= new ColumnInfo("ID",
41
DRIZZLE_TYPE_LONGLONG,
46
const ColumnInfo *user_col= new ColumnInfo("USER",
53
const ColumnInfo *host_col= new ColumnInfo("HOST",
54
LIST_PROCESS_HOST_LEN,
60
const ColumnInfo *db_col= new ColumnInfo("DB",
67
const ColumnInfo *command_col= new ColumnInfo("COMMAND",
74
const ColumnInfo *time_col= new ColumnInfo("TIME",
76
DRIZZLE_TYPE_LONGLONG,
81
const ColumnInfo *state_col= new ColumnInfo("STATE",
88
const ColumnInfo *info_col= new ColumnInfo("INFO",
89
PROCESS_LIST_INFO_WIDTH,
96
cols.push_back(id_col);
97
cols.push_back(user_col);
98
cols.push_back(host_col);
99
cols.push_back(db_col);
100
cols.push_back(command_col);
101
cols.push_back(time_col);
102
cols.push_back(state_col);
103
cols.push_back(info_col);
106
void clearColumns(vector<const ColumnInfo *>& cols)
108
vector<const ColumnInfo *>::iterator iter= cols.begin();
110
while (iter != cols.end())