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
3b38c544
Commit
3b38c544
authored
Apr 26, 2007
by
tomas@whalegate.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb: force varpart part I, allow setting of flag in dictionary
parent
5dff16eb
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
44 additions
and
8 deletions
+44
-8
storage/ndb/include/kernel/signaldata/DictTabInfo.hpp
storage/ndb/include/kernel/signaldata/DictTabInfo.hpp
+2
-0
storage/ndb/include/kernel/signaldata/LqhFrag.hpp
storage/ndb/include/kernel/signaldata/LqhFrag.hpp
+2
-1
storage/ndb/include/kernel/signaldata/TupFrag.hpp
storage/ndb/include/kernel/signaldata/TupFrag.hpp
+2
-1
storage/ndb/include/ndbapi/NdbDictionary.hpp
storage/ndb/include/ndbapi/NdbDictionary.hpp
+8
-0
storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp
storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp
+2
-0
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+5
-1
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
+5
-4
storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
+2
-1
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+3
-0
storage/ndb/src/ndbapi/NdbDictionary.cpp
storage/ndb/src/ndbapi/NdbDictionary.cpp
+10
-0
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
+2
-0
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
+1
-0
No files found.
storage/ndb/include/kernel/signaldata/DictTabInfo.hpp
View file @
3b38c544
...
...
@@ -118,6 +118,7 @@ public:
FrmData
=
27
,
TableTemporaryFlag
=
28
,
//Default not Temporary
ForceVarPartFlag
=
29
,
FragmentCount
=
128
,
// No of fragments in table (!fragment replicas)
FragmentDataLen
=
129
,
...
...
@@ -299,6 +300,7 @@ public:
Uint32
PrimaryTableId
;
Uint32
TableLoggedFlag
;
Uint32
TableTemporaryFlag
;
Uint32
ForceVarPartFlag
;
Uint32
NoOfKeyAttr
;
Uint32
NoOfAttributes
;
Uint32
NoOfNullable
;
...
...
storage/ndb/include/kernel/signaldata/LqhFrag.hpp
View file @
3b38c544
...
...
@@ -105,7 +105,7 @@ class LqhFragReq {
friend
bool
printLQH_FRAG_REQ
(
FILE
*
,
const
Uint32
*
,
Uint32
,
Uint16
);
public:
STATIC_CONST
(
SignalLength
=
2
4
);
STATIC_CONST
(
SignalLength
=
2
5
);
enum
RequestInfo
{
CreateInRunning
=
0x8000000
,
...
...
@@ -143,6 +143,7 @@ private:
Uint32
maxRowsHigh
;
Uint32
minRowsLow
;
Uint32
minRowsHigh
;
Uint32
forceVarPartFlag
;
};
class
LqhFragConf
{
...
...
storage/ndb/include/kernel/signaldata/TupFrag.hpp
View file @
3b38c544
...
...
@@ -29,7 +29,7 @@ class TupFragReq {
friend
class
Dblqh
;
friend
class
Dbtup
;
public:
STATIC_CONST
(
SignalLength
=
1
7
);
STATIC_CONST
(
SignalLength
=
1
8
);
private:
Uint32
userPtr
;
Uint32
userRef
;
...
...
@@ -48,6 +48,7 @@ private:
Uint32
checksumIndicator
;
Uint32
globalCheckpointIdIndicator
;
Uint32
tablespaceid
;
Uint32
forceVarPartFlag
;
};
class
TupFragConf
{
...
...
storage/ndb/include/ndbapi/NdbDictionary.hpp
View file @
3b38c544
...
...
@@ -921,6 +921,14 @@ public:
bool
getTemporary
();
void
setTemporary
(
bool
);
/**
* Only table with varpart do support online add column
* Add property so that table wo/ varsize column(s) still
* allocates varpart-ref, so that later online add column is possible
*/
bool
getForceVarPart
()
const
;
void
setForceVarPart
(
bool
);
/**
* Check if any of column in bitmaps are disk columns
* returns bitmap of different columns
...
...
storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp
View file @
3b38c544
...
...
@@ -26,6 +26,7 @@ DictTabInfo::TableMapping[] = {
DTIMAP
(
Table
,
PrimaryTableId
,
PrimaryTableId
),
DTIMAP2
(
Table
,
TableLoggedFlag
,
TableLoggedFlag
,
0
,
1
),
DTIMAP2
(
Table
,
TableTemporaryFlag
,
TableTemporaryFlag
,
0
,
1
),
DTIMAP2
(
Table
,
ForceVarPartFlag
,
ForceVarPartFlag
,
0
,
1
),
DTIMAP2
(
Table
,
TableKValue
,
TableKValue
,
6
,
6
),
DTIMAP2
(
Table
,
MinLoadFactor
,
MinLoadFactor
,
0
,
90
),
DTIMAP2
(
Table
,
MaxLoadFactor
,
MaxLoadFactor
,
25
,
110
),
...
...
@@ -123,6 +124,7 @@ DictTabInfo::Table::init(){
PrimaryTableId
=
RNIL
;
TableLoggedFlag
=
1
;
TableTemporaryFlag
=
0
;
ForceVarPartFlag
=
0
;
NoOfKeyAttr
=
0
;
NoOfAttributes
=
0
;
NoOfNullable
=
0
;
...
...
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
View file @
3b38c544
...
...
@@ -449,6 +449,8 @@ Dbdict::packTableIntoPages(SimpleProperties::Writer & w,
!!
(
tablePtr
.
p
->
m_bits
&
TableRecord
::
TR_RowChecksum
));
w
.
add
(
DictTabInfo
::
TableTemporaryFlag
,
!!
(
tablePtr
.
p
->
m_bits
&
TableRecord
::
TR_Temporary
));
w
.
add
(
DictTabInfo
::
ForceVarPartFlag
,
!!
(
tablePtr
.
p
->
m_bits
&
TableRecord
::
TR_ForceVarPart
));
w
.
add
(
DictTabInfo
::
MinLoadFactor
,
tablePtr
.
p
->
minLoadFactor
);
w
.
add
(
DictTabInfo
::
MaxLoadFactor
,
tablePtr
.
p
->
maxLoadFactor
);
...
...
@@ -5503,8 +5505,8 @@ Dbdict::execADD_FRAGREQ(Signal* signal) {
req
->
tableType
=
tabPtr
.
p
->
tableType
;
req
->
primaryTableId
=
tabPtr
.
p
->
primaryTableId
;
req
->
tablespace_id
=
tabPtr
.
p
->
m_tablespace_id
;
//req->tablespace_id= tablespace_id;
req
->
logPartId
=
logPart
;
req
->
forceVarPartFlag
=
!!
(
tabPtr
.
p
->
m_bits
&
TableRecord
::
TR_ForceVarPart
);
sendSignal
(
DBLQH_REF
,
GSN_LQHFRAGREQ
,
signal
,
LqhFragReq
::
SignalLength
,
JBB
);
}
...
...
@@ -6119,6 +6121,8 @@ void Dbdict::handleTabInfoInit(SimpleProperties::Reader & it,
(
c_tableDesc
.
RowGCIFlag
?
TableRecord
::
TR_RowGCI
:
0
);
tablePtr
.
p
->
m_bits
|=
(
c_tableDesc
.
TableTemporaryFlag
?
TableRecord
::
TR_Temporary
:
0
);
tablePtr
.
p
->
m_bits
|=
(
c_tableDesc
.
ForceVarPartFlag
?
TableRecord
::
TR_ForceVarPart
:
0
);
tablePtr
.
p
->
minLoadFactor
=
c_tableDesc
.
MinLoadFactor
;
tablePtr
.
p
->
maxLoadFactor
=
c_tableDesc
.
MaxLoadFactor
;
tablePtr
.
p
->
fragmentType
=
(
DictTabInfo
::
FragmentType
)
c_tableDesc
.
FragmentType
;
...
...
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
View file @
3b38c544
...
...
@@ -236,10 +236,11 @@ public:
/* Is the table logged (i.e. data survives system restart) */
enum
Bits
{
TR_Logged
=
0x1
,
TR_RowGCI
=
0x2
,
TR_RowChecksum
=
0x4
,
TR_Temporary
=
0x8
TR_Logged
=
0x1
,
TR_RowGCI
=
0x2
,
TR_RowChecksum
=
0x4
,
TR_Temporary
=
0x8
,
TR_ForceVarPart
=
0x10
};
Uint16
m_bits
;
...
...
storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
View file @
3b38c544
...
...
@@ -459,7 +459,8 @@ public:
Uint32
maxRowsHigh
;
Uint32
minRowsLow
;
Uint32
minRowsHigh
;
};
// Size 128 bytes
Uint32
forceVarPartFlag
;
};
typedef
Ptr
<
AddFragRecord
>
AddFragRecordPtr
;
/* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ */
...
...
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
3b38c544
...
...
@@ -1071,6 +1071,7 @@ void Dblqh::execLQHFRAGREQ(Signal* signal)
Uint32
primaryTableId
=
req
->
primaryTableId
;
Uint32
tablespace
=
req
->
tablespace_id
;
Uint32
logPart
=
req
->
logPartId
;
Uint32
forceVarPartFlag
=
req
->
forceVarPartFlag
;
if
(
signal
->
getLength
()
<
20
)
{
...
...
@@ -1190,6 +1191,7 @@ void Dblqh::execLQHFRAGREQ(Signal* signal)
addfragptr
.
p
->
tableType
=
tableType
;
addfragptr
.
p
->
primaryTableId
=
primaryTableId
;
addfragptr
.
p
->
tablespace_id
=
tablespace
;
addfragptr
.
p
->
forceVarPartFlag
=
forceVarPartFlag
;
//
addfragptr
.
p
->
tupConnectptr
=
RNIL
;
addfragptr
.
p
->
tuxConnectptr
=
RNIL
;
...
...
@@ -1340,6 +1342,7 @@ Dblqh::sendAddFragReq(Signal* signal)
tupFragReq
->
checksumIndicator
=
addfragptr
.
p
->
checksumIndicator
;
tupFragReq
->
globalCheckpointIdIndicator
=
addfragptr
.
p
->
GCPIndicator
;
tupFragReq
->
tablespaceid
=
addfragptr
.
p
->
tablespace_id
;
tupFragReq
->
forceVarPartFlag
=
addfragptr
.
p
->
forceVarPartFlag
;
sendSignal
(
fragptr
.
p
->
tupBlockref
,
GSN_TUPFRAGREQ
,
signal
,
TupFragReq
::
SignalLength
,
JBB
);
return
;
...
...
storage/ndb/src/ndbapi/NdbDictionary.cpp
View file @
3b38c544
...
...
@@ -703,6 +703,16 @@ NdbDictionary::Table::getRowGCIIndicator() const {
return
m_impl
.
m_row_gci
;
}
void
NdbDictionary
::
Table
::
setForceVarPart
(
bool
val
){
m_impl
.
m_force_var_part
=
val
;
}
bool
NdbDictionary
::
Table
::
getForceVarPart
()
const
{
return
m_impl
.
m_force_var_part
;
}
int
NdbDictionary
::
Table
::
aggregate
(
NdbError
&
error
)
{
...
...
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
3b38c544
...
...
@@ -2105,6 +2105,7 @@ NdbDictInterface::parseTableInfo(NdbTableImpl ** ret,
impl
->
m_temporary
=
tableDesc
->
TableTemporaryFlag
;
impl
->
m_row_gci
=
tableDesc
->
RowGCIFlag
;
impl
->
m_row_checksum
=
tableDesc
->
RowChecksumFlag
;
impl
->
m_force_var_part
=
tableDesc
->
ForceVarPartFlag
;
impl
->
m_kvalue
=
tableDesc
->
TableKValue
;
impl
->
m_minLoadFactor
=
tableDesc
->
MinLoadFactor
;
impl
->
m_maxLoadFactor
=
tableDesc
->
MaxLoadFactor
;
...
...
@@ -2569,6 +2570,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
tmpTab
->
MinRowsLow
=
(
Uint32
)(
impl
.
m_min_rows
&
0xFFFFFFFF
);
tmpTab
->
DefaultNoPartFlag
=
impl
.
m_default_no_part_flag
;
tmpTab
->
LinearHashFlag
=
impl
.
m_linear_flag
;
tmpTab
->
ForceVarPartFlag
=
impl
.
m_force_var_part
;
if
(
impl
.
m_ts_name
.
length
())
{
...
...
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
View file @
3b38c544
...
...
@@ -199,6 +199,7 @@ public:
bool
m_temporary
;
bool
m_row_gci
;
bool
m_row_checksum
;
bool
m_force_var_part
;
int
m_kvalue
;
int
m_minLoadFactor
;
int
m_maxLoadFactor
;
...
...
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