1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems, Inc.
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; version 2 of the License.
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
22
#include <drizzled/field/varstring.h>
23
#include <drizzled/session.h>
24
#include <drizzled/stored_key.h>
29
StoredKey::StoredKey(Session *session,
38
if (field_arg->type() == DRIZZLE_TYPE_BLOB)
41
Key segments are always packed with a 2 byte length prefix.
42
See mi_rkey for details.
44
to_field= new Field_varstring(ptr,
49
field_arg->field_name,
50
field_arg->charset());
51
to_field->init(field_arg->getTable());
55
to_field= field_arg->new_key_field(session->mem_root, field_arg->getTable(),
59
to_field->setWriteSet();
62
StoredKey::store_key_result StoredKey::copy()
64
store_key_result result;
65
Session *session= to_field->getTable()->in_use;
66
enum_check_fields saved_count_cuted_fields= session->count_cuted_fields;
67
session->count_cuted_fields= CHECK_FIELD_IGNORE;
69
session->count_cuted_fields= saved_count_cuted_fields;
74
} /* namespace drizzled */