1
/* Copyright (C) 2008 PrimeBase Technologies GmbH, Germany
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
* Created by Leslie on 8/27/08.
24
#ifndef __DISCOVER_MS_H__
25
#define __DISCOVER_MS_H__
26
#include "cslib/CSConfig.h"
28
#define UTF8_CHARSET my_charset_utf8_general_ci
31
* ---------------------------------------------------------------
32
* TABLE DISCOVERY HANDLER
36
typedef struct dt_field_info
39
This is used as column name.
41
const char* field_name;
43
For string-type columns, this is the maximum number of
44
characters. For numeric data this can be NULL.
49
For decimal columns, this is the maximum number of
50
digits after the decimal. For other data this can be NULL.
52
char* field_decimal_length;
54
This denotes data type for the column. For the most part, there seems to
55
be one entry in the enum for each SQL data type, although there seem to
56
be a number of additional entries in the enum.
59
enum drizzled::enum_field_types field_type;
61
enum enum_field_types field_type;
65
This is the charater set for non numeric data types including blob data.
68
const drizzled::charset_info_st *field_charset;
70
CHARSET_INFO *field_charset;
72
uint field_flags; // Field atributes(maybe_null, signed, unsigned etc.)
76
typedef struct dt_key_info
79
uint key_type; /* PRI_KEY_FLAG, UNIQUE_KEY_FLAG, MULTIPLE_KEY_FLAG */
80
const char* key_columns[8]; // The size of this can be set to what ever you need.
83
typedef struct internal_table_info {
88
} INTERRNAL_TABLE_INFO;
92
int ms_create_table_frm(handlerton *hton, THD* thd, const char *db, const char *name, DT_FIELD_INFO *info, DT_KEY_INFO *keys, uchar **frmblob, size_t *frmlen);