Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
5e959bc3
Commit
5e959bc3
authored
Sep 19, 2022
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix clang -Wunused-but-set-variable
parent
3ab4b260
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
storage/myisam/mi_test3.c
storage/myisam/mi_test3.c
+6
-12
No files found.
storage/myisam/mi_test3.c
View file @
5e959bc3
...
...
@@ -401,7 +401,7 @@ int test_write(MI_INFO *file,int id,int lock_type)
int
test_update
(
MI_INFO
*
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
;
...
...
@@ -424,24 +424,20 @@ int test_update(MI_INFO *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
(
!
mi_rkey
(
file
,
record
.
id
,
1
,(
uchar
*
)
find
,
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
))
found
++
;
else
if
(
mi_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
(
!
mi_rnext
(
file
,
record
.
id
,
1
))
next
++
;
else
else
if
(
mi_rnext
(
file
,
record
.
id
,
1
))
{
if
(
my_errno
!=
HA_ERR_END_OF_FILE
)
{
...
...
@@ -449,9 +445,7 @@ int test_update(MI_INFO *file,int id,int lock_type)
id
,
my_errno
);
return
1
;
}
else
if
(
!
mi_rprev
(
file
,
record
.
id
,
1
))
prev
++
;
else
else
if
(
mi_rprev
(
file
,
record
.
id
,
1
))
{
if
(
my_errno
!=
HA_ERR_END_OF_FILE
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment