summaryrefslogtreecommitdiff
path: root/include/myisam.h
diff options
context:
space:
mode:
authorKent Boortz <kent.boortz@oracle.com>2011-07-03 17:47:37 +0200
committerKent Boortz <kent.boortz@oracle.com>2011-07-03 17:47:37 +0200
commit027b5f1ed4f0130bbbc174eb45162a402c65f43f (patch)
tree448d397ed328f719a29a8fbbd54df8d943ed7274 /include/myisam.h
parent68f00a56868c5ca21b2d51598e1a43969ecf4896 (diff)
parentdd4957965411c1b67ebfb1ba8650a3090d305f63 (diff)
downloadmariadb-git-027b5f1ed4f0130bbbc174eb45162a402c65f43f.tar.gz
Updated/added copyright headers
Diffstat (limited to 'include/myisam.h')
-rw-r--r--include/myisam.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/include/myisam.h b/include/myisam.h
index 459943d89ae..92e6699896a 100644
--- a/include/myisam.h
+++ b/include/myisam.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -32,8 +32,30 @@ extern "C" {
#ifndef _keycache_h
#include "keycache.h"
#endif
-#include "my_handler.h"
#include <mysql/plugin.h>
+#include "my_compare.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 MI_MAX_POSSIBLE_KEY_BUFF and HA_MAX_KEY_LENGTH.
+*/
+
+#define HA_MAX_KEY_LENGTH 1000 /* Max length in bytes */
+#define HA_MAX_KEY_SEG 16 /* 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)
/*
Limit max keys according to HA_MAX_POSSIBLE_KEY