diff options
author | unknown <monty@tik.mysql.fi> | 2001-07-16 03:07:45 +0300 |
---|---|---|
committer | unknown <monty@tik.mysql.fi> | 2001-07-16 03:07:45 +0300 |
commit | fb1b1ba26b69b1c2767bb5a3b676a8edff529e56 (patch) | |
tree | f28a764d2729df5d2de75f9f4fb6ace491d14245 /myisam | |
parent | ef63cbc810321573d9ab86e243e9e5b645572bc3 (diff) | |
parent | 2a18a762e1d4c688ff169e92a8c3977bcbb00f03 (diff) | |
download | mariadb-git-fb1b1ba26b69b1c2767bb5a3b676a8edff529e56.tar.gz |
Merge
Docs/manual.texi:
SCCS merged
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/mi_check.c | 16 | ||||
-rw-r--r-- | myisam/myisamchk.c | 2 |
2 files changed, 16 insertions, 2 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index c6e07445bcf..0caedbe1a51 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -432,9 +432,9 @@ int chk_key(MI_CHECK *param, register MI_INFO *info) } else full_text_keys++; - /* Check that auto_increment key is bigger than max key value */ if ((uint) share->base.auto_key -1 == key) { + /* Check that auto_increment key is bigger than max key value */ ulonglong save_auto_value=info->s->state.auto_increment; info->s->state.auto_increment=0; info->lastinx=key; @@ -454,6 +454,20 @@ int chk_key(MI_CHECK *param, register MI_INFO *info) } else info->s->state.auto_increment=save_auto_value; + + /* Check that there isn't a row with auto_increment = 0 in the table */ + mi_extra(info,HA_EXTRA_KEYREAD); + bzero(info->lastkey,keyinfo->seg->length); + if (!mi_rkey(info, info->rec_buff, key, info->lastkey, + keyinfo->seg->length, HA_READ_KEY_EXACT)) + { + /* Don't count this as a real warning, as myisamchk can't correct it */ + uint save=param->warning_printed; + mi_check_print_warning(param, + "Found row where the auto_increment column has the value 0"); + param->warning_printed=save; + } + mi_extra(info,HA_EXTRA_NO_KEYREAD); } length=(my_off_t) isam_key_length(info,keyinfo)*keys + param->key_blocks*2; diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c index dd23e214ccf..61ad939d6ed 100644 --- a/myisam/myisamchk.c +++ b/myisam/myisamchk.c @@ -201,7 +201,7 @@ static struct option long_options[] = static void print_version(void) { - printf("%s Ver 1.47 for %s at %s\n",my_progname,SYSTEM_TYPE, + printf("%s Ver 1.48 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE); } |