~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to include/myisam.h

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2000 MySQL AB
 
1
/*
 
2
   Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
2
3
 
3
4
   This program is free software; you can redistribute it and/or modify
4
5
   it under the terms of the GNU General Public License as published by
11
12
 
12
13
   You should have received a copy of the GNU General Public License
13
14
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 
16
*/
15
17
 
16
18
/* This file should be included when using myisam_funktions */
17
19
 
30
32
#ifndef _keycache_h
31
33
#include "keycache.h"
32
34
#endif
33
 
#include "my_handler.h"
34
35
#include <mysql/plugin.h>
 
36
#include "my_compare.h"
 
37
 
 
38
/*
 
39
  There is a hard limit for the maximum number of keys as there are only
 
40
  8 bits in the index file header for the number of keys in a table.
 
41
  This means that 0..255 keys can exist for a table. The idea of
 
42
  HA_MAX_POSSIBLE_KEY is to ensure that one can use myisamchk & tools on
 
43
  a MyISAM table for which one has more keys than MyISAM is normally
 
44
  compiled for. If you don't have this, you will get a core dump when
 
45
  running myisamchk compiled for 128 keys on a table with 255 keys.
 
46
*/
 
47
 
 
48
#define HA_MAX_POSSIBLE_KEY         255         /* For myisamchk */
 
49
/*
 
50
  The following defines can be increased if necessary.
 
51
  But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and HA_MAX_KEY_LENGTH.
 
52
*/
 
53
 
 
54
#define HA_MAX_KEY_LENGTH           1000        /* Max length in bytes */
 
55
#define HA_MAX_KEY_SEG              16          /* Max segments for key */
 
56
 
 
57
#define HA_MAX_POSSIBLE_KEY_BUFF    (HA_MAX_KEY_LENGTH + 24+ 6+6)
 
58
#define HA_MAX_KEY_BUFF  (HA_MAX_KEY_LENGTH+HA_MAX_KEY_SEG*6+8+8)
35
59
 
36
60
/*
37
61
  Limit max keys according to HA_MAX_POSSIBLE_KEY