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
95eb5e5a
Commit
95eb5e5a
authored
Jul 26, 2022
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix clang -Wunused-but-set-variable in unit tests
parent
5d0f7534
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
16 deletions
+7
-16
storage/heap/hp_test1.c
storage/heap/hp_test1.c
+1
-4
storage/maria/ma_test3.c
storage/maria/ma_test3.c
+6
-12
No files found.
storage/heap/hp_test1.c
View file @
95eb5e5a
...
...
@@ -30,7 +30,7 @@ static int flag=0,verbose=0,remove_ant=0,flags[50];
int
main
(
int
argc
,
char
**
argv
)
{
int
i
,
j
,
error
,
deleted
;
int
i
,
j
,
error
;
HP_INFO
*
file
;
uchar
record
[
128
],
key
[
32
];
const
char
*
filename
;
...
...
@@ -62,7 +62,6 @@ int main(int argc, char **argv)
keyinfo
[
0
].
seg
[
0
].
null_bit
=
0
;
keyinfo
[
0
].
flag
=
HA_NOSAME
;
deleted
=
0
;
bzero
((
uchar
*
)
flags
,
sizeof
(
flags
));
printf
(
"- Creating heap-file
\n
"
);
...
...
@@ -110,8 +109,6 @@ int main(int argc, char **argv)
if
(
error
||
verbose
)
printf
(
"key: %s delete: %d my_errno: %d
\n
"
,(
char
*
)
key
,
error
,
my_errno
);
flags
[
j
]
=
0
;
if
(
!
error
)
deleted
++
;
}
if
(
heap_check_heap
(
file
,
0
))
{
...
...
storage/maria/ma_test3.c
View file @
95eb5e5a
...
...
@@ -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
)
{
...
...
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