summaryrefslogtreecommitdiff
path: root/myisam/mi_search.c
diff options
context:
space:
mode:
authoringo@mysql.com <>2005-07-19 14:13:56 +0200
committeringo@mysql.com <>2005-07-19 14:13:56 +0200
commitec15dda2bfa246d71a257da2d25c3d398b4d4cc4 (patch)
tree003d6387fee9d1df4a7d4fbe316c3c68765105d4 /myisam/mi_search.c
parentd1bc1b7c0e317f73e309697f8e7baebb77b4ca59 (diff)
downloadmariadb-git-ec15dda2bfa246d71a257da2d25c3d398b4d4cc4.tar.gz
Bug#10932 - Building server with key limit of 128, makes test cases fail
This patch allows to configure MyISAM for 128 indexes per table. The main problem is the key_map, wich is implemented as an ulonglong. To get rid of the limit and keep the efficient and flexible implementation, the highest bit is now used for all upper keys. This means that the lower keys can be disabled and enabled individually as usual and the high keys can only be disabled and enabled as a block. That way the existing test suite is still applicable, while more keys work, though slightly less efficient. To really get more than 64 keys, some defines need to be changed. Another patch will address this.
Diffstat (limited to 'myisam/mi_search.c')
-rw-r--r--myisam/mi_search.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/myisam/mi_search.c b/myisam/mi_search.c
index c669a8be8f8..ed61bbfe41a 100644
--- a/myisam/mi_search.c
+++ b/myisam/mi_search.c
@@ -29,7 +29,7 @@ int _mi_check_index(MI_INFO *info, int inx)
{
if (inx == -1) /* Use last index */
inx=info->lastinx;
- if (inx < 0 || ! (((ulonglong) 1 << inx) & info->s->state.key_map))
+ if (inx < 0 || ! mi_is_key_active(info->s->state.key_map, inx))
{
my_errno=HA_ERR_WRONG_INDEX;
return -1;