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
b439d7f1
Commit
b439d7f1
authored
Dec 14, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wl2240 - ndb partitioning,
fix scan take over
parent
45ca289e
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
117 deletions
+21
-117
ndb/include/kernel/AttributeDescriptor.hpp
ndb/include/kernel/AttributeDescriptor.hpp
+1
-36
ndb/include/kernel/signaldata/DictTabInfo.hpp
ndb/include/kernel/signaldata/DictTabInfo.hpp
+18
-45
ndb/src/common/debugger/signaldata/DictTabInfo.cpp
ndb/src/common/debugger/signaldata/DictTabInfo.cpp
+0
-14
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+0
-14
ndb/src/kernel/vm/MetaData.hpp
ndb/src/kernel/vm/MetaData.hpp
+0
-6
ndb/src/ndbapi/NdbDictionaryImpl.cpp
ndb/src/ndbapi/NdbDictionaryImpl.cpp
+0
-2
ndb/src/ndbapi/NdbScanOperation.cpp
ndb/src/ndbapi/NdbScanOperation.cpp
+2
-0
No files found.
ndb/include/kernel/AttributeDescriptor.hpp
View file @
b439d7f1
...
@@ -33,7 +33,6 @@ private:
...
@@ -33,7 +33,6 @@ private:
static
void
setDGroup
(
Uint32
&
,
Uint32
dgroup
);
static
void
setDGroup
(
Uint32
&
,
Uint32
dgroup
);
static
void
setDKey
(
Uint32
&
,
Uint32
dkey
);
static
void
setDKey
(
Uint32
&
,
Uint32
dkey
);
static
void
setPrimaryKey
(
Uint32
&
,
Uint32
dkey
);
static
void
setPrimaryKey
(
Uint32
&
,
Uint32
dkey
);
static
void
setStoredInTup
(
Uint32
&
,
Uint32
storedInTup
);
static
void
setDynamic
(
Uint32
&
,
Uint32
dynamicInd
);
static
void
setDynamic
(
Uint32
&
,
Uint32
dynamicInd
);
static
Uint32
getType
(
const
Uint32
&
);
static
Uint32
getType
(
const
Uint32
&
);
...
@@ -44,10 +43,8 @@ private:
...
@@ -44,10 +43,8 @@ private:
static
Uint32
getArraySize
(
const
Uint32
&
);
static
Uint32
getArraySize
(
const
Uint32
&
);
static
Uint32
getOriginal
(
const
Uint32
&
);
static
Uint32
getOriginal
(
const
Uint32
&
);
static
Uint32
getNullable
(
const
Uint32
&
);
static
Uint32
getNullable
(
const
Uint32
&
);
static
Uint32
getDGroup
(
const
Uint32
&
);
static
Uint32
getDKey
(
const
Uint32
&
);
static
Uint32
getDKey
(
const
Uint32
&
);
static
Uint32
getPrimaryKey
(
const
Uint32
&
);
static
Uint32
getPrimaryKey
(
const
Uint32
&
);
static
Uint32
getStoredInTup
(
const
Uint32
&
);
static
Uint32
getDynamic
(
const
Uint32
&
);
static
Uint32
getDynamic
(
const
Uint32
&
);
};
};
...
@@ -58,18 +55,15 @@ private:
...
@@ -58,18 +55,15 @@ private:
* s = Attribute size - 3 Bits -> Max 7 (Bit 4-6)
* s = Attribute size - 3 Bits -> Max 7 (Bit 4-6)
* o = Original attribute - 1 Bit 7
* o = Original attribute - 1 Bit 7
* n = Nullable - 1 Bit 8
* n = Nullable - 1 Bit 8
* ? = Stored in tup - 1 Bit 9
* d = Disk based - 1 Bit 10
* d = Disk based - 1 Bit 10
* g = Distribution Group Ind- 1 Bit 11
* k = Distribution Key Ind - 1 Bit 12
* k = Distribution Key Ind - 1 Bit 12
* r = Distribution group sz - 1 Bit 13
* p = Primary key attribute - 1 Bit 14
* p = Primary key attribute - 1 Bit 14
* y = Dynamic attribute - 1 Bit 15
* y = Dynamic attribute - 1 Bit 15
* z = Array size - 16 Bits -> Max 65535 (Bit 16-31)
* z = Array size - 16 Bits -> Max 65535 (Bit 16-31)
*
*
* 1111111111222222222233
* 1111111111222222222233
* 01234567890123456789012345678901
* 01234567890123456789012345678901
* aattsss n d
gkr
pyzzzzzzzzzzzzzzzz
* aattsss n d
k
pyzzzzzzzzzzzzzzzz
*
*
*/
*/
...
@@ -89,11 +83,8 @@ private:
...
@@ -89,11 +83,8 @@ private:
#define AD_ORIGINAL_SHIFT (8)
#define AD_ORIGINAL_SHIFT (8)
#define AD_NULLABLE_SHIFT (8)
#define AD_NULLABLE_SHIFT (8)
#define AD_TUP_STORED_SHIFT (9)
#define AD_DISTR_GROUP_SHIFT (11)
#define AD_DISTR_KEY_SHIFT (12)
#define AD_DISTR_KEY_SHIFT (12)
#define AD_DISTR_GROUP_SZ (13)
#define AD_PRIMARY_KEY (14)
#define AD_PRIMARY_KEY (14)
#define AD_DYNAMIC (15)
#define AD_DYNAMIC (15)
...
@@ -140,13 +131,6 @@ AttributeDescriptor::setOriginal(Uint32 & desc, Uint32 original){
...
@@ -140,13 +131,6 @@ AttributeDescriptor::setOriginal(Uint32 & desc, Uint32 original){
desc
|=
(
original
<<
AD_ORIGINAL_SHIFT
);
desc
|=
(
original
<<
AD_ORIGINAL_SHIFT
);
}
}
inline
void
AttributeDescriptor
::
setDGroup
(
Uint32
&
desc
,
Uint32
dgroup
){
ASSERT_BOOL
(
dgroup
,
"AttributeDescriptor::setDGroup"
);
desc
|=
(
dgroup
<<
AD_DISTR_GROUP_SHIFT
);
}
inline
inline
void
void
AttributeDescriptor
::
setDKey
(
Uint32
&
desc
,
Uint32
dkey
){
AttributeDescriptor
::
setDKey
(
Uint32
&
desc
,
Uint32
dkey
){
...
@@ -161,13 +145,6 @@ AttributeDescriptor::setPrimaryKey(Uint32 & desc, Uint32 dkey){
...
@@ -161,13 +145,6 @@ AttributeDescriptor::setPrimaryKey(Uint32 & desc, Uint32 dkey){
desc
|=
(
dkey
<<
AD_PRIMARY_KEY
);
desc
|=
(
dkey
<<
AD_PRIMARY_KEY
);
}
}
inline
void
AttributeDescriptor
::
setStoredInTup
(
Uint32
&
desc
,
Uint32
storedInTup
){
ASSERT_BOOL
(
storedInTup
,
"AttributeDescriptor::setStoredInTup"
);
desc
|=
(
storedInTup
<<
AD_TUP_STORED_SHIFT
);
}
inline
inline
void
void
AttributeDescriptor
::
setDynamic
(
Uint32
&
desc
,
Uint32
dynamic
){
AttributeDescriptor
::
setDynamic
(
Uint32
&
desc
,
Uint32
dynamic
){
...
@@ -229,12 +206,6 @@ AttributeDescriptor::getOriginal(const Uint32 & desc){
...
@@ -229,12 +206,6 @@ AttributeDescriptor::getOriginal(const Uint32 & desc){
return
(
desc
>>
AD_ORIGINAL_SHIFT
)
&
1
;
return
(
desc
>>
AD_ORIGINAL_SHIFT
)
&
1
;
}
}
inline
Uint32
AttributeDescriptor
::
getDGroup
(
const
Uint32
&
desc
){
return
(
desc
>>
AD_DISTR_GROUP_SHIFT
)
&
1
;
}
inline
inline
Uint32
Uint32
AttributeDescriptor
::
getDKey
(
const
Uint32
&
desc
){
AttributeDescriptor
::
getDKey
(
const
Uint32
&
desc
){
...
@@ -253,10 +224,4 @@ AttributeDescriptor::getDynamic(const Uint32 & desc){
...
@@ -253,10 +224,4 @@ AttributeDescriptor::getDynamic(const Uint32 & desc){
return
(
desc
>>
AD_DYNAMIC
)
&
1
;
return
(
desc
>>
AD_DYNAMIC
)
&
1
;
}
}
inline
Uint32
AttributeDescriptor
::
getStoredInTup
(
const
Uint32
&
desc
){
return
(
desc
>>
AD_TUP_STORED_SHIFT
)
&
1
;
}
#endif
#endif
ndb/include/kernel/signaldata/DictTabInfo.hpp
View file @
b439d7f1
...
@@ -85,10 +85,6 @@ public:
...
@@ -85,10 +85,6 @@ public:
MaxLoadFactor
=
11
,
//Default 80
MaxLoadFactor
=
11
,
//Default 80
KeyLength
=
12
,
//Default 1 (No of words in primary key)
KeyLength
=
12
,
//Default 1 (No of words in primary key)
FragmentTypeVal
=
13
,
//Default AllNodesSmallTable
FragmentTypeVal
=
13
,
//Default AllNodesSmallTable
TableStorageVal
=
14
,
//Default StorageType::MainMemory
ScanOptimised
=
15
,
//Default updateOptimised
FragmentKeyTypeVal
=
16
,
//Default PrimaryKey
SecondTableId
=
17
,
//Mandatory between DICT's otherwise not allowed
TableTypeVal
=
18
,
//Default TableType::UserTable
TableTypeVal
=
18
,
//Default TableType::UserTable
PrimaryTable
=
19
,
//Mandatory for index otherwise RNIL
PrimaryTable
=
19
,
//Mandatory for index otherwise RNIL
PrimaryTableId
=
20
,
//ditto
PrimaryTableId
=
20
,
//ditto
...
@@ -110,10 +106,7 @@ public:
...
@@ -110,10 +106,7 @@ public:
AttributeKeyFlag
=
1006
,
//Default noKey
AttributeKeyFlag
=
1006
,
//Default noKey
AttributeStorage
=
1007
,
//Default MainMemory
AttributeStorage
=
1007
,
//Default MainMemory
AttributeNullableFlag
=
1008
,
//Default NotNullable
AttributeNullableFlag
=
1008
,
//Default NotNullable
AttributeDGroup
=
1009
,
//Default NotDGroup
AttributeDKey
=
1010
,
//Default NotDKey
AttributeDKey
=
1010
,
//Default NotDKey
AttributeStoredInd
=
1011
,
//Default NotStored
AttributeGroup
=
1012
,
//Default 0
AttributeExtType
=
1013
,
//Default 0 (undefined)
AttributeExtType
=
1013
,
//Default 0 (undefined)
AttributeExtPrecision
=
1014
,
//Default 0
AttributeExtPrecision
=
1014
,
//Default 0
AttributeExtScale
=
1015
,
//Default 0
AttributeExtScale
=
1015
,
//Default 0
...
@@ -127,12 +120,7 @@ public:
...
@@ -127,12 +120,7 @@ public:
// have a default value. Thus the default values are part of the protocol.
// have a default value. Thus the default values are part of the protocol.
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
// FragmentKeyType constants
enum
FragmentKeyType
{
PrimaryKey
=
0
,
DistributionKey
=
1
,
DistributionGroup
=
2
};
// FragmentType constants
// FragmentType constants
enum
FragmentType
{
enum
FragmentType
{
...
@@ -142,12 +130,6 @@ public:
...
@@ -142,12 +130,6 @@ public:
SingleFragment
=
3
SingleFragment
=
3
};
};
// TableStorage AND AttributeStorage constants
enum
StorageType
{
MainMemory
=
0
,
DiskMemory
=
1
};
// TableType constants + objects
// TableType constants + objects
enum
TableType
{
enum
TableType
{
UndefTableType
=
0
,
UndefTableType
=
0
,
...
@@ -219,10 +201,6 @@ public:
...
@@ -219,10 +201,6 @@ public:
StorePermanent
=
2
StorePermanent
=
2
};
};
// ScanOptimised constants
STATIC_CONST
(
updateOptimised
=
0
);
STATIC_CONST
(
scanOptimised
=
1
);
// AttributeType constants
// AttributeType constants
STATIC_CONST
(
SignedType
=
0
);
STATIC_CONST
(
SignedType
=
0
);
STATIC_CONST
(
UnSignedType
=
1
);
STATIC_CONST
(
UnSignedType
=
1
);
...
@@ -237,23 +215,10 @@ public:
...
@@ -237,23 +215,10 @@ public:
STATIC_CONST
(
a64Bit
=
6
);
STATIC_CONST
(
a64Bit
=
6
);
STATIC_CONST
(
a128Bit
=
7
);
STATIC_CONST
(
a128Bit
=
7
);
// AttributeDGroup constants
STATIC_CONST
(
NotDGroup
=
0
);
STATIC_CONST
(
DGroup
=
1
);
// AttributeDKey constants
STATIC_CONST
(
NotDKey
=
0
);
STATIC_CONST
(
DKey
=
1
);
// AttributeStoredInd constants
STATIC_CONST
(
NotStored
=
0
);
STATIC_CONST
(
Stored
=
1
);
// Table data interpretation
// Table data interpretation
struct
Table
{
struct
Table
{
char
TableName
[
MAX_TAB_NAME_SIZE
];
char
TableName
[
MAX_TAB_NAME_SIZE
];
Uint32
TableId
;
Uint32
TableId
;
Uint32
SecondTableId
;
char
PrimaryTable
[
MAX_TAB_NAME_SIZE
];
// Only used when "index"
char
PrimaryTable
[
MAX_TAB_NAME_SIZE
];
// Only used when "index"
Uint32
PrimaryTableId
;
Uint32
PrimaryTableId
;
Uint32
TableLoggedFlag
;
Uint32
TableLoggedFlag
;
...
@@ -267,8 +232,6 @@ public:
...
@@ -267,8 +232,6 @@ public:
Uint32
KeyLength
;
Uint32
KeyLength
;
Uint32
FragmentType
;
Uint32
FragmentType
;
Uint32
TableStorage
;
Uint32
TableStorage
;
Uint32
ScanOptimised
;
Uint32
FragmentKeyType
;
Uint32
TableType
;
Uint32
TableType
;
Uint32
TableVersion
;
Uint32
TableVersion
;
Uint32
IndexState
;
Uint32
IndexState
;
...
@@ -323,12 +286,8 @@ public:
...
@@ -323,12 +286,8 @@ public:
Uint32
AttributeSize
;
Uint32
AttributeSize
;
Uint32
AttributeArraySize
;
Uint32
AttributeArraySize
;
Uint32
AttributeKeyFlag
;
Uint32
AttributeKeyFlag
;
Uint32
AttributeStorage
;
Uint32
AttributeNullableFlag
;
Uint32
AttributeNullableFlag
;
Uint32
AttributeDGroup
;
Uint32
AttributeDKey
;
Uint32
AttributeDKey
;
Uint32
AttributeStoredInd
;
Uint32
AttributeGroup
;
Uint32
AttributeExtType
;
Uint32
AttributeExtType
;
Uint32
AttributeExtPrecision
;
Uint32
AttributeExtPrecision
;
Uint32
AttributeExtScale
;
Uint32
AttributeExtScale
;
...
@@ -460,9 +419,7 @@ public:
...
@@ -460,9 +419,7 @@ public:
fprintf
(
out
,
"AttributeKeyFlag = %d
\n
"
,
AttributeKeyFlag
);
fprintf
(
out
,
"AttributeKeyFlag = %d
\n
"
,
AttributeKeyFlag
);
fprintf
(
out
,
"AttributeStorage = %d
\n
"
,
AttributeStorage
);
fprintf
(
out
,
"AttributeStorage = %d
\n
"
,
AttributeStorage
);
fprintf
(
out
,
"AttributeNullableFlag = %d
\n
"
,
AttributeNullableFlag
);
fprintf
(
out
,
"AttributeNullableFlag = %d
\n
"
,
AttributeNullableFlag
);
fprintf
(
out
,
"AttributeDGroup = %d
\n
"
,
AttributeDGroup
);
fprintf
(
out
,
"AttributeDKey = %d
\n
"
,
AttributeDKey
);
fprintf
(
out
,
"AttributeDKey = %d
\n
"
,
AttributeDKey
);
fprintf
(
out
,
"AttributeStoredInd = %d
\n
"
,
AttributeStoredInd
);
fprintf
(
out
,
"AttributeGroup = %d
\n
"
,
AttributeGroup
);
fprintf
(
out
,
"AttributeGroup = %d
\n
"
,
AttributeGroup
);
fprintf
(
out
,
"AttributeAutoIncrement = %d
\n
"
,
AttributeAutoIncrement
);
fprintf
(
out
,
"AttributeAutoIncrement = %d
\n
"
,
AttributeAutoIncrement
);
fprintf
(
out
,
"AttributeExtType = %d
\n
"
,
AttributeExtType
);
fprintf
(
out
,
"AttributeExtType = %d
\n
"
,
AttributeExtType
);
...
@@ -496,6 +453,22 @@ private:
...
@@ -496,6 +453,22 @@ private:
*/
*/
Uint32
tabInfoData
[
DataLength
];
Uint32
tabInfoData
[
DataLength
];
public:
enum
Depricated
{
AttributeDGroup
=
1009
,
//Default NotDGroup
AttributeStoredInd
=
1011
,
//Default NotStored
SecondTableId
=
17
,
//Mandatory between DICT's otherwise not allowed
FragmentKeyTypeVal
=
16
//Default PrimaryKey
};
enum
Unimplemented
{
TableStorageVal
=
14
,
//Default StorageType::MainMemory
ScanOptimised
=
15
,
//Default updateOptimised
AttributeGroup
=
1012
//Default 0
};
};
};
#endif
#endif
ndb/src/common/debugger/signaldata/DictTabInfo.cpp
View file @
b439d7f1
...
@@ -23,7 +23,6 @@ SimpleProperties::SP2StructMapping
...
@@ -23,7 +23,6 @@ SimpleProperties::SP2StructMapping
DictTabInfo
::
TableMapping
[]
=
{
DictTabInfo
::
TableMapping
[]
=
{
DTIMAPS
(
Table
,
TableName
,
TableName
,
0
,
MAX_TAB_NAME_SIZE
),
DTIMAPS
(
Table
,
TableName
,
TableName
,
0
,
MAX_TAB_NAME_SIZE
),
DTIMAP
(
Table
,
TableId
,
TableId
),
DTIMAP
(
Table
,
TableId
,
TableId
),
DTIMAP
(
Table
,
SecondTableId
,
SecondTableId
),
DTIMAPS
(
Table
,
PrimaryTable
,
PrimaryTable
,
0
,
MAX_TAB_NAME_SIZE
),
DTIMAPS
(
Table
,
PrimaryTable
,
PrimaryTable
,
0
,
MAX_TAB_NAME_SIZE
),
DTIMAP
(
Table
,
PrimaryTableId
,
PrimaryTableId
),
DTIMAP
(
Table
,
PrimaryTableId
,
PrimaryTableId
),
DTIMAP2
(
Table
,
TableLoggedFlag
,
TableLoggedFlag
,
0
,
1
),
DTIMAP2
(
Table
,
TableLoggedFlag
,
TableLoggedFlag
,
0
,
1
),
...
@@ -32,8 +31,6 @@ DictTabInfo::TableMapping[] = {
...
@@ -32,8 +31,6 @@ DictTabInfo::TableMapping[] = {
DTIMAP2
(
Table
,
MaxLoadFactor
,
MaxLoadFactor
,
25
,
110
),
DTIMAP2
(
Table
,
MaxLoadFactor
,
MaxLoadFactor
,
25
,
110
),
DTIMAP2
(
Table
,
FragmentTypeVal
,
FragmentType
,
0
,
3
),
DTIMAP2
(
Table
,
FragmentTypeVal
,
FragmentType
,
0
,
3
),
DTIMAP2
(
Table
,
TableStorageVal
,
TableStorage
,
0
,
0
),
DTIMAP2
(
Table
,
TableStorageVal
,
TableStorage
,
0
,
0
),
DTIMAP2
(
Table
,
ScanOptimised
,
ScanOptimised
,
0
,
0
),
DTIMAP2
(
Table
,
FragmentKeyTypeVal
,
FragmentKeyType
,
0
,
2
),
DTIMAP2
(
Table
,
TableTypeVal
,
TableType
,
1
,
3
),
DTIMAP2
(
Table
,
TableTypeVal
,
TableType
,
1
,
3
),
DTIMAP
(
Table
,
NoOfKeyAttr
,
NoOfKeyAttr
),
DTIMAP
(
Table
,
NoOfKeyAttr
,
NoOfKeyAttr
),
DTIMAP2
(
Table
,
NoOfAttributes
,
NoOfAttributes
,
1
,
MAX_ATTRIBUTES_IN_TABLE
),
DTIMAP2
(
Table
,
NoOfAttributes
,
NoOfAttributes
,
1
,
MAX_ATTRIBUTES_IN_TABLE
),
...
@@ -66,12 +63,8 @@ DictTabInfo::AttributeMapping[] = {
...
@@ -66,12 +63,8 @@ DictTabInfo::AttributeMapping[] = {
DTIMAP2
(
Attribute
,
AttributeSize
,
AttributeSize
,
3
,
7
),
DTIMAP2
(
Attribute
,
AttributeSize
,
AttributeSize
,
3
,
7
),
DTIMAP2
(
Attribute
,
AttributeArraySize
,
AttributeArraySize
,
0
,
65535
),
DTIMAP2
(
Attribute
,
AttributeArraySize
,
AttributeArraySize
,
0
,
65535
),
DTIMAP2
(
Attribute
,
AttributeKeyFlag
,
AttributeKeyFlag
,
0
,
1
),
DTIMAP2
(
Attribute
,
AttributeKeyFlag
,
AttributeKeyFlag
,
0
,
1
),
DTIMAP2
(
Attribute
,
AttributeStorage
,
AttributeStorage
,
0
,
0
),
DTIMAP2
(
Attribute
,
AttributeNullableFlag
,
AttributeNullableFlag
,
0
,
1
),
DTIMAP2
(
Attribute
,
AttributeNullableFlag
,
AttributeNullableFlag
,
0
,
1
),
DTIMAP2
(
Attribute
,
AttributeDGroup
,
AttributeDGroup
,
0
,
1
),
DTIMAP2
(
Attribute
,
AttributeDKey
,
AttributeDKey
,
0
,
1
),
DTIMAP2
(
Attribute
,
AttributeDKey
,
AttributeDKey
,
0
,
1
),
DTIMAP2
(
Attribute
,
AttributeStoredInd
,
AttributeStoredInd
,
0
,
1
),
DTIMAP2
(
Attribute
,
AttributeGroup
,
AttributeGroup
,
0
,
0
),
DTIMAP
(
Attribute
,
AttributeExtType
,
AttributeExtType
),
DTIMAP
(
Attribute
,
AttributeExtType
,
AttributeExtType
),
DTIMAP
(
Attribute
,
AttributeExtPrecision
,
AttributeExtPrecision
),
DTIMAP
(
Attribute
,
AttributeExtPrecision
,
AttributeExtPrecision
),
DTIMAP
(
Attribute
,
AttributeExtScale
,
AttributeExtScale
),
DTIMAP
(
Attribute
,
AttributeExtScale
,
AttributeExtScale
),
...
@@ -104,7 +97,6 @@ void
...
@@ -104,7 +97,6 @@ void
DictTabInfo
::
Table
::
init
(){
DictTabInfo
::
Table
::
init
(){
memset
(
TableName
,
0
,
sizeof
(
TableName
));
//TableName[0] = 0;
memset
(
TableName
,
0
,
sizeof
(
TableName
));
//TableName[0] = 0;
TableId
=
~
0
;
TableId
=
~
0
;
SecondTableId
=
~
0
;
memset
(
PrimaryTable
,
0
,
sizeof
(
PrimaryTable
));
//PrimaryTable[0] = 0; // Only used when "index"
memset
(
PrimaryTable
,
0
,
sizeof
(
PrimaryTable
));
//PrimaryTable[0] = 0; // Only used when "index"
PrimaryTableId
=
RNIL
;
PrimaryTableId
=
RNIL
;
TableLoggedFlag
=
1
;
TableLoggedFlag
=
1
;
...
@@ -118,8 +110,6 @@ DictTabInfo::Table::init(){
...
@@ -118,8 +110,6 @@ DictTabInfo::Table::init(){
KeyLength
=
0
;
KeyLength
=
0
;
FragmentType
=
DictTabInfo
::
AllNodesSmallTable
;
FragmentType
=
DictTabInfo
::
AllNodesSmallTable
;
TableStorage
=
0
;
TableStorage
=
0
;
ScanOptimised
=
0
;
FragmentKeyType
=
DictTabInfo
::
PrimaryKey
;
TableType
=
DictTabInfo
::
UndefTableType
;
TableType
=
DictTabInfo
::
UndefTableType
;
TableVersion
=
0
;
TableVersion
=
0
;
IndexState
=
~
0
;
IndexState
=
~
0
;
...
@@ -140,12 +130,8 @@ DictTabInfo::Attribute::init(){
...
@@ -140,12 +130,8 @@ DictTabInfo::Attribute::init(){
AttributeSize
=
DictTabInfo
::
a32Bit
;
AttributeSize
=
DictTabInfo
::
a32Bit
;
AttributeArraySize
=
1
;
AttributeArraySize
=
1
;
AttributeKeyFlag
=
0
;
AttributeKeyFlag
=
0
;
AttributeStorage
=
1
;
AttributeNullableFlag
=
0
;
AttributeNullableFlag
=
0
;
AttributeDGroup
=
0
;
AttributeDKey
=
0
;
AttributeDKey
=
0
;
AttributeStoredInd
=
1
;
AttributeGroup
=
0
;
AttributeExtType
=
0
,
AttributeExtType
=
0
,
AttributeExtPrecision
=
0
,
AttributeExtPrecision
=
0
,
AttributeExtScale
=
0
,
AttributeExtScale
=
0
,
...
...
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
View file @
b439d7f1
...
@@ -256,7 +256,6 @@ Dbdict::packTableIntoPagesImpl(SimpleProperties::Writer & w,
...
@@ -256,7 +256,6 @@ Dbdict::packTableIntoPagesImpl(SimpleProperties::Writer & w,
w
.
add
(
DictTabInfo
::
MaxLoadFactor
,
tablePtr
.
p
->
maxLoadFactor
);
w
.
add
(
DictTabInfo
::
MaxLoadFactor
,
tablePtr
.
p
->
maxLoadFactor
);
w
.
add
(
DictTabInfo
::
TableKValue
,
tablePtr
.
p
->
kValue
);
w
.
add
(
DictTabInfo
::
TableKValue
,
tablePtr
.
p
->
kValue
);
w
.
add
(
DictTabInfo
::
FragmentTypeVal
,
tablePtr
.
p
->
fragmentType
);
w
.
add
(
DictTabInfo
::
FragmentTypeVal
,
tablePtr
.
p
->
fragmentType
);
w
.
add
(
DictTabInfo
::
FragmentKeyTypeVal
,
tablePtr
.
p
->
fragmentKeyType
);
w
.
add
(
DictTabInfo
::
TableTypeVal
,
tablePtr
.
p
->
tableType
);
w
.
add
(
DictTabInfo
::
TableTypeVal
,
tablePtr
.
p
->
tableType
);
w
.
add
(
DictTabInfo
::
FragmentCount
,
tablePtr
.
p
->
fragmentCount
);
w
.
add
(
DictTabInfo
::
FragmentCount
,
tablePtr
.
p
->
fragmentCount
);
...
@@ -289,17 +288,13 @@ Dbdict::packTableIntoPagesImpl(SimpleProperties::Writer & w,
...
@@ -289,17 +288,13 @@ Dbdict::packTableIntoPagesImpl(SimpleProperties::Writer & w,
const
Uint32
attrSize
=
AttributeDescriptor
::
getSize
(
desc
);
const
Uint32
attrSize
=
AttributeDescriptor
::
getSize
(
desc
);
const
Uint32
arraySize
=
AttributeDescriptor
::
getArraySize
(
desc
);
const
Uint32
arraySize
=
AttributeDescriptor
::
getArraySize
(
desc
);
const
Uint32
nullable
=
AttributeDescriptor
::
getNullable
(
desc
);
const
Uint32
nullable
=
AttributeDescriptor
::
getNullable
(
desc
);
const
Uint32
DGroup
=
AttributeDescriptor
::
getDGroup
(
desc
);
const
Uint32
DKey
=
AttributeDescriptor
::
getDKey
(
desc
);
const
Uint32
DKey
=
AttributeDescriptor
::
getDKey
(
desc
);
const
Uint32
attrStoredInd
=
AttributeDescriptor
::
getStoredInTup
(
desc
);
w
.
add
(
DictTabInfo
::
AttributeType
,
attrType
);
w
.
add
(
DictTabInfo
::
AttributeType
,
attrType
);
w
.
add
(
DictTabInfo
::
AttributeSize
,
attrSize
);
w
.
add
(
DictTabInfo
::
AttributeSize
,
attrSize
);
w
.
add
(
DictTabInfo
::
AttributeArraySize
,
arraySize
);
w
.
add
(
DictTabInfo
::
AttributeArraySize
,
arraySize
);
w
.
add
(
DictTabInfo
::
AttributeNullableFlag
,
nullable
);
w
.
add
(
DictTabInfo
::
AttributeNullableFlag
,
nullable
);
w
.
add
(
DictTabInfo
::
AttributeDGroup
,
DGroup
);
w
.
add
(
DictTabInfo
::
AttributeDKey
,
DKey
);
w
.
add
(
DictTabInfo
::
AttributeDKey
,
DKey
);
w
.
add
(
DictTabInfo
::
AttributeStoredInd
,
attrStoredInd
);
w
.
add
(
DictTabInfo
::
AttributeExtType
,
attrPtr
.
p
->
extType
);
w
.
add
(
DictTabInfo
::
AttributeExtType
,
attrPtr
.
p
->
extType
);
w
.
add
(
DictTabInfo
::
AttributeExtPrecision
,
attrPtr
.
p
->
extPrecision
);
w
.
add
(
DictTabInfo
::
AttributeExtPrecision
,
attrPtr
.
p
->
extPrecision
);
w
.
add
(
DictTabInfo
::
AttributeExtScale
,
attrPtr
.
p
->
extScale
);
w
.
add
(
DictTabInfo
::
AttributeExtScale
,
attrPtr
.
p
->
extScale
);
...
@@ -1340,10 +1335,8 @@ void Dbdict::initialiseTableRecord(TableRecordPtr tablePtr)
...
@@ -1340,10 +1335,8 @@ void Dbdict::initialiseTableRecord(TableRecordPtr tablePtr)
tablePtr
.
p
->
tableVersion
=
(
Uint32
)
-
1
;
tablePtr
.
p
->
tableVersion
=
(
Uint32
)
-
1
;
tablePtr
.
p
->
tabState
=
TableRecord
::
NOT_DEFINED
;
tablePtr
.
p
->
tabState
=
TableRecord
::
NOT_DEFINED
;
tablePtr
.
p
->
tabReturnState
=
TableRecord
::
TRS_IDLE
;
tablePtr
.
p
->
tabReturnState
=
TableRecord
::
TRS_IDLE
;
tablePtr
.
p
->
storageType
=
DictTabInfo
::
MainMemory
;
tablePtr
.
p
->
myConnect
=
RNIL
;
tablePtr
.
p
->
myConnect
=
RNIL
;
tablePtr
.
p
->
fragmentType
=
DictTabInfo
::
AllNodesSmallTable
;
tablePtr
.
p
->
fragmentType
=
DictTabInfo
::
AllNodesSmallTable
;
tablePtr
.
p
->
fragmentKeyType
=
DictTabInfo
::
PrimaryKey
;
memset
(
tablePtr
.
p
->
tableName
,
0
,
sizeof
(
tablePtr
.
p
->
tableName
));
memset
(
tablePtr
.
p
->
tableName
,
0
,
sizeof
(
tablePtr
.
p
->
tableName
));
tablePtr
.
p
->
gciTableCreated
=
0
;
tablePtr
.
p
->
gciTableCreated
=
0
;
tablePtr
.
p
->
noOfAttributes
=
ZNIL
;
tablePtr
.
p
->
noOfAttributes
=
ZNIL
;
...
@@ -4698,7 +4691,6 @@ void Dbdict::handleTabInfoInit(SimpleProperties::Reader & it,
...
@@ -4698,7 +4691,6 @@ void Dbdict::handleTabInfoInit(SimpleProperties::Reader & it,
tablePtr
.
p
->
minLoadFactor
=
tableDesc
.
MinLoadFactor
;
tablePtr
.
p
->
minLoadFactor
=
tableDesc
.
MinLoadFactor
;
tablePtr
.
p
->
maxLoadFactor
=
tableDesc
.
MaxLoadFactor
;
tablePtr
.
p
->
maxLoadFactor
=
tableDesc
.
MaxLoadFactor
;
tablePtr
.
p
->
fragmentType
=
(
DictTabInfo
::
FragmentType
)
tableDesc
.
FragmentType
;
tablePtr
.
p
->
fragmentType
=
(
DictTabInfo
::
FragmentType
)
tableDesc
.
FragmentType
;
tablePtr
.
p
->
fragmentKeyType
=
(
DictTabInfo
::
FragmentKeyType
)
tableDesc
.
FragmentKeyType
;
tablePtr
.
p
->
tableType
=
(
DictTabInfo
::
TableType
)
tableDesc
.
TableType
;
tablePtr
.
p
->
tableType
=
(
DictTabInfo
::
TableType
)
tableDesc
.
TableType
;
tablePtr
.
p
->
kValue
=
tableDesc
.
TableKValue
;
tablePtr
.
p
->
kValue
=
tableDesc
.
TableKValue
;
tablePtr
.
p
->
fragmentCount
=
tableDesc
.
FragmentCount
;
tablePtr
.
p
->
fragmentCount
=
tableDesc
.
FragmentCount
;
...
@@ -4854,11 +4846,8 @@ void Dbdict::handleTabInfo(SimpleProperties::Reader & it,
...
@@ -4854,11 +4846,8 @@ void Dbdict::handleTabInfo(SimpleProperties::Reader & it,
AttributeDescriptor
::
setSize
(
desc
,
attrDesc
.
AttributeSize
);
AttributeDescriptor
::
setSize
(
desc
,
attrDesc
.
AttributeSize
);
AttributeDescriptor
::
setArray
(
desc
,
attrDesc
.
AttributeArraySize
);
AttributeDescriptor
::
setArray
(
desc
,
attrDesc
.
AttributeArraySize
);
AttributeDescriptor
::
setNullable
(
desc
,
attrDesc
.
AttributeNullableFlag
);
AttributeDescriptor
::
setNullable
(
desc
,
attrDesc
.
AttributeNullableFlag
);
AttributeDescriptor
::
setDGroup
(
desc
,
attrDesc
.
AttributeDGroup
);
AttributeDescriptor
::
setDKey
(
desc
,
attrDesc
.
AttributeDKey
);
AttributeDescriptor
::
setDKey
(
desc
,
attrDesc
.
AttributeDKey
);
AttributeDescriptor
::
setPrimaryKey
(
desc
,
attrDesc
.
AttributeKeyFlag
);
AttributeDescriptor
::
setPrimaryKey
(
desc
,
attrDesc
.
AttributeKeyFlag
);
AttributeDescriptor
::
setStoredInTup
(
desc
,
attrDesc
.
AttributeStoredInd
);
attrPtr
.
p
->
attributeDescriptor
=
desc
;
attrPtr
.
p
->
attributeDescriptor
=
desc
;
attrPtr
.
p
->
autoIncrement
=
attrDesc
.
AttributeAutoIncrement
;
attrPtr
.
p
->
autoIncrement
=
attrDesc
.
AttributeAutoIncrement
;
strcpy
(
attrPtr
.
p
->
defaultValue
,
attrDesc
.
AttributeDefaultValue
);
strcpy
(
attrPtr
.
p
->
defaultValue
,
attrDesc
.
AttributeDefaultValue
);
...
@@ -6416,7 +6405,6 @@ Dbdict::createIndex_toCreateTable(Signal* signal, OpCreateIndexPtr opPtr)
...
@@ -6416,7 +6405,6 @@ Dbdict::createIndex_toCreateTable(Signal* signal, OpCreateIndexPtr opPtr)
w
.
add
(
DictTabInfo
::
AttributeKeyFlag
,
(
Uint32
)
false
);
w
.
add
(
DictTabInfo
::
AttributeKeyFlag
,
(
Uint32
)
false
);
w
.
add
(
DictTabInfo
::
AttributeNullableFlag
,
(
Uint32
)
isNullable
);
w
.
add
(
DictTabInfo
::
AttributeNullableFlag
,
(
Uint32
)
isNullable
);
}
}
w
.
add
(
DictTabInfo
::
AttributeStoredInd
,
(
Uint32
)
DictTabInfo
::
Stored
);
// ext type overrides
// ext type overrides
w
.
add
(
DictTabInfo
::
AttributeExtType
,
aRec
->
extType
);
w
.
add
(
DictTabInfo
::
AttributeExtType
,
aRec
->
extType
);
w
.
add
(
DictTabInfo
::
AttributeExtPrecision
,
aRec
->
extPrecision
);
w
.
add
(
DictTabInfo
::
AttributeExtPrecision
,
aRec
->
extPrecision
);
...
@@ -6431,7 +6419,6 @@ Dbdict::createIndex_toCreateTable(Signal* signal, OpCreateIndexPtr opPtr)
...
@@ -6431,7 +6419,6 @@ Dbdict::createIndex_toCreateTable(Signal* signal, OpCreateIndexPtr opPtr)
w
.
add
(
DictTabInfo
::
AttributeName
,
"NDB$PK"
);
w
.
add
(
DictTabInfo
::
AttributeName
,
"NDB$PK"
);
w
.
add
(
DictTabInfo
::
AttributeId
,
opPtr
.
p
->
m_attrList
.
sz
);
w
.
add
(
DictTabInfo
::
AttributeId
,
opPtr
.
p
->
m_attrList
.
sz
);
w
.
add
(
DictTabInfo
::
AttributeKeyFlag
,
(
Uint32
)
false
);
w
.
add
(
DictTabInfo
::
AttributeKeyFlag
,
(
Uint32
)
false
);
w
.
add
(
DictTabInfo
::
AttributeStoredInd
,
(
Uint32
)
DictTabInfo
::
Stored
);
w
.
add
(
DictTabInfo
::
AttributeNullableFlag
,
(
Uint32
)
false
);
w
.
add
(
DictTabInfo
::
AttributeNullableFlag
,
(
Uint32
)
false
);
// ext type overrides
// ext type overrides
w
.
add
(
DictTabInfo
::
AttributeExtType
,
(
Uint32
)
DictTabInfo
::
ExtUnsigned
);
w
.
add
(
DictTabInfo
::
AttributeExtType
,
(
Uint32
)
DictTabInfo
::
ExtUnsigned
);
...
@@ -6444,7 +6431,6 @@ Dbdict::createIndex_toCreateTable(Signal* signal, OpCreateIndexPtr opPtr)
...
@@ -6444,7 +6431,6 @@ Dbdict::createIndex_toCreateTable(Signal* signal, OpCreateIndexPtr opPtr)
w
.
add
(
DictTabInfo
::
AttributeName
,
"NDB$TNODE"
);
w
.
add
(
DictTabInfo
::
AttributeName
,
"NDB$TNODE"
);
w
.
add
(
DictTabInfo
::
AttributeId
,
opPtr
.
p
->
m_attrList
.
sz
);
w
.
add
(
DictTabInfo
::
AttributeId
,
opPtr
.
p
->
m_attrList
.
sz
);
w
.
add
(
DictTabInfo
::
AttributeKeyFlag
,
(
Uint32
)
true
);
w
.
add
(
DictTabInfo
::
AttributeKeyFlag
,
(
Uint32
)
true
);
w
.
add
(
DictTabInfo
::
AttributeStoredInd
,
(
Uint32
)
DictTabInfo
::
Stored
);
w
.
add
(
DictTabInfo
::
AttributeNullableFlag
,
(
Uint32
)
false
);
w
.
add
(
DictTabInfo
::
AttributeNullableFlag
,
(
Uint32
)
false
);
// ext type overrides
// ext type overrides
w
.
add
(
DictTabInfo
::
AttributeExtType
,
(
Uint32
)
DictTabInfo
::
ExtUnsigned
);
w
.
add
(
DictTabInfo
::
AttributeExtType
,
(
Uint32
)
DictTabInfo
::
ExtUnsigned
);
...
...
ndb/src/kernel/vm/MetaData.hpp
View file @
b439d7f1
...
@@ -86,15 +86,9 @@ public:
...
@@ -86,15 +86,9 @@ public:
/* Primary table of index otherwise RNIL */
/* Primary table of index otherwise RNIL */
Uint32
primaryTableId
;
Uint32
primaryTableId
;
/* Type of storage (memory/disk, not used) */
DictTabInfo
::
StorageType
storageType
;
/* Type of fragmentation (small/medium/large) */
/* Type of fragmentation (small/medium/large) */
DictTabInfo
::
FragmentType
fragmentType
;
DictTabInfo
::
FragmentType
fragmentType
;
/* Key type of fragmentation (pk/dist key/dist group) */
DictTabInfo
::
FragmentKeyType
fragmentKeyType
;
/* Global checkpoint identity when table created */
/* Global checkpoint identity when table created */
Uint32
gciTableCreated
;
Uint32
gciTableCreated
;
...
...
ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
b439d7f1
...
@@ -1525,9 +1525,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
...
@@ -1525,9 +1525,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
tmpAttr
.
AttributeId
=
i
;
tmpAttr
.
AttributeId
=
i
;
tmpAttr
.
AttributeKeyFlag
=
col
->
m_pk
;
tmpAttr
.
AttributeKeyFlag
=
col
->
m_pk
;
tmpAttr
.
AttributeNullableFlag
=
col
->
m_nullable
;
tmpAttr
.
AttributeNullableFlag
=
col
->
m_nullable
;
tmpAttr
.
AttributeStoredInd
=
1
;
tmpAttr
.
AttributeDKey
=
col
->
m_distributionKey
;
tmpAttr
.
AttributeDKey
=
col
->
m_distributionKey
;
tmpAttr
.
AttributeDGroup
=
0
;
tmpAttr
.
AttributeExtType
=
tmpAttr
.
AttributeExtType
=
getKernelConstant
(
col
->
m_type
,
getKernelConstant
(
col
->
m_type
,
...
...
ndb/src/ndbapi/NdbScanOperation.cpp
View file @
b439d7f1
...
@@ -919,6 +919,8 @@ NdbScanOperation::takeOverScanOp(OperationType opType, NdbConnection* pTrans){
...
@@ -919,6 +919,8 @@ NdbScanOperation::takeOverScanOp(OperationType opType, NdbConnection* pTrans){
TcKeyReq
::
setTakeOverScanFragment
(
scanInfo
,
tTakeOverFragment
);
TcKeyReq
::
setTakeOverScanFragment
(
scanInfo
,
tTakeOverFragment
);
TcKeyReq
::
setTakeOverScanInfo
(
scanInfo
,
tScanInfo
);
TcKeyReq
::
setTakeOverScanInfo
(
scanInfo
,
tScanInfo
);
newOp
->
theScanInfo
=
scanInfo
;
newOp
->
theScanInfo
=
scanInfo
;
newOp
->
theDistrKeyIndicator_
=
1
;
newOp
->
theDistributionKey
=
tTakeOverFragment
;
}
}
// Copy the first 8 words of key info from KEYINF20 into TCKEYREQ
// Copy the first 8 words of key info from KEYINF20 into TCKEYREQ
...
...
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