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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
fd6aa55b
Commit
fd6aa55b
authored
Mar 15, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
parents
bbaa46be
44e5052f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
5 deletions
+34
-5
storage/ndb/test/ndbapi/test_event.cpp
storage/ndb/test/ndbapi/test_event.cpp
+11
-3
storage/ndb/test/src/HugoCalculator.cpp
storage/ndb/test/src/HugoCalculator.cpp
+23
-2
No files found.
storage/ndb/test/ndbapi/test_event.cpp
View file @
fd6aa55b
...
@@ -500,6 +500,12 @@ int runEventMixedLoad(NDBT_Context* ctx, NDBT_Step* step)
...
@@ -500,6 +500,12 @@ int runEventMixedLoad(NDBT_Context* ctx, NDBT_Step* step)
int
records
=
ctx
->
getNumRecords
();
int
records
=
ctx
->
getNumRecords
();
HugoTransactions
hugoTrans
(
*
ctx
->
getTab
());
HugoTransactions
hugoTrans
(
*
ctx
->
getTab
());
if
(
ctx
->
getPropertyWait
(
"LastGCI"
,
~
(
Uint32
)
0
))
{
g_err
<<
"FAIL "
<<
__LINE__
<<
endl
;
return
NDBT_FAILED
;
}
while
(
loops
--
&&
!
ctx
->
isTestStopped
())
while
(
loops
--
&&
!
ctx
->
isTestStopped
())
{
{
hugoTrans
.
clearTable
(
GETNDB
(
step
),
0
);
hugoTrans
.
clearTable
(
GETNDB
(
step
),
0
);
...
@@ -606,9 +612,11 @@ int runEventApplier(NDBT_Context* ctx, NDBT_Step* step)
...
@@ -606,9 +612,11 @@ int runEventApplier(NDBT_Context* ctx, NDBT_Step* step)
goto
end
;
goto
end
;
}
}
ctx
->
setProperty
(
"LastGCI"
,
~
(
Uint32
)
0
);
ctx
->
broadcast
();
while
(
!
ctx
->
isTestStopped
())
while
(
!
ctx
->
isTestStopped
())
{
{
int
r
;
int
count
=
0
;
int
count
=
0
;
Uint32
stop_gci
=
~
0
;
Uint32
stop_gci
=
~
0
;
Uint64
curr_gci
=
0
;
Uint64
curr_gci
=
0
;
...
@@ -778,7 +786,7 @@ int runEventApplier(NDBT_Context* ctx, NDBT_Step* step)
...
@@ -778,7 +786,7 @@ int runEventApplier(NDBT_Context* ctx, NDBT_Step* step)
if
(
trans
->
getNdbError
().
status
==
NdbError
::
PermanentError
)
if
(
trans
->
getNdbError
().
status
==
NdbError
::
PermanentError
)
{
{
g_err
<<
"Ignoring execute
"
<<
r
<<
"
failed "
g_err
<<
"Ignoring execute failed "
<<
trans
->
getNdbError
().
code
<<
" "
<<
trans
->
getNdbError
().
code
<<
" "
<<
trans
->
getNdbError
().
message
<<
endl
;
<<
trans
->
getNdbError
().
message
<<
endl
;
...
@@ -788,7 +796,7 @@ int runEventApplier(NDBT_Context* ctx, NDBT_Step* step)
...
@@ -788,7 +796,7 @@ int runEventApplier(NDBT_Context* ctx, NDBT_Step* step)
}
}
else
if
(
noRetries
++
==
10
)
else
if
(
noRetries
++
==
10
)
{
{
g_err
<<
"execute
"
<<
r
<<
"
failed "
g_err
<<
"execute failed "
<<
trans
->
getNdbError
().
code
<<
" "
<<
trans
->
getNdbError
().
code
<<
" "
<<
trans
->
getNdbError
().
message
<<
endl
;
<<
trans
->
getNdbError
().
message
<<
endl
;
trans
->
close
();
trans
->
close
();
...
...
storage/ndb/test/src/HugoCalculator.cpp
View file @
fd6aa55b
...
@@ -89,6 +89,27 @@ HugoCalculator::float calcValue(int record, int attrib, int updates) const;
...
@@ -89,6 +89,27 @@ HugoCalculator::float calcValue(int record, int attrib, int updates) const;
HugoCalculator::double calcValue(int record, int attrib, int updates) const;
HugoCalculator::double calcValue(int record, int attrib, int updates) const;
#endif
#endif
static
Uint32
calc_len
(
Uint32
rvalue
,
int
maxlen
)
{
Uint32
minlen
=
25
;
if
((
rvalue
>>
16
)
<
4096
)
minlen
=
15
;
else
if
((
rvalue
>>
16
)
<
8192
)
minlen
=
25
;
else
if
((
rvalue
>>
16
)
<
16384
)
minlen
=
35
;
else
minlen
=
64
;
if
(
maxlen
<=
minlen
)
return
maxlen
;
return
minlen
+
(
rvalue
%
(
maxlen
-
minlen
));
}
const
char
*
const
char
*
HugoCalculator
::
calcValue
(
int
record
,
HugoCalculator
::
calcValue
(
int
record
,
int
attrib
,
int
attrib
,
...
@@ -178,7 +199,7 @@ HugoCalculator::calcValue(int record,
...
@@ -178,7 +199,7 @@ HugoCalculator::calcValue(int record,
break
;
break
;
case
NdbDictionary
:
:
Column
::
Varbinary
:
case
NdbDictionary
:
:
Column
::
Varbinary
:
case
NdbDictionary
:
:
Column
::
Varchar
:
case
NdbDictionary
:
:
Column
::
Varchar
:
len
=
1
+
(
myRand
(
&
seed
)
%
(
len
-
1
)
);
len
=
calc_len
(
myRand
(
&
seed
),
len
-
1
);
assert
(
len
<
256
);
assert
(
len
<
256
);
*
outlen
=
len
+
1
;
*
outlen
=
len
+
1
;
*
buf
=
len
;
*
buf
=
len
;
...
@@ -186,7 +207,7 @@ HugoCalculator::calcValue(int record,
...
@@ -186,7 +207,7 @@ HugoCalculator::calcValue(int record,
goto
write_char
;
goto
write_char
;
case
NdbDictionary
:
:
Column
::
Longvarchar
:
case
NdbDictionary
:
:
Column
::
Longvarchar
:
case
NdbDictionary
:
:
Column
::
Longvarbinary
:
case
NdbDictionary
:
:
Column
::
Longvarbinary
:
len
=
1
+
(
myRand
(
&
seed
)
%
(
len
-
2
)
);
len
=
calc_len
(
myRand
(
&
seed
),
len
-
2
);
assert
(
len
<
65536
);
assert
(
len
<
65536
);
*
outlen
=
len
+
2
;
*
outlen
=
len
+
2
;
int2store
(
buf
,
len
);
int2store
(
buf
,
len
);
...
...
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