My Project
key.h
00001 /* Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
00002 
00003    This program is free software; you can redistribute it and/or modify
00004    it under the terms of the GNU General Public License as published by
00005    the Free Software Foundation; version 2 of the License.
00006 
00007    This program is distributed in the hope that it will be useful,
00008    but WITHOUT ANY WARRANTY; without even the implied warranty of
00009    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010    GNU General Public License for more details.
00011 
00012    You should have received a copy of the GNU General Public License
00013    along with this program; if not, write to the Free Software
00014    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
00015 
00016 #ifndef KEY_INCLUDED
00017 #define KEY_INCLUDED
00018 
00019 #include "my_global.h"                          /* uchar */
00020 
00021 class Field;
00022 class String;
00023 struct TABLE;
00024 typedef struct st_bitmap MY_BITMAP;
00025 typedef struct st_key KEY;
00026 class KEY_PART_INFO;
00027 
00028 int find_ref_key(KEY *key, uint key_count, uchar *record, Field *field,
00029                  uint *key_length, uint *keypart);
00030 void key_copy(uchar *to_key, uchar *from_record, KEY *key_info, uint key_length);
00031 void key_restore(uchar *to_record, uchar *from_key, KEY *key_info,
00032                  uint key_length);
00033 bool key_cmp_if_same(TABLE *form,const uchar *key,uint index,uint key_length);
00034 void key_unpack(String *to, TABLE *table, KEY *key);
00035 void field_unpack(String *to, Field *field, const uchar *rec, uint max_length,
00036                   bool prefix_key);
00037 bool is_key_used(TABLE *table, uint idx, const MY_BITMAP *fields);
00038 int key_cmp(KEY_PART_INFO *key_part, const uchar *key, uint key_length);
00039 int key_cmp2(KEY_PART_INFO *key_part,
00040              const uchar *key1, uint key1_length,
00041              const uchar *key2, uint key2_length);
00042 extern "C" int key_rec_cmp(void *key_info, uchar *a, uchar *b);
00043 
00044 #endif /* KEY_INCLUDED */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines