diff options
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/hash.c | 5 | ||||
-rw-r--r-- | mysys/my_error.c | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/mysys/hash.c b/mysys/hash.c index 077895ed677..d29297a5233 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -792,14 +792,13 @@ void my_hash_replace(HASH *hash, HASH_SEARCH_STATE *current_record, my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument) { uint records, i; - HASH_LINK *data; records= hash->records; - data= dynamic_element(&hash->array,0,HASH_LINK*); for (i= 0 ; i < records ; i++) { - if ((*action)(data[i].data, argument)) + if ((*action)(dynamic_element(&hash->array, i, HASH_LINK *)->data, + argument)) return 1; } return 0; diff --git a/mysys/my_error.c b/mysys/my_error.c index 5f1ca0af55b..20836269939 100644 --- a/mysys/my_error.c +++ b/mysys/my_error.c @@ -113,6 +113,9 @@ void my_error(uint nr, myf MyFlags, ...) DBUG_ENTER("my_error"); DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d", nr, MyFlags, errno)); + if (errno == 1213) + DBUG_ASSERT(0); + if (!(format = my_get_err_msg(nr))) (void) my_snprintf(ebuff, sizeof(ebuff), "Unknown error %d", nr); else |