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
f51e0904
Commit
f51e0904
authored
Feb 10, 2005
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adopted test scripts
parent
5af87424
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
36 deletions
+52
-36
ndb/src/ndbapi/NdbDictionaryImpl.cpp
ndb/src/ndbapi/NdbDictionaryImpl.cpp
+33
-19
ndb/test/ndbapi/testDict.cpp
ndb/test/ndbapi/testDict.cpp
+16
-14
ndb/test/run-test/16node-tests.txt
ndb/test/run-test/16node-tests.txt
+1
-1
ndb/test/run-test/basic.txt
ndb/test/run-test/basic.txt
+1
-1
ndb/test/run-test/daily-basic-tests.txt
ndb/test/run-test/daily-basic-tests.txt
+1
-1
No files found.
ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
f51e0904
...
...
@@ -192,37 +192,38 @@ NdbColumnImpl::~NdbColumnImpl()
bool
NdbColumnImpl
::
equal
(
const
NdbColumnImpl
&
col
)
const
{
DBUG_ENTER
(
"NdbColumnImpl::equal"
);
if
(
strcmp
(
m_name
.
c_str
(),
col
.
m_name
.
c_str
())
!=
0
){
return
false
;
DBUG_RETURN
(
false
)
;
}
if
(
m_type
!=
col
.
m_type
){
return
false
;
DBUG_RETURN
(
false
)
;
}
if
(
m_pk
!=
col
.
m_pk
){
return
false
;
DBUG_RETURN
(
false
)
;
}
if
(
m_nullable
!=
col
.
m_nullable
){
return
false
;
DBUG_RETURN
(
false
)
;
}
if
(
m_pk
){
if
(
m_distributionKey
!=
col
.
m_distributionKey
){
return
false
;
DBUG_RETURN
(
false
)
;
}
}
if
(
m_precision
!=
col
.
m_precision
||
m_scale
!=
col
.
m_scale
||
m_length
!=
col
.
m_length
||
m_cs
!=
col
.
m_cs
)
{
return
false
;
DBUG_RETURN
(
false
)
;
}
if
(
m_autoIncrement
!=
col
.
m_autoIncrement
){
return
false
;
DBUG_RETURN
(
false
)
;
}
if
(
strcmp
(
m_defaultValue
.
c_str
(),
col
.
m_defaultValue
.
c_str
())
!=
0
){
return
false
;
DBUG_RETURN
(
false
)
;
}
return
true
;
DBUG_RETURN
(
true
)
;
}
NdbDictionary
::
Column
*
...
...
@@ -314,49 +315,62 @@ NdbTableImpl::init(){
bool
NdbTableImpl
::
equal
(
const
NdbTableImpl
&
obj
)
const
{
DBUG_ENTER
(
"NdbTableImpl::equal"
);
if
((
m_internalName
.
c_str
()
==
NULL
)
||
(
strcmp
(
m_internalName
.
c_str
(),
""
)
==
0
)
||
(
obj
.
m_internalName
.
c_str
()
==
NULL
)
||
(
strcmp
(
obj
.
m_internalName
.
c_str
(),
""
)
==
0
))
{
// Shallow equal
if
(
strcmp
(
getName
(),
obj
.
getName
())
!=
0
){
return
false
;
DBUG_PRINT
(
"info"
,(
"name %s != %s"
,
getName
(),
obj
.
getName
()));
DBUG_RETURN
(
false
);
}
}
else
// Deep equal
if
(
strcmp
(
m_internalName
.
c_str
(),
obj
.
m_internalName
.
c_str
())
!=
0
){
return
false
;
{
DBUG_PRINT
(
"info"
,(
"m_internalName %s != %s"
,
m_internalName
.
c_str
(),
obj
.
m_internalName
.
c_str
()));
DBUG_RETURN
(
false
);
}
}
if
(
m_fragmentType
!=
obj
.
m_fragmentType
){
return
false
;
DBUG_PRINT
(
"info"
,(
"m_fragmentType %d != %d"
,
m_fragmentType
,
obj
.
m_fragmentType
));
DBUG_RETURN
(
false
);
}
if
(
m_columns
.
size
()
!=
obj
.
m_columns
.
size
()){
return
false
;
DBUG_PRINT
(
"info"
,(
"m_columns.size %d != %d"
,
m_columns
.
size
(),
obj
.
m_columns
.
size
()));
DBUG_RETURN
(
false
);
}
for
(
unsigned
i
=
0
;
i
<
obj
.
m_columns
.
size
();
i
++
){
if
(
!
m_columns
[
i
]
->
equal
(
*
obj
.
m_columns
[
i
])){
return
false
;
DBUG_PRINT
(
"info"
,(
"m_columns [%d] != [%d]"
,
i
,
i
));
DBUG_RETURN
(
false
);
}
}
if
(
m_logging
!=
obj
.
m_logging
){
return
false
;
DBUG_PRINT
(
"info"
,(
"m_logging %d != %d"
,
m_logging
,
obj
.
m_logging
));
DBUG_RETURN
(
false
);
}
if
(
m_kvalue
!=
obj
.
m_kvalue
){
return
false
;
DBUG_PRINT
(
"info"
,(
"m_kvalue %d != %d"
,
m_kvalue
,
obj
.
m_kvalue
));
DBUG_RETURN
(
false
);
}
if
(
m_minLoadFactor
!=
obj
.
m_minLoadFactor
){
return
false
;
DBUG_PRINT
(
"info"
,(
"m_minLoadFactor %d != %d"
,
m_minLoadFactor
,
obj
.
m_minLoadFactor
));
DBUG_RETURN
(
false
);
}
if
(
m_maxLoadFactor
!=
obj
.
m_maxLoadFactor
){
return
false
;
DBUG_PRINT
(
"info"
,(
"m_maxLoadFactor %d != %d"
,
m_maxLoadFactor
,
obj
.
m_maxLoadFactor
));
DBUG_RETURN
(
false
);
}
return
true
;
DBUG_RETURN
(
true
)
;
}
void
...
...
ndb/test/ndbapi/testDict.cpp
View file @
f51e0904
...
...
@@ -534,13 +534,6 @@ int runTestFragmentTypes(NDBT_Context* ctx, NDBT_Step* step){
int
result
=
NDBT_OK
;
NdbRestarter
restarter
;
// enum FragmentType {
// Unknown = 0,
// Single = 1, ///< Only one fragment
// All = 2, ///< Default value. One fragment per node group
// AllLarge = 3 ///< Sixten fragments per node group.
// };
if
(
pNdb
->
waitUntilReady
(
30
)
!=
0
){
// Db is not ready, return with failure
return
NDBT_FAILED
;
...
...
@@ -575,13 +568,17 @@ int runTestFragmentTypes(NDBT_Context* ctx, NDBT_Step* step){
result
=
NDBT_FAILED
;
goto
drop_the_tab
;
}
/**
This test does not work since fragmentation is
decided by the kernel, hence the fragementation
attribute on the column will differ
if (newTab.equal(*pTab3) == false){
ndbout << "It was not equal" << endl;
result = NDBT_FAILED;
goto drop_the_tab;
}
*/
do
{
HugoTransactions
hugoTrans
(
*
pTab3
);
...
...
@@ -1598,17 +1595,22 @@ TESTCASE("CreateTableWhenDbIsFull",
}
TESTCASE
(
"FragmentTypeSingle"
,
"Create the table with fragment type Single
\n
"
){
TC_PROPERTY
(
"FragmentType"
,
1
);
TC_PROPERTY
(
"FragmentType"
,
NdbDictionary
::
Table
::
FragSingle
);
INITIALIZER
(
runTestFragmentTypes
);
}
TESTCASE
(
"FragmentTypeAllSmall"
,
"Create the table with fragment type AllSmall
\n
"
){
TC_PROPERTY
(
"FragmentType"
,
NdbDictionary
::
Table
::
FragAllSmall
);
INITIALIZER
(
runTestFragmentTypes
);
}
TESTCASE
(
"FragmentTypeAll"
,
"Create the table with fragment type All
\n
"
){
TC_PROPERTY
(
"FragmentType"
,
2
);
TESTCASE
(
"FragmentTypeAll
Medium
"
,
"Create the table with fragment type All
Medium
\n
"
){
TC_PROPERTY
(
"FragmentType"
,
NdbDictionary
::
Table
::
FragAllMedium
);
INITIALIZER
(
runTestFragmentTypes
);
}
TESTCASE
(
"FragmentTypeAllLarge"
,
"Create the table with fragment type AllLarge
\n
"
){
TC_PROPERTY
(
"FragmentType"
,
3
);
TC_PROPERTY
(
"FragmentType"
,
NdbDictionary
::
Table
::
FragAllLarge
);
INITIALIZER
(
runTestFragmentTypes
);
}
TESTCASE
(
"TemporaryTables"
,
...
...
ndb/test/run-test/16node-tests.txt
View file @
f51e0904
...
...
@@ -377,7 +377,7 @@ args: -n FragmentTypeSingle T1
max-time: 1500
cmd: testDict
args: -n FragmentTypeAll T1 T6 T7 T8
args: -n FragmentTypeAll
Small
T1 T6 T7 T8
max-time: 1500
cmd: testDict
...
...
ndb/test/run-test/basic.txt
View file @
f51e0904
...
...
@@ -374,7 +374,7 @@ args: -n FragmentTypeSingle T1
max-time: 1500
cmd: testDict
args: -n FragmentTypeAll T1 T6 T7 T8
args: -n FragmentTypeAll
Small
T1 T6 T7 T8
max-time: 1500
cmd: testDict
...
...
ndb/test/run-test/daily-basic-tests.txt
View file @
f51e0904
...
...
@@ -393,7 +393,7 @@ args: -n FragmentTypeSingle T1
max-time: 1500
cmd: testDict
args: -n FragmentTypeAll T1 T6 T7 T8
args: -n FragmentTypeAll
Small
T1 T6 T7 T8
max-time: 1500
cmd: testDict
...
...
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