@@ -401,7 +401,7 @@ int test_write(MI_INFO *file,int id,int lock_type)
401
401
402
402
int test_update (MI_INFO * file ,int id ,int lock_type )
403
403
{
404
- uint i ,lock ,found , next , prev , update ;
404
+ uint i ,lock ,update ;
405
405
uint32 tmp ;
406
406
char find [4 ];
407
407
struct record new_record ;
@@ -424,34 +424,28 @@ int test_update(MI_INFO *file,int id,int lock_type)
424
424
bzero ((char * ) & new_record ,sizeof (new_record ));
425
425
strmov ((char * ) new_record .text ,"Updated" );
426
426
427
- found = next = prev = update = 0 ;
427
+ update = 0 ;
428
428
for (i = 0 ; i < 100 ; i ++ )
429
429
{
430
430
tmp = rnd (100000 );
431
431
int4store (find ,tmp );
432
- if (!mi_rkey (file ,record .id ,1 ,(uchar * ) find , HA_WHOLE_KEY ,
433
- HA_READ_KEY_EXACT ))
434
- found ++ ;
435
- else
432
+ if (mi_rkey (file ,record .id ,1 ,(uchar * ) find , HA_WHOLE_KEY ,
433
+ HA_READ_KEY_EXACT ))
436
434
{
437
435
if (my_errno != HA_ERR_KEY_NOT_FOUND )
438
436
{
439
437
fprintf (stderr ,"%2d: Got error %d from read in update\n" ,id ,my_errno );
440
438
return 1 ;
441
439
}
442
- else if (!mi_rnext (file ,record .id ,1 ))
443
- next ++ ;
444
- else
440
+ else if (mi_rnext (file ,record .id ,1 ))
445
441
{
446
442
if (my_errno != HA_ERR_END_OF_FILE )
447
443
{
448
444
fprintf (stderr ,"%2d: Got error %d from rnext in update\n" ,
449
445
id ,my_errno );
450
446
return 1 ;
451
447
}
452
- else if (!mi_rprev (file ,record .id ,1 ))
453
- prev ++ ;
454
- else
448
+ else if (mi_rprev (file ,record .id ,1 ))
455
449
{
456
450
if (my_errno != HA_ERR_END_OF_FILE )
457
451
{
0 commit comments