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
7e510839
Commit
7e510839
authored
Jan 31, 2006
by
pekka@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - testBlobs 'perf test' fix
parent
f4d76d84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
ndb/test/ndbapi/testBlobs.cpp
ndb/test/ndbapi/testBlobs.cpp
+12
-6
No files found.
ndb/test/ndbapi/testBlobs.cpp
View file @
7e510839
...
...
@@ -1488,13 +1488,16 @@ testperf()
// insert char (one trans)
{
DBG
(
"--- insert char ---"
);
char
b
[
20
];
t1
.
on
();
CHK
((
g_con
=
g_ndb
->
startTransaction
())
!=
0
);
for
(
Uint32
k
=
0
;
k
<
g_opt
.
m_rowsperf
;
k
++
)
{
CHK
((
g_opr
=
g_con
->
getNdbOperation
(
tab
.
getName
()))
!=
0
);
CHK
(
g_opr
->
insertTuple
()
==
0
);
CHK
(
g_opr
->
equal
(
cA
,
(
char
*
)
&
k
)
==
0
);
CHK
(
g_opr
->
setValue
(
cB
,
"b"
)
==
0
);
memset
(
b
,
0x20
,
sizeof
(
b
));
b
[
0
]
=
'b'
;
CHK
(
g_opr
->
setValue
(
cB
,
b
)
==
0
);
CHK
(
g_con
->
execute
(
NoCommit
)
==
0
);
}
t1
.
off
(
g_opt
.
m_rowsperf
);
...
...
@@ -1531,12 +1534,15 @@ testperf()
{
DBG
(
"--- insert for read test ---"
);
unsigned
n
=
0
;
char
b
[
20
];
CHK
((
g_con
=
g_ndb
->
startTransaction
())
!=
0
);
for
(
Uint32
k
=
0
;
k
<
g_opt
.
m_rowsperf
;
k
++
)
{
CHK
((
g_opr
=
g_con
->
getNdbOperation
(
tab
.
getName
()))
!=
0
);
CHK
(
g_opr
->
insertTuple
()
==
0
);
CHK
(
g_opr
->
equal
(
cA
,
(
char
*
)
&
k
)
==
0
);
CHK
(
g_opr
->
setValue
(
cB
,
"b"
)
==
0
);
memset
(
b
,
0x20
,
sizeof
(
b
));
b
[
0
]
=
'b'
;
CHK
(
g_opr
->
setValue
(
cB
,
b
)
==
0
);
CHK
((
g_bh1
=
g_opr
->
getBlobHandle
(
cC
))
!=
0
);
CHK
((
g_bh1
->
setValue
(
"c"
,
1
)
==
0
));
if
(
++
n
==
g_opt
.
m_batch
)
{
...
...
@@ -1570,7 +1576,7 @@ testperf()
a
=
(
Uint32
)
-
1
;
b
[
0
]
=
0
;
CHK
(
g_con
->
execute
(
NoCommit
)
==
0
);
CHK
(
a
==
k
&&
strcmp
(
b
,
"b"
)
==
0
);
CHK
(
a
==
k
&&
b
[
0
]
==
'b'
);
}
CHK
(
g_con
->
execute
(
Commit
)
==
0
);
t1
.
off
(
g_opt
.
m_rowsperf
);
...
...
@@ -1596,7 +1602,7 @@ testperf()
CHK
(
g_con
->
execute
(
NoCommit
)
==
0
);
Uint32
m
=
20
;
CHK
(
g_bh1
->
readData
(
c
,
m
)
==
0
);
CHK
(
a
==
k
&&
m
==
1
&&
strcmp
(
c
,
"c"
)
==
0
);
CHK
(
a
==
k
&&
m
==
1
&&
c
[
0
]
==
'c'
);
}
CHK
(
g_con
->
execute
(
Commit
)
==
0
);
t2
.
off
(
g_opt
.
m_rowsperf
);
...
...
@@ -1629,7 +1635,7 @@ testperf()
CHK
((
ret
=
rs
->
nextResult
(
true
))
==
0
||
ret
==
1
);
if
(
ret
==
1
)
break
;
CHK
(
a
<
g_opt
.
m_rowsperf
&&
strcmp
(
b
,
"b"
)
==
0
);
CHK
(
a
<
g_opt
.
m_rowsperf
&&
b
[
0
]
==
'b'
);
n
++
;
}
CHK
(
n
==
g_opt
.
m_rowsperf
);
...
...
@@ -1661,7 +1667,7 @@ testperf()
break
;
Uint32
m
=
20
;
CHK
(
g_bh1
->
readData
(
c
,
m
)
==
0
);
CHK
(
a
<
g_opt
.
m_rowsperf
&&
m
==
1
&&
strcmp
(
c
,
"c"
)
==
0
);
CHK
(
a
<
g_opt
.
m_rowsperf
&&
m
==
1
&&
c
[
0
]
==
'c'
);
n
++
;
}
CHK
(
n
==
g_opt
.
m_rowsperf
);
...
...
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