Commit 22c12eae authored by unknown's avatar unknown

chk_del() should not check key delete-chain

make a test for -inf more portable (-Inf)


client/mysqldump.c:
  make a test for -inf more portable (-Inf)
myisam/mi_check.c:
  chk_del() should not check key delete-chain
parent ba249c10
......@@ -179,7 +179,7 @@ static struct my_option my_long_options[] =
{"single-transaction", OPT_TRANSACTION,
"Dump all tables in single transaction to get consistent snapshot. Mutually exclusive with --lock-tables.",
(gptr*) &opt_single_transaction, (gptr*) &opt_single_transaction, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0},
0, 0, 0, 0, 0, 0},
{"no-create-db", 'n',
"'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;' will not be put in the output. The above line will be added otherwise, if --databases or --all-databases option was given.}",
(gptr*) &opt_create_db, (gptr*) &opt_create_db, 0, GET_BOOL, NO_ARG, 0, 0,
......@@ -1072,7 +1072,7 @@ static void dumpTable(uint numFields, char *table)
{
/* change any strings ("inf", "-inf", "nan") into NULL */
char *ptr = row[i];
if (isalpha(*ptr) || (*ptr == '-' && *(ptr+1) == 'i'))
if (isalpha(*ptr) || (*ptr == '-' && isalpha(ptr[1])))
dynstr_append(&extended_row, "NULL");
else
{
......@@ -1118,7 +1118,7 @@ static void dumpTable(uint numFields, char *table)
if (opt_xml)
fprintf(md_result_file, "\t\t<field name=\"%s\">%s</field>\n",
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);
else
{
......
......@@ -131,15 +131,8 @@ int chk_del(MI_CHECK *param, register MI_INFO *info, uint test_flag)
char buff[22],buff2[22];
DBUG_ENTER("chk_del");
if (!(test_flag & T_SILENT))
puts("- check key delete-chain");
LINT_INIT(old_link);
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 :
info->s->rec_reflength+1);
......@@ -362,6 +355,18 @@ int chk_key(MI_CHECK *param, register MI_INFO *info)
char buff[22],buff2[22];
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");
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