drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
key_info.h
1/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3 *
4 * Copyright (C) 2008 Sun Microsystems, Inc.
5 *
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.
10 *
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.
15 *
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
19 */
20
21#pragma once
22
23#include <drizzled/base.h>
25#include <drizzled/lex_string.h>
26#include <drizzled/thr_lock.h>
27#include <drizzled/message/table.pb.h>
28
29namespace drizzled {
30
31class KeyPartInfo;
32
34{
35public:
36 unsigned int key_length; /* Tot length of key */
37 drizzled::message::Table::Index::IndexType algorithm;
38 unsigned long flags; /* dupp key and pack flags */
39 unsigned int key_parts; /* How many key_parts */
40 uint32_t extra_length;
41 unsigned int usable_key_parts; /* Should normally be = key_parts */
42 uint32_t block_size;
43 KeyPartInfo *key_part;
44 const char* name; /* Name of key */
45 /*
46 Array of AVG(#records with the same field value) for 1st ... Nth key part.
47 0 means 'not known'.
48 For temporary heap tables this member is NULL.
49 */
50 ulong *rec_per_key;
51 Table *table;
52 str_ref comment;
53};
54
55} /* namespace drizzled */
TODO: Rename this file - func.h is stupid.