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
0967e887
Commit
0967e887
authored
Jul 27, 2007
by
serg@janus.mylan
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into janus.mylan:/usr/home/serg/Abk/mysql-5.1
parents
e73f004f
42cb8ae7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
16 deletions
+20
-16
storage/myisam/mi_test1.c
storage/myisam/mi_test1.c
+3
-2
storage/myisam/mi_test2.c
storage/myisam/mi_test2.c
+13
-10
storage/myisam/mi_test3.c
storage/myisam/mi_test3.c
+4
-4
No files found.
storage/myisam/mi_test1.c
View file @
0967e887
...
...
@@ -258,7 +258,8 @@ static int run_test(const char *filename)
continue
;
create_key
(
key
,
j
);
my_errno
=
0
;
if
((
error
=
mi_rkey
(
file
,
read_record
,
0
,
key
,
0
,
HA_READ_KEY_EXACT
)))
if
((
error
=
mi_rkey
(
file
,
read_record
,
0
,
key
,
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
)))
{
if
(
verbose
||
(
flags
[
j
]
>=
1
||
(
error
&&
my_errno
!=
HA_ERR_KEY_NOT_FOUND
)))
...
...
@@ -285,7 +286,7 @@ static int run_test(const char *filename)
{
create_key
(
key
,
i
);
my_errno
=
0
;
error
=
mi_rkey
(
file
,
read_record
,
0
,
key
,
0
,
HA_READ_KEY_EXACT
);
error
=
mi_rkey
(
file
,
read_record
,
0
,
key
,
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
);
if
(
verbose
||
(
error
==
0
&&
flags
[
i
]
==
0
&&
unique_key
)
||
(
error
&&
(
flags
[
i
]
!=
0
||
my_errno
!=
HA_ERR_KEY_NOT_FOUND
)))
...
...
storage/myisam/mi_test2.c
View file @
0967e887
...
...
@@ -263,7 +263,7 @@ int main(int argc, char *argv[])
if
(
!
j
)
for
(
j
=
999
;
j
>
0
&&
key1
[
j
]
==
0
;
j
--
)
;
sprintf
(
key
,
"%6d"
,
j
);
if
(
mi_rkey
(
file
,
read_record
,
0
,
key
,
0
,
HA_READ_KEY_EXACT
))
if
(
mi_rkey
(
file
,
read_record
,
0
,
key
,
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
))
{
printf
(
"Test in loop: Can't find key:
\"
%s
\"\n
"
,
key
);
goto
err
;
...
...
@@ -291,7 +291,7 @@ int main(int argc, char *argv[])
if
(
j
!=
0
)
{
sprintf
(
key
,
"%6d"
,
j
);
if
(
mi_rkey
(
file
,
read_record
,
0
,
key
,
0
,
HA_READ_KEY_EXACT
))
if
(
mi_rkey
(
file
,
read_record
,
0
,
key
,
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
))
{
printf
(
"can't find key1:
\"
%s
\"\n
"
,
key
);
goto
err
;
...
...
@@ -325,7 +325,7 @@ int main(int argc, char *argv[])
if
(
j
!=
0
)
{
sprintf
(
key
,
"%6d"
,
j
);
if
(
mi_rkey
(
file
,
read_record
,
0
,
key
,
0
,
HA_READ_KEY_EXACT
))
if
(
mi_rkey
(
file
,
read_record
,
0
,
key
,
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
))
{
printf
(
"can't find key1:
\"
%s
\"\n
"
,
key
);
goto
err
;
...
...
@@ -377,7 +377,7 @@ int main(int argc, char *argv[])
DBUG_PRINT
(
"progpos"
,(
"first - next -> last - prev -> first"
));
if
(
verbose
)
printf
(
" Using key:
\"
%s
\"
Keys: %d
\n
"
,
key
,
dupp_keys
);
if
(
mi_rkey
(
file
,
read_record
,
0
,
key
,
0
,
HA_READ_KEY_EXACT
))
if
(
mi_rkey
(
file
,
read_record
,
0
,
key
,
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
))
goto
err
;
if
(
mi_rsame
(
file
,
read_record2
,
-
1
))
goto
err
;
...
...
@@ -422,7 +422,7 @@ int main(int argc, char *argv[])
}
/* Check of mi_rnext_same */
if
(
mi_rkey
(
file
,
read_record
,
0
,
key
,
0
,
HA_READ_KEY_EXACT
))
if
(
mi_rkey
(
file
,
read_record
,
0
,
key
,
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
))
goto
err
;
ant
=
1
;
while
(
!
mi_rnext_same
(
file
,
read_record3
)
&&
ant
<
dupp_keys
+
10
)
...
...
@@ -496,7 +496,7 @@ int main(int argc, char *argv[])
goto
err
;
if
(
bcmp
(
read_record2
,
read_record3
,
reclength
))
printf
(
"Can't find last record
\n
"
);
#ifdef NOT_ANYMORE
if
(
!
silent
)
puts
(
"- Test read key-part"
);
strmov
(
key2
,
key
);
...
...
@@ -514,12 +514,14 @@ int main(int argc, char *argv[])
goto
end
;
}
}
#endif
if
(
dupp_keys
>
2
)
{
if
(
!
silent
)
printf
(
"- Read key (first) - next - delete - next -> last
\n
"
);
DBUG_PRINT
(
"progpos"
,(
"first - next - delete - next -> last"
));
if
(
mi_rkey
(
file
,
read_record
,
0
,
key
,
0
,
HA_READ_KEY_EXACT
))
goto
err
;
if
(
mi_rkey
(
file
,
read_record
,
0
,
key
,
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
))
goto
err
;
if
(
mi_rnext
(
file
,
read_record3
,
0
))
goto
err
;
if
(
mi_delete
(
file
,
read_record3
))
goto
err
;
opt_delete
++
;
...
...
@@ -555,7 +557,8 @@ int main(int argc, char *argv[])
if
(
!
silent
)
printf
(
"- Read first - delete - next -> last
\n
"
);
DBUG_PRINT
(
"progpos"
,(
"first - delete - next -> last"
));
if
(
mi_rkey
(
file
,
read_record3
,
0
,
key
,
0
,
HA_READ_KEY_EXACT
))
goto
err
;
if
(
mi_rkey
(
file
,
read_record3
,
0
,
key
,
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
))
goto
err
;
if
(
mi_delete
(
file
,
read_record3
))
goto
err
;
opt_delete
++
;
ant
=
1
;
...
...
@@ -618,10 +621,10 @@ int main(int argc, char *argv[])
copy_key
(
file
,(
uint
)
i
,(
uchar
*
)
read_record
,(
uchar
*
)
key
);
copy_key
(
file
,(
uint
)
i
,(
uchar
*
)
read_record2
,(
uchar
*
)
key2
);
min_key
.
key
=
key
;
min_key
.
length
=
USE
_WHOLE_KEY
;
min_key
.
keypart_map
=
HA
_WHOLE_KEY
;
min_key
.
flag
=
HA_READ_KEY_EXACT
;
max_key
.
key
=
key2
;
max_key
.
length
=
USE
_WHOLE_KEY
;
max_key
.
keypart_map
=
HA
_WHOLE_KEY
;
max_key
.
flag
=
HA_READ_AFTER_KEY
;
range_records
=
mi_records_in_range
(
file
,(
int
)
i
,
&
min_key
,
&
max_key
);
...
...
storage/myisam/mi_test3.c
View file @
0967e887
...
...
@@ -243,8 +243,8 @@ int test_read(MI_INFO *file,int id)
for
(
i
=
0
;
i
<
100
;
i
++
)
{
find
=
rnd
(
100000
);
if
(
!
mi_rkey
(
file
,
record
.
id
,
1
,(
uchar
*
)
&
find
,
sizeof
(
find
),
HA_READ_KEY_EXACT
))
if
(
!
mi_rkey
(
file
,
record
.
id
,
1
,(
uchar
*
)
&
find
,
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
))
found
++
;
else
{
...
...
@@ -426,8 +426,8 @@ int test_update(MI_INFO *file,int id,int lock_type)
{
tmp
=
rnd
(
100000
);
int4store
(
find
,
tmp
);
if
(
!
mi_rkey
(
file
,
record
.
id
,
1
,(
uchar
*
)
find
,
sizeof
(
find
),
HA_READ_KEY_EXACT
))
if
(
!
mi_rkey
(
file
,
record
.
id
,
1
,(
uchar
*
)
find
,
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
))
found
++
;
else
{
...
...
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