summaryrefslogtreecommitdiff
path: root/storage/maria
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-07-27 17:17:24 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-07-27 17:17:24 +0300
commit098c0f2634a35e24e9eb0f06d3fba69d0d097657 (patch)
tree8e6b460d1c8812d29444bf1bd7449e5871105215 /storage/maria
parent5bf4dee36943cb4cc95d10863d469192de854800 (diff)
parente5c4f4e590d7782ef938b436f84ae11b68e0af08 (diff)
downloadmariadb-git-098c0f2634a35e24e9eb0f06d3fba69d0d097657.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'storage/maria')
-rw-r--r--storage/maria/ma_test3.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/storage/maria/ma_test3.c b/storage/maria/ma_test3.c
index 400016829e2..411a5f6ce0b 100644
--- a/storage/maria/ma_test3.c
+++ b/storage/maria/ma_test3.c
@@ -398,7 +398,7 @@ int test_write(MARIA_HA *file,int id,int lock_type)
int test_update(MARIA_HA *file,int id,int lock_type)
{
- uint i,lock,found,next,prev,update;
+ uint i,lock,update;
uint32 tmp;
char find[4];
struct record new_record;
@@ -421,24 +421,20 @@ int test_update(MARIA_HA *file,int id,int lock_type)
bzero((char*) &new_record,sizeof(new_record));
strmov((char*) new_record.text,"Updated");
- found=next=prev=update=0;
+ update=0;
for (i=0 ; i < 100 ; i++)
{
tmp=rnd(100000);
int4store(find,tmp);
- if (!maria_rkey(file,record.id,1,(uchar*) find, HA_WHOLE_KEY,
- HA_READ_KEY_EXACT))
- found++;
- else
+ if (maria_rkey(file,record.id,1,(uchar*) find, HA_WHOLE_KEY,
+ HA_READ_KEY_EXACT))
{
if (my_errno != HA_ERR_KEY_NOT_FOUND)
{
fprintf(stderr,"%2d: Got error %d from read in update\n",id,my_errno);
return 1;
}
- else if (!maria_rnext(file,record.id,1))
- next++;
- else
+ else if (maria_rnext(file,record.id,1))
{
if (my_errno != HA_ERR_END_OF_FILE)
{
@@ -446,9 +442,7 @@ int test_update(MARIA_HA *file,int id,int lock_type)
id,my_errno);
return 1;
}
- else if (!maria_rprev(file,record.id,1))
- prev++;
- else
+ else if (maria_rprev(file,record.id,1))
{
if (my_errno != HA_ERR_END_OF_FILE)
{