summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-10-22 13:27:18 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-10-22 13:27:18 +0300
commit46957a6a77518b579c6c8e1345666f84a5a59455 (patch)
treec0e463f14123cd09bb4d5854d32577e44b3a9827 /mysys
parent1619ae899099c4934f3b5919b2398c95a7cacc94 (diff)
parente3d692aa092a76415ce1ce0e9662338873d84abb (diff)
downloadmariadb-git-46957a6a77518b579c6c8e1345666f84a5a59455.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'mysys')
-rw-r--r--mysys/hash.c5
-rw-r--r--mysys/my_error.c3
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