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
328fc573
Commit
328fc573
authored
Oct 25, 2007
by
knielsen@loke.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge loke.(none):/home/knielsen/devel/mysql-5.1-telco-gca
into loke.(none):/home/knielsen/devel/mysql-5.1-new-ndb
parents
d850b107
815a6300
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
25 deletions
+20
-25
storage/ndb/include/kernel/AttributeHeader.hpp
storage/ndb/include/kernel/AttributeHeader.hpp
+5
-5
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
+3
-3
storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
+4
-6
storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
+2
-3
storage/ndb/src/ndbapi/NdbOperationDefine.cpp
storage/ndb/src/ndbapi/NdbOperationDefine.cpp
+6
-8
No files found.
storage/ndb/include/kernel/AttributeHeader.hpp
View file @
328fc573
...
...
@@ -52,8 +52,7 @@ public:
// NOTE: in 5.1 ctors and init take size in bytes
/** Initialize AttributeHeader at location aHeaderPtr */
static
AttributeHeader
&
init
(
void
*
aHeaderPtr
,
Uint32
anAttributeId
,
Uint32
aByteSize
);
static
void
init
(
Uint32
*
aHeaderPtr
,
Uint32
anAttributeId
,
Uint32
aByteSize
);
/** Returns size of AttributeHeader (usually one or two words) */
Uint32
getHeaderSize
()
const
;
// In 32-bit words
...
...
@@ -113,10 +112,11 @@ public:
*/
inline
AttributeHeader
&
AttributeHeader
::
init
(
void
*
aHeaderPtr
,
Uint32
anAttributeId
,
void
AttributeHeader
::
init
(
Uint32
*
aHeaderPtr
,
Uint32
anAttributeId
,
Uint32
aByteSize
)
{
return
*
new
(
aHeaderPtr
)
AttributeHeader
(
anAttributeId
,
aByteSize
);
AttributeHeader
ah
(
anAttributeId
,
aByteSize
);
*
aHeaderPtr
=
ah
.
m_value
;
}
inline
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
View file @
328fc573
...
...
@@ -1957,9 +1957,8 @@ int Dbtup::interpreterNextLab(Signal* signal,
Uint32
TdataForUpdate
[
3
];
Uint32
Tlen
;
AttributeHeader
&
ah
=
AttributeHeader
::
init
(
&
TdataForUpdate
[
0
],
TattrId
,
TattrNoOfWords
<<
2
);
AttributeHeader
ah
(
TattrId
,
TattrNoOfWords
<<
2
);
TdataForUpdate
[
0
]
=
ah
.
m_value
;
TdataForUpdate
[
1
]
=
TregMemBuffer
[
theRegister
+
2
];
TdataForUpdate
[
2
]
=
TregMemBuffer
[
theRegister
+
3
];
Tlen
=
TattrNoOfWords
+
1
;
...
...
@@ -1975,6 +1974,7 @@ int Dbtup::interpreterNextLab(Signal* signal,
// Write a NULL value into the attribute
/* --------------------------------------------------------- */
ah
.
setNULL
();
TdataForUpdate
[
0
]
=
ah
.
m_value
;
Tlen
=
1
;
}
int
TnoDataRW
=
updateAttributes
(
req_struct
,
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
View file @
328fc573
...
...
@@ -818,9 +818,7 @@ Dbtup::checkUpdateOfPrimaryKey(KeyReqStruct* req_struct,
Tablerec
*
const
regTabPtr
)
{
Uint32
keyReadBuffer
[
MAX_KEY_SIZE_IN_WORDS
];
Uint32
attributeHeader
;
TableDescriptor
*
attr_descr
=
req_struct
->
attr_descr
;
AttributeHeader
*
ahOut
=
(
AttributeHeader
*
)
&
attributeHeader
;
AttributeHeader
ahIn
(
*
updateBuffer
);
Uint32
attributeId
=
ahIn
.
getAttributeId
();
Uint32
attrDescriptorIndex
=
attributeId
<<
ZAD_LOG_SIZE
;
...
...
@@ -843,7 +841,7 @@ Dbtup::checkUpdateOfPrimaryKey(KeyReqStruct* req_struct,
ReadFunction
f
=
regTabPtr
->
readFunctionArray
[
attributeId
];
AttributeHeader
::
init
(
&
attributeHeader
,
attributeId
,
0
);
AttributeHeader
attributeHeader
(
attributeId
,
0
);
req_struct
->
out_buf_index
=
0
;
req_struct
->
max_read
=
MAX_KEY_SIZE_IN_WORDS
;
req_struct
->
attr_descriptor
=
attrDescriptor
;
...
...
@@ -852,12 +850,12 @@ Dbtup::checkUpdateOfPrimaryKey(KeyReqStruct* req_struct,
req_struct
->
xfrm_flag
=
true
;
ndbrequire
((
this
->*
f
)(
&
keyReadBuffer
[
0
],
req_struct
,
ahOut
,
&
attributeHeader
,
attributeOffset
));
req_struct
->
xfrm_flag
=
tmp
;
ndbrequire
(
req_struct
->
out_buf_index
==
a
hOut
->
getDataSize
());
if
(
ahIn
.
getDataSize
()
!=
a
hOut
->
getDataSize
())
{
ndbrequire
(
req_struct
->
out_buf_index
==
a
ttributeHeader
.
getDataSize
());
if
(
ahIn
.
getDataSize
()
!=
a
ttributeHeader
.
getDataSize
())
{
jam
();
return
true
;
}
...
...
storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
View file @
328fc573
...
...
@@ -1169,9 +1169,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
)
{
...
...
@@ -1200,6 +1198,7 @@ DbUtil::prepareOperation(Signal* signal, PreparePtr prepPtr)
return
;
}
}
*
(
attrMappingIt
.
data
)
=
attrMap
.
m_value
;
#if 0
ndbout << "BEFORE: attrLength: " << attrLength << endl;
#endif
...
...
storage/ndb/src/ndbapi/NdbOperationDefine.cpp
View file @
328fc573
...
...
@@ -408,9 +408,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.
/************************************************************************
...
...
@@ -536,12 +535,11 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
tAttrId
=
tAttrInfo
->
m_attrId
;
m_no_disk_flag
&=
(
tAttrInfo
->
m_storageType
==
NDB_STORAGETYPE_DISK
?
0
:
1
);
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
);
...
...
@@ -577,8 +575,8 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
// Excluding bits in last word
const
Uint32
sizeInWords
=
sizeInBytes
/
4
;
(
void
)
AttributeHeader
::
init
(
&
ahValue
,
tAttrId
,
sizeInBytes
);
insertATTRINFO
(
ah
V
alue
);
AttributeHeader
ah
(
tAttrId
,
sizeInBytes
);
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