Commit fddab846 authored by serg@serg.mylan's avatar serg@serg.mylan

chk_del() should not check key delete-chain

make a test for -inf more portable (-Inf)
parent 0395a3dd
...@@ -1072,7 +1072,7 @@ static void dumpTable(uint numFields, char *table) ...@@ -1072,7 +1072,7 @@ static void dumpTable(uint numFields, char *table)
{ {
/* change any strings ("inf", "-inf", "nan") into NULL */ /* change any strings ("inf", "-inf", "nan") into NULL */
char *ptr = row[i]; char *ptr = row[i];
if (isalpha(*ptr) || (*ptr == '-' && *(ptr+1) == 'i')) if (isalpha(*ptr) || (*ptr == '-' && isalpha(ptr[1])))
dynstr_append(&extended_row, "NULL"); dynstr_append(&extended_row, "NULL");
else else
{ {
...@@ -1118,7 +1118,7 @@ static void dumpTable(uint numFields, char *table) ...@@ -1118,7 +1118,7 @@ static void dumpTable(uint numFields, char *table)
if (opt_xml) if (opt_xml)
fprintf(md_result_file, "\t\t<field name=\"%s\">%s</field>\n", fprintf(md_result_file, "\t\t<field name=\"%s\">%s</field>\n",
field->name,!isalpha(*ptr) ?ptr: "NULL"); field->name,!isalpha(*ptr) ?ptr: "NULL");
else if (isalpha(*ptr) || (*ptr == '-' && *(ptr+1) == 'i')) else if (isalpha(*ptr) || (*ptr == '-' && isalpha(ptr[1])))
fputs("NULL", md_result_file); fputs("NULL", md_result_file);
else else
{ {
......
...@@ -131,15 +131,8 @@ int chk_del(MI_CHECK *param, register MI_INFO *info, uint test_flag) ...@@ -131,15 +131,8 @@ int chk_del(MI_CHECK *param, register MI_INFO *info, uint test_flag)
char buff[22],buff2[22]; char buff[22],buff2[22];
DBUG_ENTER("chk_del"); DBUG_ENTER("chk_del");
if (!(test_flag & T_SILENT))
puts("- check key delete-chain");
LINT_INIT(old_link); LINT_INIT(old_link);
param->record_checksum=0; param->record_checksum=0;
param->key_file_blocks=info->s->base.keystart;
for (j=0 ; j < info->s->state.header.max_block_size ; j++)
if (check_k_link(param,info,j))
goto wrong;
delete_link_length=((info->s->options & HA_OPTION_PACK_RECORD) ? 20 : delete_link_length=((info->s->options & HA_OPTION_PACK_RECORD) ? 20 :
info->s->rec_reflength+1); info->s->rec_reflength+1);
...@@ -362,6 +355,18 @@ int chk_key(MI_CHECK *param, register MI_INFO *info) ...@@ -362,6 +355,18 @@ int chk_key(MI_CHECK *param, register MI_INFO *info)
char buff[22],buff2[22]; char buff[22],buff2[22];
DBUG_ENTER("chk_key"); DBUG_ENTER("chk_key");
if (!(param->testflag & T_SILENT))
puts("- check key delete-chain");
param->key_file_blocks=info->s->base.keystart;
for (key=0 ; key < info->s->state.header.max_block_size ; key++)
if (check_k_link(param,info,key))
{
if (param->testflag & T_VERBOSE) puts("");
mi_check_print_error(param,"key delete-link-chain corrupted");
DBUG_RETURN(-1);
}
if (!(param->testflag & T_SILENT)) puts("- check index reference"); if (!(param->testflag & T_SILENT)) puts("- check index reference");
all_keydata=all_totaldata=key_totlength=0; all_keydata=all_totaldata=key_totlength=0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment