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
ad85a10a
Commit
ad85a10a
authored
Nov 11, 2004
by
pekka@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb: wl-2066. remove ACC storage. dead code not yet removed
parent
4ff14f6c
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
208 additions
and
67 deletions
+208
-67
ndb/src/kernel/blocks/dbacc/Dbacc.hpp
ndb/src/kernel/blocks/dbacc/Dbacc.hpp
+13
-1
ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
+2
-1
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
+161
-62
ndb/src/kernel/blocks/dbacc/Makefile.am
ndb/src/kernel/blocks/dbacc/Makefile.am
+2
-0
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+1
-1
ndb/src/kernel/blocks/dbtup/Dbtup.hpp
ndb/src/kernel/blocks/dbtup/Dbtup.hpp
+7
-0
ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp
ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp
+22
-2
No files found.
ndb/src/kernel/blocks/dbacc/Dbacc.hpp
View file @
ad85a10a
...
@@ -22,6 +22,9 @@
...
@@ -22,6 +22,9 @@
#include <pc.hpp>
#include <pc.hpp>
#include <SimulatedBlock.hpp>
#include <SimulatedBlock.hpp>
// primary key is stored in TUP
#include <Dbtup.hpp>
#ifdef DBACC_C
#ifdef DBACC_C
// Debug Macros
// Debug Macros
#define dbgWord32(ptr, ind, val)
#define dbgWord32(ptr, ind, val)
...
@@ -661,9 +664,10 @@ struct Fragmentrec {
...
@@ -661,9 +664,10 @@ struct Fragmentrec {
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// elementLength: Length of element in bucket and overflow pages
// elementLength: Length of element in bucket and overflow pages
// keyLength: Length of key (== 0 if long key or variable key length)
// keyLength: Length of key (== 0 if long key or variable key length)
// wl-2066 always Length of key
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
Uint8
elementLength
;
Uint8
elementLength
;
Uint
8
keyLength
;
Uint
16
keyLength
;
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// This flag is used to avoid sending a big number of expand or shrink signals
// This flag is used to avoid sending a big number of expand or shrink signals
...
@@ -783,6 +787,7 @@ struct Operationrec {
...
@@ -783,6 +787,7 @@ struct Operationrec {
Uint8
dirtyRead
;
Uint8
dirtyRead
;
Uint8
commitDeleteCheckFlag
;
Uint8
commitDeleteCheckFlag
;
Uint8
isAccLockReq
;
Uint8
isAccLockReq
;
Uint8
isUndoLogReq
;
Uint32
nextOpList
;
Uint32
nextOpList
;
};
/* p2c: size = 168 bytes */
};
/* p2c: size = 168 bytes */
...
@@ -914,6 +919,9 @@ public:
...
@@ -914,6 +919,9 @@ public:
Dbacc
(
const
class
Configuration
&
);
Dbacc
(
const
class
Configuration
&
);
virtual
~
Dbacc
();
virtual
~
Dbacc
();
// pointer to TUP instance in this thread
Dbtup
*
c_tup
;
private
:
private
:
BLOCK_DEFINES
(
Dbacc
);
BLOCK_DEFINES
(
Dbacc
);
...
@@ -1075,6 +1083,7 @@ private:
...
@@ -1075,6 +1083,7 @@ private:
void
storeLongKeys
(
Signal
*
signal
);
void
storeLongKeys
(
Signal
*
signal
);
void
storeLongKeysAtPos
(
Signal
*
signal
);
void
storeLongKeysAtPos
(
Signal
*
signal
);
void
reorgLongPage
(
Signal
*
signal
);
void
reorgLongPage
(
Signal
*
signal
);
void
readTablePk
(
Uint32
localkey1
);
void
getElement
(
Signal
*
signal
);
void
getElement
(
Signal
*
signal
);
void
searchLongKey
(
Signal
*
signal
);
void
searchLongKey
(
Signal
*
signal
);
void
getdirindex
(
Signal
*
signal
);
void
getdirindex
(
Signal
*
signal
);
...
@@ -1562,7 +1571,10 @@ private:
...
@@ -1562,7 +1571,10 @@ private:
Uint32
cexcPrevpageindex
;
Uint32
cexcPrevpageindex
;
Uint32
cexcPrevforward
;
Uint32
cexcPrevforward
;
Uint32
clocalkey
[
32
];
Uint32
clocalkey
[
32
];
union
{
Uint32
ckeys
[
2048
];
Uint32
ckeys
[
2048
];
Uint64
ckeys_align
;
};
Uint32
c_errorInsert3000_TableId
;
Uint32
c_errorInsert3000_TableId
;
Uint32
cSrUndoRecords
[
5
];
Uint32
cSrUndoRecords
[
5
];
...
...
ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
View file @
ad85a10a
...
@@ -133,7 +133,8 @@ void Dbacc::initRecords()
...
@@ -133,7 +133,8 @@ void Dbacc::initRecords()
}
//Dbacc::initRecords()
}
//Dbacc::initRecords()
Dbacc
::
Dbacc
(
const
class
Configuration
&
conf
)
:
Dbacc
::
Dbacc
(
const
class
Configuration
&
conf
)
:
SimulatedBlock
(
DBACC
,
conf
)
SimulatedBlock
(
DBACC
,
conf
),
c_tup
(
0
)
{
{
Uint32
log_page_size
=
0
;
Uint32
log_page_size
=
0
;
BLOCK_CONSTRUCTOR
(
Dbacc
);
BLOCK_CONSTRUCTOR
(
Dbacc
);
...
...
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
View file @
ad85a10a
This diff is collapsed.
Click to expand it.
ndb/src/kernel/blocks/dbacc/Makefile.am
View file @
ad85a10a
...
@@ -3,6 +3,8 @@ noinst_LIBRARIES = libdbacc.a
...
@@ -3,6 +3,8 @@ noinst_LIBRARIES = libdbacc.a
libdbacc_a_SOURCES
=
DbaccInit.cpp DbaccMain.cpp
libdbacc_a_SOURCES
=
DbaccInit.cpp DbaccMain.cpp
INCLUDES_LOC
=
-I
$(top_srcdir)
/ndb/src/kernel/blocks/dbtup
include
$(top_srcdir)/ndb/config/common.mk.am
include
$(top_srcdir)/ndb/config/common.mk.am
include
$(top_srcdir)/ndb/config/type_kernel.mk.am
include
$(top_srcdir)/ndb/config/type_kernel.mk.am
...
...
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
View file @
ad85a10a
...
@@ -4104,7 +4104,7 @@ Dbdict::execADD_FRAGREQ(Signal* signal) {
...
@@ -4104,7 +4104,7 @@ Dbdict::execADD_FRAGREQ(Signal* signal) {
req
->
noOfPagesToPreAllocate
=
0
;
req
->
noOfPagesToPreAllocate
=
0
;
req
->
schemaVersion
=
tabPtr
.
p
->
tableVersion
;
req
->
schemaVersion
=
tabPtr
.
p
->
tableVersion
;
Uint32
keyLen
=
tabPtr
.
p
->
tupKeyLength
;
Uint32
keyLen
=
tabPtr
.
p
->
tupKeyLength
;
req
->
keyLength
=
keyLen
>
8
?
0
:
keyLen
;
// Put this into ACC instead
req
->
keyLength
=
keyLen
;
// wl-2066 no more "long keys"
req
->
nextLCP
=
lcpNo
;
req
->
nextLCP
=
lcpNo
;
req
->
noOfKeyAttr
=
tabPtr
.
p
->
noOfPrimkey
;
req
->
noOfKeyAttr
=
tabPtr
.
p
->
noOfPrimkey
;
...
...
ndb/src/kernel/blocks/dbtup/Dbtup.hpp
View file @
ad85a10a
...
@@ -1020,6 +1020,13 @@ public:
...
@@ -1020,6 +1020,13 @@ public:
*/
*/
int
tuxReadPk
(
Uint32
fragPtrI
,
Uint32
pageId
,
Uint32
pageOffset
,
Uint32
*
dataOut
);
int
tuxReadPk
(
Uint32
fragPtrI
,
Uint32
pageId
,
Uint32
pageOffset
,
Uint32
*
dataOut
);
/*
* ACC reads primary key without headers into an array of words. At
* this point in ACC deconstruction, ACC still uses logical references
* to fragment and tuple.
*/
int
accReadPk
(
Uint32
tableId
,
Uint32
fragId
,
Uint32
fragPageId
,
Uint32
pageIndex
,
Uint32
*
dataOut
);
/*
/*
* TUX checks if tuple is visible to scan.
* TUX checks if tuple is visible to scan.
*/
*/
...
...
ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp
View file @
ad85a10a
...
@@ -200,8 +200,7 @@ Dbtup::tuxReadPk(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32* data
...
@@ -200,8 +200,7 @@ Dbtup::tuxReadPk(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32* data
operPtr
.
i
=
RNIL
;
operPtr
.
i
=
RNIL
;
operPtr
.
p
=
NULL
;
operPtr
.
p
=
NULL
;
// do it
// do it
int
ret
=
readAttributes
(
pagePtr
.
p
,
pageOffset
,
attrIds
,
int
ret
=
readAttributes
(
pagePtr
.
p
,
pageOffset
,
attrIds
,
numAttrs
,
dataOut
,
ZNIL
,
true
);
numAttrs
,
dataOut
,
ZNIL
,
true
);
// restore globals
// restore globals
tabptr
=
tabptr_old
;
tabptr
=
tabptr_old
;
fragptr
=
fragptr_old
;
fragptr
=
fragptr_old
;
...
@@ -229,6 +228,27 @@ Dbtup::tuxReadPk(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32* data
...
@@ -229,6 +228,27 @@ Dbtup::tuxReadPk(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32* data
return
ret
;
return
ret
;
}
}
int
Dbtup
::
accReadPk
(
Uint32
tableId
,
Uint32
fragId
,
Uint32
fragPageId
,
Uint32
pageIndex
,
Uint32
*
dataOut
)
{
ljamEntry
();
// get table
TablerecPtr
tablePtr
;
tablePtr
.
i
=
tableId
;
ptrCheckGuard
(
tablePtr
,
cnoOfTablerec
,
tablerec
);
// get fragment
FragrecordPtr
fragPtr
;
getFragmentrec
(
fragPtr
,
fragId
,
tablePtr
.
p
);
// get real page id and tuple offset
PagePtr
pagePtr
;
Uint32
pageId
=
getRealpid
(
fragPtr
.
p
,
fragPageId
);
ndbrequire
((
pageIndex
&
0x1
)
==
0
);
Uint32
pageOffset
=
ZPAGE_HEADER_SIZE
+
(
pageIndex
>>
1
)
*
tablePtr
.
p
->
tupheadsize
;
// use TUX routine - optimize later
int
ret
=
tuxReadPk
(
fragPtr
.
i
,
pageId
,
pageOffset
,
dataOut
);
return
ret
;
}
bool
bool
Dbtup
::
tuxQueryTh
(
Uint32
fragPtrI
,
Uint32
tupAddr
,
Uint32
tupVersion
,
Uint32
transId1
,
Uint32
transId2
,
Uint32
savePointId
)
Dbtup
::
tuxQueryTh
(
Uint32
fragPtrI
,
Uint32
tupAddr
,
Uint32
tupVersion
,
Uint32
transId1
,
Uint32
transId2
,
Uint32
savePointId
)
{
{
...
...
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