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
fd595190
Commit
fd595190
authored
Jul 09, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Irix64 mipspro ndb compile fixes
parent
6e5eda03
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
42 deletions
+51
-42
ndb/src/common/util/ConfigValues.cpp
ndb/src/common/util/ConfigValues.cpp
+11
-9
ndb/src/mgmsrv/MgmtSrvr.cpp
ndb/src/mgmsrv/MgmtSrvr.cpp
+2
-5
ndb/src/ndbapi/NdbScanFilter.cpp
ndb/src/ndbapi/NdbScanFilter.cpp
+7
-2
ndb/test/src/HugoCalculator.cpp
ndb/test/src/HugoCalculator.cpp
+6
-4
ndb/test/src/NDBT_Tables.cpp
ndb/test/src/NDBT_Tables.cpp
+4
-3
ndb/test/src/NDBT_Test.cpp
ndb/test/src/NDBT_Test.cpp
+18
-17
ndb/tools/waiter.cpp
ndb/tools/waiter.cpp
+3
-2
No files found.
ndb/src/common/util/ConfigValues.cpp
View file @
fd595190
...
...
@@ -261,9 +261,9 @@ directory(Uint32 sz){
ConfigValuesFactory
::
ConfigValuesFactory
(
Uint32
keys
,
Uint32
data
){
m_sectionCounter
=
(
1
<<
KP_SECTION_SHIFT
);
m_freeKeys
=
directory
(
keys
);
m_freeData
=
data
;
m_freeData
=
((
data
+
7
)
&
~
7
)
;
m_currentSection
=
0
;
m_cfg
=
create
(
m_freeKeys
,
d
ata
);
m_cfg
=
create
(
m_freeKeys
,
m_freeD
ata
);
}
ConfigValuesFactory
::
ConfigValuesFactory
(
ConfigValues
*
cfg
){
...
...
@@ -316,6 +316,7 @@ ConfigValuesFactory::expand(Uint32 fk, Uint32 fs){
m_freeKeys
=
(
m_freeKeys
>=
fk
?
m_cfg
->
m_size
:
fk
+
m_cfg
->
m_size
);
m_freeData
=
(
m_freeData
>=
fs
?
m_cfg
->
m_dataSize
:
fs
+
m_cfg
->
m_dataSize
);
m_freeKeys
=
directory
(
m_freeKeys
);
m_freeData
=
((
m_freeData
+
7
)
&
~
7
);
ConfigValues
*
m_tmp
=
m_cfg
;
m_cfg
=
create
(
m_freeKeys
,
m_freeData
);
...
...
@@ -333,6 +334,7 @@ ConfigValuesFactory::shrink(){
m_freeKeys
=
m_cfg
->
m_size
-
m_freeKeys
;
m_freeData
=
m_cfg
->
m_dataSize
-
m_freeData
;
m_freeKeys
=
directory
(
m_freeKeys
);
m_freeData
=
((
m_freeData
+
7
)
&
~
7
);
ConfigValues
*
m_tmp
=
m_cfg
;
m_cfg
=
create
(
m_freeKeys
,
m_freeData
);
...
...
ndb/src/mgmsrv/MgmtSrvr.cpp
View file @
fd595190
...
...
@@ -243,20 +243,17 @@ MgmtSrvr::startEventLog()
char
clusterLog
[
MAXPATHLEN
];
NdbConfig_ClusterLogFileName
(
clusterLog
,
sizeof
(
clusterLog
));
if
(
ndb_mgm_get_string_parameter
(
iter
,
CFG_LOG_DESTINATION
,
&
tmp
)
==
0
){
logdest
.
assign
(
tmp
);
}
ndb_mgm_destroy_iterator
(
iter
);
if
(
logdest
.
length
()
==
0
)
{
if
(
logdest
.
length
()
==
0
||
logdest
==
""
)
{
logdest
.
assfmt
(
"FILE:filename=%s,maxsize=1000000,maxfiles=6"
,
clusterLog
);
}
if
(
!
g_EventLogger
.
addHandler
(
logdest
))
{
ndbout
<<
"ERROR: cannot parse
\"
"
<<
logdest
<<
"
\"
"
<<
endl
;
exit
(
1
);
ndbout
<<
"Warning: could not add log destination
\"
"
<<
logdest
.
c_str
()
<<
"
\"
"
<<
endl
;
}
}
...
...
ndb/src/ndbapi/NdbScanFilter.cpp
View file @
fd595190
...
...
@@ -337,7 +337,6 @@ static const tab2 table2[] = {
const
int
tab_sz
=
sizeof
(
table
)
/
sizeof
(
table
[
0
]);
const
int
tab2_sz
=
sizeof
(
table2
)
/
sizeof
(
table2
[
0
]);
template
<
typename
T
>
int
matchType
(
const
NdbDictionary
::
Column
*
col
){
return
1
;
...
...
@@ -382,7 +381,7 @@ NdbScanFilterImpl::cond_col_const(Interpreter::BinaryCondition op,
return
-
1
;
}
if
(
!
matchType
<
T
>
(
col
)){
if
(
!
matchType
(
col
)){
/**
* Code not reached
*/
...
...
@@ -777,3 +776,9 @@ main(void){
return 0;
}
#endif
template
class
Vector
<
NdbScanFilterImpl
::
State
>;
template
int
NdbScanFilterImpl
::
cond_col_const
(
Interpreter
::
BinaryCondition
,
Uint32
attrId
,
Uint32
);
template
int
NdbScanFilterImpl
::
cond_col_const
(
Interpreter
::
BinaryCondition
,
Uint32
attrId
,
Uint64
);
ndb/test/src/HugoCalculator.cpp
View file @
fd595190
...
...
@@ -28,7 +28,8 @@
HugoCalculator
::
HugoCalculator
(
const
NdbDictionary
::
Table
&
tab
)
:
m_tab
(
tab
)
{
// The "id" column of this table is found in the first integer column
for
(
int
i
=
0
;
i
<
m_tab
.
getNoOfColumns
();
i
++
){
int
i
;
for
(
i
=
0
;
i
<
m_tab
.
getNoOfColumns
();
i
++
){
const
NdbDictionary
::
Column
*
attr
=
m_tab
.
getColumn
(
i
);
if
(
attr
->
getType
()
==
NdbDictionary
::
Column
::
Unsigned
){
m_idCol
=
i
;
...
...
@@ -37,7 +38,7 @@ HugoCalculator::HugoCalculator(const NdbDictionary::Table& tab) : m_tab(tab) {
}
// The "number of updates" column for this table is found in the last column
for
(
i
nt
i
=
m_tab
.
getNoOfColumns
()
-
1
;
i
>=
0
;
i
--
){
for
(
i
=
m_tab
.
getNoOfColumns
()
-
1
;
i
>=
0
;
i
--
){
const
NdbDictionary
::
Column
*
attr
=
m_tab
.
getColumn
(
i
);
if
(
attr
->
getType
()
==
NdbDictionary
::
Column
::
Unsigned
){
m_updatesCol
=
i
;
...
...
@@ -102,7 +103,8 @@ HugoCalculator::calcValue(int record,
// Fill buf with some pattern so that we can detect
// anomalies in the area that we don't fill with chars
for
(
int
i
=
0
;
i
<
attr
->
getLength
();
i
++
)
int
i
;
for
(
i
=
0
;
i
<
attr
->
getLength
();
i
++
)
buf
[
i
]
=
((
i
+
2
)
%
255
);
// Calculate length of the string to create. We want the string
...
...
@@ -116,7 +118,7 @@ HugoCalculator::calcValue(int record,
else
len
++
;
}
for
(
i
nt
i
=
0
;
i
<
len
;
i
++
)
for
(
i
=
0
;
i
<
len
;
i
++
)
buf
[
i
]
=
a
[((
val
^
i
)
%
25
)];
buf
[
len
]
=
0
;
}
...
...
ndb/test/src/NDBT_Tables.cpp
View file @
fd595190
...
...
@@ -678,17 +678,18 @@ NdbDictionary::Table*
NDBT_Tables
::
getTable
(
const
char
*
_nam
){
// Search tables list to find a table
NDBT_Table
*
tab
=
NULL
;
for
(
int
i
=
0
;
i
<
numTestTables
;
i
++
){
int
i
;
for
(
i
=
0
;
i
<
numTestTables
;
i
++
){
if
(
strcmp
(
test_tables
[
i
]
->
getName
(),
_nam
)
==
0
){
return
test_tables
[
i
];
}
}
for
(
i
nt
i
=
0
;
i
<
numFailTables
;
i
++
){
for
(
i
=
0
;
i
<
numFailTables
;
i
++
){
if
(
strcmp
(
fail_tables
[
i
]
->
getName
(),
_nam
)
==
0
){
return
fail_tables
[
i
];
}
}
for
(
i
nt
i
=
0
;
i
<
numUtilTables
;
i
++
){
for
(
i
=
0
;
i
<
numUtilTables
;
i
++
){
if
(
strcmp
(
util_tables
[
i
]
->
getName
(),
_nam
)
==
0
){
return
util_tables
[
i
];
}
...
...
ndb/test/src/NDBT_Test.cpp
View file @
fd595190
...
...
@@ -336,24 +336,24 @@ NDBT_TestCaseImpl1::NDBT_TestCaseImpl1(NDBT_TestSuite* psuite,
NDBT_TestCaseImpl1
::~
NDBT_TestCaseImpl1
(){
NdbCondition_Destroy
(
waitThreadsCondPtr
);
NdbMutex_Destroy
(
waitThreadsMutexPtr
);
for
(
size_t
i
=
0
;
i
<
initializers
.
size
();
i
++
)
size_t
i
;
for
(
i
=
0
;
i
<
initializers
.
size
();
i
++
)
delete
initializers
[
i
];
initializers
.
clear
();
for
(
size_t
i
=
0
;
i
<
verifiers
.
size
();
i
++
)
for
(
i
=
0
;
i
<
verifiers
.
size
();
i
++
)
delete
verifiers
[
i
];
verifiers
.
clear
();
for
(
size_t
i
=
0
;
i
<
finalizers
.
size
();
i
++
)
for
(
i
=
0
;
i
<
finalizers
.
size
();
i
++
)
delete
finalizers
[
i
];
finalizers
.
clear
();
for
(
size_t
i
=
0
;
i
<
steps
.
size
();
i
++
)
for
(
i
=
0
;
i
<
steps
.
size
();
i
++
)
delete
steps
[
i
];
steps
.
clear
();
results
.
clear
();
for
(
size_t
i
=
0
;
i
<
testTables
.
size
();
i
++
)
for
(
i
=
0
;
i
<
testTables
.
size
();
i
++
)
delete
testTables
[
i
];
testTables
.
clear
();
for
(
size_t
i
=
0
;
i
<
testResults
.
size
();
i
++
)
for
(
i
=
0
;
i
<
testResults
.
size
();
i
++
)
delete
testResults
[
i
];
testResults
.
clear
();
...
...
@@ -487,7 +487,8 @@ void NDBT_TestCaseImpl1::waitSteps(){
waitThreadsMutexPtr
);
unsigned
completedSteps
=
0
;
for
(
unsigned
i
=
0
;
i
<
steps
.
size
();
i
++
){
unsigned
i
;
for
(
i
=
0
;
i
<
steps
.
size
();
i
++
){
if
(
results
[
i
]
!=
NORESULT
){
completedSteps
++
;
if
(
results
[
i
]
==
NDBT_OK
)
...
...
@@ -501,7 +502,7 @@ void NDBT_TestCaseImpl1::waitSteps(){
NdbMutex_Unlock
(
waitThreadsMutexPtr
);
void
*
status
;
for
(
unsigned
i
=
0
;
i
<
steps
.
size
();
i
++
){
for
(
i
=
0
;
i
<
steps
.
size
();
i
++
){
NdbThread_WaitFor
(
threads
[
i
],
&
status
);
NdbThread_Destroy
(
&
threads
[
i
]);
}
...
...
@@ -633,12 +634,12 @@ int NDBT_TestCaseImpl1::runSteps(NDBT_Context* ctx){
numStepsOk
=
0
;
numStepsFail
=
0
;
numStepsCompleted
=
0
;
for
(
unsigned
i
=
0
;
i
<
steps
.
size
();
i
++
)
unsigned
i
;
for
(
i
=
0
;
i
<
steps
.
size
();
i
++
)
startStepInThread
(
i
,
ctx
);
waitSteps
();
for
(
unsigned
i
=
0
;
i
<
steps
.
size
();
i
++
)
for
(
i
=
0
;
i
<
steps
.
size
();
i
++
)
if
(
results
[
i
]
!=
NDBT_OK
)
res
=
NDBT_FAILED
;
return
res
;
...
...
@@ -1091,20 +1092,20 @@ void NDBT_TestCaseImpl1::print(){
abort
();
}
}
for
(
unsigned
i
=
0
;
i
<
initializers
.
size
();
i
++
){
unsigned
i
;
for
(
i
=
0
;
i
<
initializers
.
size
();
i
++
){
ndbout
<<
"Initializers["
<<
i
<<
"]: "
<<
endl
;
initializers
[
i
]
->
print
();
}
for
(
unsigned
i
=
0
;
i
<
steps
.
size
();
i
++
){
for
(
i
=
0
;
i
<
steps
.
size
();
i
++
){
ndbout
<<
"Step["
<<
i
<<
"]: "
<<
endl
;
steps
[
i
]
->
print
();
}
for
(
unsigned
i
=
0
;
i
<
verifiers
.
size
();
i
++
){
for
(
i
=
0
;
i
<
verifiers
.
size
();
i
++
){
ndbout
<<
"Verifier["
<<
i
<<
"]: "
<<
endl
;
verifiers
[
i
]
->
print
();
}
for
(
unsigned
i
=
0
;
i
<
finalizers
.
size
();
i
++
){
for
(
i
=
0
;
i
<
finalizers
.
size
();
i
++
){
ndbout
<<
"Finalizer["
<<
i
<<
"]: "
<<
endl
;
finalizers
[
i
]
->
print
();
}
...
...
ndb/tools/waiter.cpp
View file @
fd595190
...
...
@@ -121,7 +121,8 @@ getStatus(){
retries
++
;
continue
;
}
for
(
int
i
=
0
;
i
<
status
->
no_of_nodes
;
i
++
){
int
count
=
status
->
no_of_nodes
;
for
(
int
i
=
0
;
i
<
count
;
i
++
){
node
=
&
status
->
node_states
[
i
];
switch
(
node
->
node_type
){
case
NDB_MGM_NODE_TYPE_NDB
:
...
...
@@ -142,7 +143,7 @@ getStatus(){
apiNodes
.
clear
();
free
(
status
);
status
=
NULL
;
i
=
status
->
no_of_nodes
;
count
=
0
;
ndbout
<<
"kalle"
<<
endl
;
break
;
...
...
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