~clint-fewbar/ubuntu/natty/drizzle/beta1-fixes

« back to all changes in this revision

Viewing changes to plugin/pbxt/src/discover_xt.h

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2011-03-15 10:41:18 UTC
  • mfrom: (1.2.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20110315104118-eaf0hvlytjdl4zrf
Tags: 2011.03.13-0ubuntu1
* New upstream release.
* Added slave plugin.
* Removed archive, blackhole and blitzdb plugins.
* Moved location of libdrizzle headers.
* Removed drizzleadmin manpage patch.
* Add drizzle_safe_write_string to symbols.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2008 PrimeBase Technologies GmbH, Germany
2
 
 *
3
 
 * PrimeBase XT
4
 
 *
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.
9
 
 *
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.
14
 
 *
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
18
 
 *
19
 
 *  Created by Leslie on 8/27/08.
20
 
 *
21
 
 */
22
 
 
23
 
#ifndef __DISCOVER_XT_H__
24
 
#define __DISCOVER_XT_H__
25
 
 
26
 
#ifdef DRIZZLED
27
 
#include <drizzled/common.h>
28
 
using namespace drizzled;
29
 
#else
30
 
#include "mysql_priv.h"
31
 
#endif
32
 
 
33
 
/*
34
 
 * ---------------------------------------------------------------
35
 
 * TABLE DISCOVERY HANDLER
36
 
 */
37
 
 
38
 
typedef struct dt_field_info {
39
 
        /** 
40
 
        This is used as column name. 
41
 
        */
42
 
        const char* field_name;
43
 
        /**
44
 
        For string-type columns, this is the maximum number of
45
 
        characters. For numeric data this can be NULL.
46
 
        */
47
 
        uint field_length;
48
 
 
49
 
        /**
50
 
        For decimal  columns, this is the maximum number of
51
 
        digits after the decimal. For other data this can be NULL.
52
 
        */
53
 
        char* field_decimal_length;
54
 
        /**
55
 
        This denotes data type for the column. For the most part, there seems to
56
 
        be one entry in the enum for each SQL data type, although there seem to
57
 
        be a number of additional entries in the enum.
58
 
        */
59
 
        enum enum_field_types field_type;
60
 
 
61
 
        /**
62
 
        This is the charater set for non numeric data types including blob data.
63
 
        */
64
 
        CHARSET_INFO *field_charset;
65
 
 
66
 
        uint field_flags;        // Field atributes(maybe_null, signed, unsigned etc.)
67
 
        const char* comment;
68
 
} DT_FIELD_INFO;
69
 
 
70
 
typedef struct dt_key_info
71
 
{
72
 
        const char*     key_name;
73
 
        uint            key_type; /* PRI_KEY_FLAG, UNIQUE_KEY_FLAG, MULTIPLE_KEY_FLAG */
74
 
        const char*     key_columns[8]; // The size of this can be set to what ever you need.
75
 
} DT_KEY_INFO;
76
 
 
77
 
int xt_create_table_frm(handlerton *hton, THD* thd, const char *db, const char *name, DT_FIELD_INFO *info, DT_KEY_INFO *keys, xtBool skip_existing);
78
 
 
79
 
#endif
80