/* Copyright (c) Monty Program Ab; 1991-2011 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; version 2 of the License. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifndef _my_handler_h #define _my_handler_h /* There is a hard limit for the maximum number of keys as there are only 8 bits in the index file header for the number of keys in a table. This means that 0..255 keys can exist for a table. The idea of HA_MAX_POSSIBLE_KEY is to ensure that one can use myisamchk & tools on a MyISAM table for which one has more keys than MyISAM is normally compiled for. If you don't have this, you will get a core dump when running myisamchk compiled for 128 keys on a table with 255 keys. */ #define HA_MAX_POSSIBLE_KEY 255 /* For myisamchk */ /* The following defines can be increased if necessary. But beware the dependency of HA_MAX_POSSIBLE_KEY_BUFF and HA_MAX_KEY_LENGTH. */ #define HA_MAX_KEY_LENGTH 1000 /* Max length in bytes */ #define HA_MAX_KEY_SEG 32 /* Max segments for key */ #define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24+ 6+6) #define HA_MAX_KEY_BUFF (HA_MAX_KEY_LENGTH+HA_MAX_KEY_SEG*6+8+8) #define HA_MAX_MSG_BUF 1024 /* used in CHECK TABLE, REPAIR TABLE */ /* Inside an in-memory data record, memory pointers to pieces of the record (like BLOBs) are stored in their native byte order and in this amount of bytes. */ #define portable_sizeof_char_ptr 8 /* Register / unregister errors for my_error() */ extern void my_handler_error_register(void); extern void my_handler_error_unregister(void); #endif /* _my_handler_h */