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
93008bf1
Commit
93008bf1
authored
Oct 31, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved "hash" bit from k+fragbit to 0
parent
9ec8e38e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
35 deletions
+17
-35
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
+1
-1
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+7
-25
ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp
ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp
+4
-3
ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp
ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp
+5
-6
No files found.
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
View file @
93008bf1
...
...
@@ -9255,7 +9255,7 @@ void Dbacc::initFragAdd(Signal* signal,
}
//if
regFragPtr
.
p
->
fragState
=
ACTIVEFRAG
;
// NOTE: next line must match calculation in Dblqh::execLQHFRAGREQ
regFragPtr
.
p
->
myfid
=
(
r
ootFragIndex
<<
(
lhFragBits
-
1
))
|
req
->
fragId
;
regFragPtr
.
p
->
myfid
=
(
r
eq
->
fragId
<<
1
)
|
rootFragIndex
;
regFragPtr
.
p
->
myroot
=
rootIndex
;
regFragPtr
.
p
->
myTableId
=
req
->
tableId
;
ndbrequire
(
req
->
kValue
==
6
);
...
...
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
93008bf1
...
...
@@ -1078,8 +1078,8 @@ void Dblqh::execLQHFRAGREQ(Signal* signal)
if
(
DictTabInfo
::
isOrderedIndex
(
tableType
))
{
jam
();
// NOTE: next 2 lines stolen from ACC
addfragptr
.
p
->
fragid1
=
(
0
<<
tlhstar
)
|
fragId
;
addfragptr
.
p
->
fragid2
=
(
1
<<
tlhstar
)
|
fragId
;
addfragptr
.
p
->
fragid1
=
(
fragId
<<
1
)
|
0
;
addfragptr
.
p
->
fragid2
=
(
fragId
<<
1
)
|
1
;
addfragptr
.
p
->
addfragStatus
=
AddFragRecord
::
WAIT_TWO_TUP
;
sendAddFragReq
(
signal
);
return
;
...
...
@@ -1268,7 +1268,7 @@ Dblqh::sendAddFragReq(Signal* signal)
tuxreq
->
noOfAttr
=
addfragptr
.
p
->
noOfAttr
-
1
;
/* skip NDB$TNODE */
tuxreq
->
fragId
=
addfragptr
.
p
->
addfragStatus
==
AddFragRecord
::
WAIT_TWO_TUX
?
addfragptr
.
p
->
fragid1
:
addfragptr
.
p
->
fragid2
;
?
addfragptr
.
p
->
fragid1
:
addfragptr
.
p
->
fragid2
;
tuxreq
->
fragOff
=
addfragptr
.
p
->
lh3DistrBits
;
tuxreq
->
tableType
=
addfragptr
.
p
->
tableType
;
tuxreq
->
primaryTableId
=
addfragptr
.
p
->
primaryTableId
;
...
...
@@ -3420,7 +3420,7 @@ void Dblqh::execLQHKEYREQ(Signal* signal)
LQHKEY_error
(
signal
,
6
);
return
;
}
//if
regTcPtr
->
localFragptr
=
(
regTcPtr
->
hashValue
>>
fragptr
.
p
->
hashCheckBit
)
&
1
;
regTcPtr
->
localFragptr
=
regTcPtr
->
hashValue
&
1
;
Uint8
TcopyType
=
fragptr
.
p
->
fragCopy
;
tfragDistKey
=
fragptr
.
p
->
fragDistributionKey
;
if
(
fragptr
.
p
->
fragStatus
==
Fragrecord
::
ACTIVE_CREATION
)
{
...
...
@@ -8023,13 +8023,7 @@ void Dblqh::nextScanConfLoopLab(Signal* signal)
ptrCheckGuard
(
fragptr
,
cfragrecFileSize
,
fragrecord
);
if
(
!
scanptr
.
p
->
rangeScan
)
{
tableRef
=
tcConnectptr
.
p
->
tableref
;
if
(
fragptr
.
p
->
fragId
==
scanptr
.
p
->
scanLocalFragid
)
{
jam
();
tupFragPtr
=
fragptr
.
p
->
tupFragptr
[
0
];
}
else
{
jam
();
tupFragPtr
=
fragptr
.
p
->
tupFragptr
[
1
];
}
//if
tupFragPtr
=
fragptr
.
p
->
tupFragptr
[
scanptr
.
p
->
scanLocalFragid
&
1
];
}
else
{
jam
();
// for ordered index use primary table
...
...
@@ -8037,13 +8031,7 @@ void Dblqh::nextScanConfLoopLab(Signal* signal)
tFragPtr
.
i
=
fragptr
.
p
->
tableFragptr
;
ptrCheckGuard
(
tFragPtr
,
cfragrecFileSize
,
fragrecord
);
tableRef
=
tFragPtr
.
p
->
tabRef
;
if
(
tFragPtr
.
p
->
fragId
==
scanptr
.
p
->
scanLocalFragid
)
{
jam
();
tupFragPtr
=
tFragPtr
.
p
->
tupFragptr
[
0
];
}
else
{
jam
();
tupFragPtr
=
tFragPtr
.
p
->
tupFragptr
[
1
];
}
//if
tupFragPtr
=
tFragPtr
.
p
->
tupFragptr
[
scanptr
.
p
->
scanLocalFragid
&
1
];
}
{
jam
();
...
...
@@ -9122,13 +9110,7 @@ void Dblqh::copySendTupkeyReqLab(Signal* signal)
scanptr
.
p
->
scanState
=
ScanRecord
::
WAIT_TUPKEY_COPY
;
fragptr
.
i
=
tcConnectptr
.
p
->
fragmentptr
;
ptrCheckGuard
(
fragptr
,
cfragrecFileSize
,
fragrecord
);
if
(
fragptr
.
p
->
fragId
==
scanptr
.
p
->
scanLocalFragid
)
{
jam
();
tupFragPtr
=
fragptr
.
p
->
tupFragptr
[
0
];
}
else
{
jam
();
tupFragPtr
=
fragptr
.
p
->
tupFragptr
[
1
];
}
//if
tupFragPtr
=
fragptr
.
p
->
tupFragptr
[
scanptr
.
p
->
scanLocalFragid
&
1
];
{
TupKeyReq
*
const
tupKeyReq
=
(
TupKeyReq
*
)
signal
->
getDataPtrSend
();
...
...
ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp
View file @
93008bf1
...
...
@@ -57,9 +57,9 @@ Dbtux::execTUX_MAINT_REQ(Signal* signal)
c_indexPool
.
getPtr
(
indexPtr
,
req
->
indexId
);
ndbrequire
(
indexPtr
.
p
->
m_tableId
==
req
->
tableId
);
// get base fragment id and extra bits
const
Uint32
frag
Off
=
indexPtr
.
p
->
m_fragOff
;
const
Uint32
frag
Id
=
req
->
fragId
&
((
1
<<
fragOff
)
-
1
)
;
const
Uint32
fragBit
=
req
->
fragId
>>
fragOff
;
const
Uint32
frag
Id
=
req
->
fragId
&
~
1
;
const
Uint32
frag
Bit
=
req
->
fragId
&
1
;
// get the fragment
FragPtr
fragPtr
;
fragPtr
.
i
=
RNIL
;
...
...
@@ -71,6 +71,7 @@ Dbtux::execTUX_MAINT_REQ(Signal* signal)
break
;
}
}
ndbrequire
(
fragPtr
.
i
!=
RNIL
);
Frag
&
frag
=
*
fragPtr
.
p
;
// set up index keys for this operation
...
...
ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp
View file @
93008bf1
...
...
@@ -34,7 +34,7 @@ Dbtux::execACC_SCANREQ(Signal* signal)
fragPtr
.
i
=
RNIL
;
for
(
unsigned
i
=
0
;
i
<
indexPtr
.
p
->
m_numFrags
;
i
++
)
{
jam
();
if
(
indexPtr
.
p
->
m_fragId
[
i
]
==
req
->
fragmentNo
)
{
if
(
indexPtr
.
p
->
m_fragId
[
i
]
==
req
->
fragmentNo
<<
1
)
{
jam
();
c_fragPool
.
getPtr
(
fragPtr
,
indexPtr
.
p
->
m_fragPtrI
[
i
]);
break
;
...
...
@@ -43,7 +43,6 @@ Dbtux::execACC_SCANREQ(Signal* signal)
ndbrequire
(
fragPtr
.
i
!=
RNIL
);
Frag
&
frag
=
*
fragPtr
.
p
;
// must be normal DIH/TC fragment
ndbrequire
(
frag
.
m_fragId
<
(
1
<<
frag
.
m_fragOff
));
TreeHead
&
tree
=
frag
.
m_tree
;
// check for empty fragment
if
(
tree
.
m_root
==
NullTupLoc
)
{
...
...
@@ -354,7 +353,7 @@ Dbtux::execACC_CHECK_SCAN(Signal* signal)
NextScanConf
*
const
conf
=
(
NextScanConf
*
)
signal
->
getDataPtrSend
();
conf
->
scanPtr
=
scan
.
m_userPtr
;
conf
->
accOperationPtr
=
RNIL
;
// no tuple returned
conf
->
fragId
=
frag
.
m_fragId
|
(
ent
.
m_fragBit
<<
frag
.
m_fragOff
)
;
conf
->
fragId
=
frag
.
m_fragId
|
ent
.
m_fragBit
;
unsigned
signalLength
=
3
;
// if TC has ordered scan close, it will be detected here
sendSignal
(
scan
.
m_userRef
,
GSN_NEXT_SCANCONF
,
...
...
@@ -397,7 +396,7 @@ Dbtux::execACC_CHECK_SCAN(Signal* signal)
lockReq
->
userPtr
=
scanPtr
.
i
;
lockReq
->
userRef
=
reference
();
lockReq
->
tableId
=
scan
.
m_tableId
;
lockReq
->
fragId
=
frag
.
m_fragId
|
(
ent
.
m_fragBit
<<
frag
.
m_fragOff
)
;
lockReq
->
fragId
=
frag
.
m_fragId
|
ent
.
m_fragBit
;
lockReq
->
fragPtrI
=
frag
.
m_accTableFragPtrI
[
ent
.
m_fragBit
];
const
Uint32
*
const
buf32
=
static_cast
<
Uint32
*>
(
pkData
);
const
Uint64
*
const
buf64
=
reinterpret_cast
<
const
Uint64
*>
(
buf32
);
...
...
@@ -496,7 +495,7 @@ Dbtux::execACC_CHECK_SCAN(Signal* signal)
accLockOp
=
(
Uint32
)
-
1
;
}
conf
->
accOperationPtr
=
accLockOp
;
conf
->
fragId
=
frag
.
m_fragId
|
(
ent
.
m_fragBit
<<
frag
.
m_fragOff
)
;
conf
->
fragId
=
frag
.
m_fragId
|
ent
.
m_fragBit
;
conf
->
localKey
[
0
]
=
getTupAddr
(
frag
,
ent
);
conf
->
localKey
[
1
]
=
0
;
conf
->
localKeyLength
=
1
;
...
...
@@ -890,7 +889,7 @@ Dbtux::scanVisible(ScanOpPtr scanPtr, TreeEnt ent)
const
Frag
&
frag
=
*
c_fragPool
.
getPtr
(
scan
.
m_fragPtrI
);
Uint32
fragBit
=
ent
.
m_fragBit
;
Uint32
tableFragPtrI
=
frag
.
m_tupTableFragPtrI
[
fragBit
];
Uint32
fragId
=
frag
.
m_fragId
|
(
fragBit
<<
frag
.
m_fragOff
)
;
Uint32
fragId
=
frag
.
m_fragId
|
fragBit
;
Uint32
tupAddr
=
getTupAddr
(
frag
,
ent
);
Uint32
tupVersion
=
ent
.
m_tupVersion
;
// check for same tuple twice in row
...
...
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