summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2003-03-02 01:52:02 +0100
committerunknown <serg@serg.mysql.com>2003-03-02 01:52:02 +0100
commita2cc82182bbebb24a75e2d54d5361b3932416b9c (patch)
tree6a0432183b17998d8ffb6c0db7fe2ae56db83cca /myisam
parent14ea63cd1bfb3b2ebc95bd93d2b6373689e45604 (diff)
parent6a933b2e08037a4fb17ea98abf00d0990cef22ae (diff)
downloadmariadb-git-a2cc82182bbebb24a75e2d54d5361b3932416b9c.tar.gz
Merge work:/home/bk/mysql-4.0
into serg.mysql.com:/usr/home/serg/Abk/mysql-4.0
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_check.c4
-rw-r--r--myisam/mi_create.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index 67a7d6f363d..ca5c8f9ecb4 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -3694,8 +3694,8 @@ void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows)
MI_KEYDEF *key=share->keyinfo;
for (i=0 ; i < share->base.keys ; i++,key++)
{
- if (!(key->flag & HA_NOSAME) && ! mi_too_big_key_for_sort(key,rows) &&
- info->s->base.auto_key != i+1)
+ if (!(key->flag & (HA_NOSAME|HA_AUTO_KEY)) &&
+ ! mi_too_big_key_for_sort(key,rows))
{
share->state.key_map&= ~ ((ulonglong) 1 << i);
info->update|= HA_STATE_CHANGED;
diff --git a/myisam/mi_create.c b/myisam/mi_create.c
index 039066c5b37..9082c2b0d95 100644
--- a/myisam/mi_create.c
+++ b/myisam/mi_create.c
@@ -304,7 +304,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
if (keydef->flag & HA_BINARY_PACK_KEY)
options|=HA_OPTION_PACK_KEYS; /* Using packed keys */
- if (keydef->flag & HA_AUTO_KEY)
+ if (keydef->flag & HA_AUTO_KEY && ci->with_auto_increment)
share.base.auto_key=i+1;
for (j=0, keyseg=keydef->seg ; j < keydef->keysegs ; j++, keyseg++)
{