summaryrefslogtreecommitdiff
path: root/storage/maria/ha_maria.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-03-01 14:22:22 -0800
committerIgor Babaev <igor@askmonty.org>2012-03-01 14:22:22 -0800
commit8b469eb5151cb1b7da00cee3a7b42c10bd7ff51e (patch)
treea2dd09bd1fd3ba15b098eebf8b581bef7664b212 /storage/maria/ha_maria.cc
parent29b0b0b5de46c6950b8b53314c74f6f458ba1a98 (diff)
parent000deedf3b708681951af6a0629af89c1f5ee85a (diff)
downloadmariadb-git-8b469eb5151cb1b7da00cee3a7b42c10bd7ff51e.tar.gz
Merge 5.3->5.5.
Diffstat (limited to 'storage/maria/ha_maria.cc')
-rw-r--r--storage/maria/ha_maria.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index 585fe4a0492..7205a1042ef 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -1017,8 +1017,11 @@ double ha_maria::scan_time()
splitting algorithms depends on this. (With only one key on a page
we also can't use any compression, which may make the index file much
larger)
- We use HA_MAX_KEY_BUFF as this is a stack restriction imposed by the
- handler interface.
+ We use HA_MAX_KEY_LENGTH as this is a stack restriction imposed by the
+ handler interface. If we want to increase this, we have also to
+ increase HA_MARIA_KEY_BUFF and MARIA_MAX_KEY_BUFF as the buffer needs
+ to take be able to store the extra lenght bytes that is part of the stored
+ key.
We also need to reserve place for a record pointer (8) and 3 bytes
per key segment to store the length of the segment + possible null bytes.
@@ -3022,7 +3025,7 @@ void ha_maria::get_auto_increment(ulonglong offset, ulonglong increment,
{
ulonglong nr;
int error;
- uchar key[HA_MAX_KEY_LENGTH];
+ uchar key[MARIA_MAX_KEY_BUFF];
if (!table->s->next_number_key_offset)
{ // Autoincrement at key-start