summaryrefslogtreecommitdiff
path: root/heap
diff options
context:
space:
mode:
authorunknown <ramil@mysql.com>2005-03-15 13:32:12 +0400
committerunknown <ramil@mysql.com>2005-03-15 13:32:12 +0400
commit9c04a77e0c69728941387e88bd118adbc0374c45 (patch)
tree41e3f57ec9e5632602bbaf0aeb4a973e7c77dccb /heap
parent2427f3695ccd495eb33ce10c3fb3a636823e8850 (diff)
downloadmariadb-git-9c04a77e0c69728941387e88bd118adbc0374c45.tar.gz
A fix (bug #8489: Strange auto_increment behaviour with HEAP table).
heap/hp_create.c: A fix (bug #8489: Strange auto_increment behaviour with HEAP table). Handle autoincrement keys MyISAM-way. include/heap.h: A fix (bug #8489: Strange auto_increment behaviour with HEAP table). Handle autoincrement keys MyISAM-way. sql/ha_heap.cc: A fix (bug #8489: Strange auto_increment behaviour with HEAP table). Handle autoincrement keys MyISAM-way.
Diffstat (limited to 'heap')
-rw-r--r--heap/hp_create.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/heap/hp_create.c b/heap/hp_create.c
index af32fefea1b..b1b132a16fb 100644
--- a/heap/hp_create.c
+++ b/heap/hp_create.c
@@ -137,6 +137,8 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef,
keyinfo->write_key= hp_write_key;
keyinfo->hash_buckets= 0;
}
+ if ((keyinfo->flag & HA_AUTO_KEY) && create_info->with_auto_increment)
+ share->auto_key= i + 1;
}
share->min_records= min_records;
share->max_records= max_records;
@@ -147,7 +149,6 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef,
share->keys= keys;
share->max_key_length= max_length;
share->changed= 0;
- share->auto_key= create_info->auto_key;
share->auto_key_type= create_info->auto_key_type;
share->auto_increment= create_info->auto_increment;
/* Must be allocated separately for rename to work */