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
75a5c28d
Commit
75a5c28d
authored
Oct 25, 2007
by
knielsen@loke.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge loke.(none):/home/knielsen/devel/bug31761
into loke.(none):/home/knielsen/devel/mysql-5.0-ndb
parents
4785c573
a7f78755
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
24 deletions
+21
-24
ndb/include/kernel/AttributeHeader.hpp
ndb/include/kernel/AttributeHeader.hpp
+5
-5
ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
+3
-2
ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
+5
-6
ndb/src/kernel/blocks/dbutil/DbUtil.cpp
ndb/src/kernel/blocks/dbutil/DbUtil.cpp
+2
-3
ndb/src/ndbapi/NdbOperationDefine.cpp
ndb/src/ndbapi/NdbOperationDefine.cpp
+6
-8
No files found.
ndb/include/kernel/AttributeHeader.hpp
View file @
75a5c28d
...
...
@@ -41,8 +41,7 @@ public:
STATIC_CONST
(
FRAGMENT_MEMORY
=
0xFFF9
);
/** Initialize AttributeHeader at location aHeaderPtr */
static
AttributeHeader
&
init
(
void
*
aHeaderPtr
,
Uint32
anAttributeId
,
Uint32
aDataSize
);
static
void
init
(
Uint32
*
aHeaderPtr
,
Uint32
anAttributeId
,
Uint32
aDataSize
);
/** Returns size of AttributeHeader (usually one or two words) */
Uint32
getHeaderSize
()
const
;
// In 32-bit words
...
...
@@ -100,10 +99,11 @@ public:
*/
inline
AttributeHeader
&
AttributeHeader
::
init
(
void
*
aHeaderPtr
,
Uint32
anAttributeId
,
Uint32
aDataSize
)
void
AttributeHeader
::
init
(
Uint32
*
aHeaderPtr
,
Uint32
anAttributeId
,
Uint32
aDataSize
)
{
return
*
new
(
aHeaderPtr
)
AttributeHeader
(
anAttributeId
,
aDataSize
);
AttributeHeader
ah
(
anAttributeId
,
aDataSize
);
*
aHeaderPtr
=
ah
.
m_value
;
}
inline
...
...
ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
View file @
75a5c28d
...
...
@@ -1577,8 +1577,8 @@ int Dbtup::interpreterNextLab(Signal* signal,
Uint32
TdataForUpdate
[
3
];
Uint32
Tlen
;
AttributeHeader
&
ah
=
AttributeHeader
::
init
(
&
TdataForUpdate
[
0
],
TattrId
,
TattrNoOfWords
)
;
AttributeHeader
ah
(
TattrId
,
TattrNoOfWords
);
TdataForUpdate
[
0
]
=
ah
.
m_value
;
TdataForUpdate
[
1
]
=
TregMemBuffer
[
theRegister
+
2
];
TdataForUpdate
[
2
]
=
TregMemBuffer
[
theRegister
+
3
];
Tlen
=
TattrNoOfWords
+
1
;
...
...
@@ -1594,6 +1594,7 @@ int Dbtup::interpreterNextLab(Signal* signal,
// Write a NULL value into the attribute
/* --------------------------------------------------------- */
ah
.
setNULL
();
TdataForUpdate
[
0
]
=
ah
.
m_value
;
Tlen
=
1
;
}
//if
int
TnoDataRW
=
updateAttributes
(
pagePtr
,
...
...
ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
View file @
75a5c28d
...
...
@@ -676,8 +676,6 @@ bool
Dbtup
::
checkUpdateOfPrimaryKey
(
Uint32
*
updateBuffer
,
Tablerec
*
const
regTabPtr
)
{
Uint32
keyReadBuffer
[
MAX_KEY_SIZE_IN_WORDS
];
Uint32
attributeHeader
;
AttributeHeader
*
ahOut
=
(
AttributeHeader
*
)
&
attributeHeader
;
AttributeHeader
ahIn
(
*
updateBuffer
);
Uint32
attributeId
=
ahIn
.
getAttributeId
();
Uint32
attrDescriptorIndex
=
regTabPtr
->
tabDescriptor
+
(
attributeId
<<
ZAD_LOG_SIZE
);
...
...
@@ -700,16 +698,17 @@ Dbtup::checkUpdateOfPrimaryKey(Uint32* updateBuffer, Tablerec* const regTabPtr)
ReadFunction
f
=
regTabPtr
->
readFunctionArray
[
attributeId
];
AttributeHeader
::
init
(
&
attributeHeader
,
attributeId
,
0
);
AttributeHeader
attributeHeader
(
attributeId
,
0
);
tOutBufIndex
=
0
;
tMaxRead
=
MAX_KEY_SIZE_IN_WORDS
;
bool
tmp
=
tXfrmFlag
;
tXfrmFlag
=
true
;
ndbrequire
((
this
->*
f
)(
&
keyReadBuffer
[
0
],
ahOut
,
attrDescriptor
,
attributeOffset
));
ndbrequire
((
this
->*
f
)(
&
keyReadBuffer
[
0
],
&
attributeHeader
,
attrDescriptor
,
attributeOffset
));
tXfrmFlag
=
tmp
;
ndbrequire
(
tOutBufIndex
==
a
hOut
->
getDataSize
());
if
(
ahIn
.
getDataSize
()
!=
a
hOut
->
getDataSize
())
{
ndbrequire
(
tOutBufIndex
==
a
ttributeHeader
.
getDataSize
());
if
(
ahIn
.
getDataSize
()
!=
a
ttributeHeader
.
getDataSize
())
{
ljam
();
return
true
;
}
//if
...
...
ndb/src/kernel/blocks/dbutil/DbUtil.cpp
View file @
75a5c28d
...
...
@@ -1168,9 +1168,7 @@ DbUtil::prepareOperation(Signal* signal, PreparePtr prepPtr)
/**************************************************************
* Attribute found - store in mapping (AttributeId, Position)
**************************************************************/
AttributeHeader
&
attrMap
=
AttributeHeader
::
init
(
attrMappingIt
.
data
,
attrDesc
.
AttributeId
,
// 1. Store AttrId
AttributeHeader
attrMap
(
attrDesc
.
AttributeId
,
// 1. Store AttrId
0
);
if
(
attrDesc
.
AttributeKeyFlag
)
{
...
...
@@ -1199,6 +1197,7 @@ DbUtil::prepareOperation(Signal* signal, PreparePtr prepPtr)
return
;
}
}
*
(
attrMappingIt
.
data
)
=
attrMap
.
m_value
;
#if 0
ndbout << "BEFORE: attrLength: " << attrLength << endl;
#endif
...
...
ndb/src/ndbapi/NdbOperationDefine.cpp
View file @
75a5c28d
...
...
@@ -392,9 +392,8 @@ NdbOperation::getValue_impl(const NdbColumnImpl* tAttrInfo, char* aValue)
return
NULL
;
}
//if
}
//if
Uint32
ah
;
AttributeHeader
::
init
(
&
ah
,
tAttrInfo
->
m_attrId
,
0
);
if
(
insertATTRINFO
(
ah
)
!=
-
1
)
{
AttributeHeader
ah
(
tAttrInfo
->
m_attrId
,
0
);
if
(
insertATTRINFO
(
ah
.
m_value
)
!=
-
1
)
{
// Insert Attribute Id into ATTRINFO part.
/************************************************************************
...
...
@@ -525,12 +524,11 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
tAttrId
=
tAttrInfo
->
m_attrId
;
const
char
*
aValue
=
aValuePassed
;
Uint32
ahValue
;
if
(
aValue
==
NULL
)
{
if
(
tAttrInfo
->
m_nullable
)
{
AttributeHeader
&
ah
=
AttributeHeader
::
init
(
&
ahValue
,
tAttrId
,
0
);
AttributeHeader
ah
(
tAttrId
,
0
);
ah
.
setNULL
();
insertATTRINFO
(
ah
V
alue
);
insertATTRINFO
(
ah
.
m_v
alue
);
// Insert Attribute Id with the value
// NULL into ATTRINFO part.
DBUG_RETURN
(
0
);
...
...
@@ -563,8 +561,8 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
}
//if
const
Uint32
totalSizeInWords
=
(
sizeInBytes
+
3
)
/
4
;
// Including bits in last word
const
Uint32
sizeInWords
=
sizeInBytes
/
4
;
// Excluding bits in last word
(
void
)
AttributeHeader
::
init
(
&
ahValue
,
tAttrId
,
totalSizeInWords
);
insertATTRINFO
(
ah
V
alue
);
AttributeHeader
ah
(
tAttrId
,
totalSizeInWords
);
insertATTRINFO
(
ah
.
m_v
alue
);
/***********************************************************************
* Check if the pointer of the value passed is aligned on a 4 byte boundary.
...
...
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