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
4d9f0110
Commit
4d9f0110
authored
Dec 11, 2007
by
Bradley C. Kuszmaul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do some extra checks. Addresses #162.
git-svn-id:
file:///svn/tokudb@1071
c7de825b-a66e-492c-adef-691d508d4ae1
parent
678e59f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/tests/test_db_curs4.c
src/tests/test_db_curs4.c
+7
-1
No files found.
src/tests/test_db_curs4.c
View file @
4d9f0110
...
@@ -198,8 +198,14 @@ static void insert_person (void) {
...
@@ -198,8 +198,14 @@ static void insert_person (void) {
int
r
=
do_put
(
"dbp"
,
dbp
,
&
key
,
&
data
);
CKERR
(
r
);
int
r
=
do_put
(
"dbp"
,
dbp
,
&
key
,
&
data
);
CKERR
(
r
);
// If the cursor is to the left of the current item, then increment count_items
// If the cursor is to the left of the current item, then increment count_items
{
{
int
compare
=
strcmp
((
char
*
)
namearray
,
nc_key
.
data
);
int
compare
=
strcmp
(
namearray
,
nc_key
.
data
);
// Verify that the first byte matches the strcmp function.
if
(
compare
<
0
)
assert
(
namearray
[
0
]
<
((
char
*
)
nc_key
.
data
)[
0
]);
if
(
compare
==
0
)
assert
(
namearray
[
0
]
==
((
char
*
)
nc_key
.
data
)[
0
]);
if
(
compare
>
0
)
assert
(
namearray
[
0
]
>
((
char
*
)
nc_key
.
data
)[
0
]);
//printf("%s:%d compare=%d insert %s, cursor at %s\n", __FILE__, __LINE__, compare, namearray, (char*)nc_key.data);
//printf("%s:%d compare=%d insert %s, cursor at %s\n", __FILE__, __LINE__, compare, namearray, (char*)nc_key.data);
// Update the counters
if
(
compare
>
0
)
calc_n_items
++
;
if
(
compare
>
0
)
calc_n_items
++
;
count_all_items
++
;
count_all_items
++
;
}
}
...
...
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