diff options
author | unknown <serg@serg.mylan> | 2003-12-11 16:47:50 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2003-12-11 16:47:50 +0100 |
commit | 22c12eaeb296b55d6121531bea44a97fb5297f04 (patch) | |
tree | d47903951f7c39e0965b9fb9c8c39e758d6d873e | |
parent | ba249c10c41f4dde9f9fe9dafa50a7cb30bc33fa (diff) | |
download | mariadb-git-22c12eaeb296b55d6121531bea44a97fb5297f04.tar.gz |
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
-rw-r--r-- | client/mysqldump.c | 6 | ||||
-rw-r--r-- | myisam/mi_check.c | 19 |
2 files changed, 15 insertions, 10 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index b7a61845f7c..d8e63cd611a 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -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 { diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 7108fdcba9e..007ae950990 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -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; |