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
815a6300
Commit
815a6300
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.1-telco-gca
parents
5cf8e94b
a7f78755
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 @
815a6300
...
@@ -51,8 +51,7 @@ public:
...
@@ -51,8 +51,7 @@ public:
// NOTE: in 5.1 ctors and init take size in bytes
// NOTE: in 5.1 ctors and init take size in bytes
/** Initialize AttributeHeader at location aHeaderPtr */
/** Initialize AttributeHeader at location aHeaderPtr */
static
AttributeHeader
&
init
(
void
*
aHeaderPtr
,
Uint32
anAttributeId
,
static
void
init
(
Uint32
*
aHeaderPtr
,
Uint32
anAttributeId
,
Uint32
aByteSize
);
Uint32
aByteSize
);
/** Returns size of AttributeHeader (usually one or two words) */
/** Returns size of AttributeHeader (usually one or two words) */
Uint32
getHeaderSize
()
const
;
// In 32-bit words
Uint32
getHeaderSize
()
const
;
// In 32-bit words
...
@@ -112,10 +111,11 @@ public:
...
@@ -112,10 +111,11 @@ public:
*/
*/
inline
inline
AttributeHeader
&
AttributeHeader
::
init
(
void
*
aHeaderPtr
,
Uint32
anAttributeId
,
void
AttributeHeader
::
init
(
Uint32
*
aHeaderPtr
,
Uint32
anAttributeId
,
Uint32
aByteSize
)
Uint32
aByteSize
)
{
{
return
*
new
(
aHeaderPtr
)
AttributeHeader
(
anAttributeId
,
aByteSize
);
AttributeHeader
ah
(
anAttributeId
,
aByteSize
);
*
aHeaderPtr
=
ah
.
m_value
;
}
}
inline
inline
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
View file @
815a6300
...
@@ -1940,9 +1940,8 @@ int Dbtup::interpreterNextLab(Signal* signal,
...
@@ -1940,9 +1940,8 @@ int Dbtup::interpreterNextLab(Signal* signal,
Uint32
TdataForUpdate
[
3
];
Uint32
TdataForUpdate
[
3
];
Uint32
Tlen
;
Uint32
Tlen
;
AttributeHeader
&
ah
=
AttributeHeader
::
init
(
&
TdataForUpdate
[
0
],
AttributeHeader
ah
(
TattrId
,
TattrNoOfWords
<<
2
);
TattrId
,
TdataForUpdate
[
0
]
=
ah
.
m_value
;
TattrNoOfWords
<<
2
);
TdataForUpdate
[
1
]
=
TregMemBuffer
[
theRegister
+
2
];
TdataForUpdate
[
1
]
=
TregMemBuffer
[
theRegister
+
2
];
TdataForUpdate
[
2
]
=
TregMemBuffer
[
theRegister
+
3
];
TdataForUpdate
[
2
]
=
TregMemBuffer
[
theRegister
+
3
];
Tlen
=
TattrNoOfWords
+
1
;
Tlen
=
TattrNoOfWords
+
1
;
...
@@ -1958,6 +1957,7 @@ int Dbtup::interpreterNextLab(Signal* signal,
...
@@ -1958,6 +1957,7 @@ int Dbtup::interpreterNextLab(Signal* signal,
// Write a NULL value into the attribute
// Write a NULL value into the attribute
/* --------------------------------------------------------- */
/* --------------------------------------------------------- */
ah
.
setNULL
();
ah
.
setNULL
();
TdataForUpdate
[
0
]
=
ah
.
m_value
;
Tlen
=
1
;
Tlen
=
1
;
}
}
int
TnoDataRW
=
updateAttributes
(
req_struct
,
int
TnoDataRW
=
updateAttributes
(
req_struct
,
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
View file @
815a6300
...
@@ -802,9 +802,7 @@ Dbtup::checkUpdateOfPrimaryKey(KeyReqStruct* req_struct,
...
@@ -802,9 +802,7 @@ Dbtup::checkUpdateOfPrimaryKey(KeyReqStruct* req_struct,
Tablerec
*
const
regTabPtr
)
Tablerec
*
const
regTabPtr
)
{
{
Uint32
keyReadBuffer
[
MAX_KEY_SIZE_IN_WORDS
];
Uint32
keyReadBuffer
[
MAX_KEY_SIZE_IN_WORDS
];
Uint32
attributeHeader
;
TableDescriptor
*
attr_descr
=
req_struct
->
attr_descr
;
TableDescriptor
*
attr_descr
=
req_struct
->
attr_descr
;
AttributeHeader
*
ahOut
=
(
AttributeHeader
*
)
&
attributeHeader
;
AttributeHeader
ahIn
(
*
updateBuffer
);
AttributeHeader
ahIn
(
*
updateBuffer
);
Uint32
attributeId
=
ahIn
.
getAttributeId
();
Uint32
attributeId
=
ahIn
.
getAttributeId
();
Uint32
attrDescriptorIndex
=
attributeId
<<
ZAD_LOG_SIZE
;
Uint32
attrDescriptorIndex
=
attributeId
<<
ZAD_LOG_SIZE
;
...
@@ -827,7 +825,7 @@ Dbtup::checkUpdateOfPrimaryKey(KeyReqStruct* req_struct,
...
@@ -827,7 +825,7 @@ Dbtup::checkUpdateOfPrimaryKey(KeyReqStruct* req_struct,
ReadFunction
f
=
regTabPtr
->
readFunctionArray
[
attributeId
];
ReadFunction
f
=
regTabPtr
->
readFunctionArray
[
attributeId
];
AttributeHeader
::
init
(
&
attributeHeader
,
attributeId
,
0
);
AttributeHeader
attributeHeader
(
attributeId
,
0
);
req_struct
->
out_buf_index
=
0
;
req_struct
->
out_buf_index
=
0
;
req_struct
->
max_read
=
MAX_KEY_SIZE_IN_WORDS
;
req_struct
->
max_read
=
MAX_KEY_SIZE_IN_WORDS
;
req_struct
->
attr_descriptor
=
attrDescriptor
;
req_struct
->
attr_descriptor
=
attrDescriptor
;
...
@@ -836,12 +834,12 @@ Dbtup::checkUpdateOfPrimaryKey(KeyReqStruct* req_struct,
...
@@ -836,12 +834,12 @@ Dbtup::checkUpdateOfPrimaryKey(KeyReqStruct* req_struct,
req_struct
->
xfrm_flag
=
true
;
req_struct
->
xfrm_flag
=
true
;
ndbrequire
((
this
->*
f
)(
&
keyReadBuffer
[
0
],
ndbrequire
((
this
->*
f
)(
&
keyReadBuffer
[
0
],
req_struct
,
req_struct
,
ahOut
,
&
attributeHeader
,
attributeOffset
));
attributeOffset
));
req_struct
->
xfrm_flag
=
tmp
;
req_struct
->
xfrm_flag
=
tmp
;
ndbrequire
(
req_struct
->
out_buf_index
==
a
hOut
->
getDataSize
());
ndbrequire
(
req_struct
->
out_buf_index
==
a
ttributeHeader
.
getDataSize
());
if
(
ahIn
.
getDataSize
()
!=
a
hOut
->
getDataSize
())
{
if
(
ahIn
.
getDataSize
()
!=
a
ttributeHeader
.
getDataSize
())
{
ljam
();
ljam
();
return
true
;
return
true
;
}
}
...
...
storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
View file @
815a6300
...
@@ -1169,9 +1169,7 @@ DbUtil::prepareOperation(Signal* signal, PreparePtr prepPtr)
...
@@ -1169,9 +1169,7 @@ DbUtil::prepareOperation(Signal* signal, PreparePtr prepPtr)
/**************************************************************
/**************************************************************
* Attribute found - store in mapping (AttributeId, Position)
* Attribute found - store in mapping (AttributeId, Position)
**************************************************************/
**************************************************************/
AttributeHeader
&
attrMap
=
AttributeHeader
attrMap
(
attrDesc
.
AttributeId
,
// 1. Store AttrId
AttributeHeader
::
init
(
attrMappingIt
.
data
,
attrDesc
.
AttributeId
,
// 1. Store AttrId
0
);
0
);
if
(
attrDesc
.
AttributeKeyFlag
)
{
if
(
attrDesc
.
AttributeKeyFlag
)
{
...
@@ -1200,6 +1198,7 @@ DbUtil::prepareOperation(Signal* signal, PreparePtr prepPtr)
...
@@ -1200,6 +1198,7 @@ DbUtil::prepareOperation(Signal* signal, PreparePtr prepPtr)
return
;
return
;
}
}
}
}
*
(
attrMappingIt
.
data
)
=
attrMap
.
m_value
;
#if 0
#if 0
ndbout << "BEFORE: attrLength: " << attrLength << endl;
ndbout << "BEFORE: attrLength: " << attrLength << endl;
#endif
#endif
...
...
storage/ndb/src/ndbapi/NdbOperationDefine.cpp
View file @
815a6300
...
@@ -363,9 +363,8 @@ NdbOperation::getValue_impl(const NdbColumnImpl* tAttrInfo, char* aValue)
...
@@ -363,9 +363,8 @@ NdbOperation::getValue_impl(const NdbColumnImpl* tAttrInfo, char* aValue)
return
NULL
;
return
NULL
;
}
//if
}
//if
}
//if
}
//if
Uint32
ah
;
AttributeHeader
ah
(
tAttrInfo
->
m_attrId
,
0
);
AttributeHeader
::
init
(
&
ah
,
tAttrInfo
->
m_attrId
,
0
);
if
(
insertATTRINFO
(
ah
.
m_value
)
!=
-
1
)
{
if
(
insertATTRINFO
(
ah
)
!=
-
1
)
{
// Insert Attribute Id into ATTRINFO part.
// Insert Attribute Id into ATTRINFO part.
/************************************************************************
/************************************************************************
...
@@ -491,12 +490,11 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
...
@@ -491,12 +490,11 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
tAttrId
=
tAttrInfo
->
m_attrId
;
tAttrId
=
tAttrInfo
->
m_attrId
;
m_no_disk_flag
&=
(
tAttrInfo
->
m_storageType
==
NDB_STORAGETYPE_DISK
?
0
:
1
);
m_no_disk_flag
&=
(
tAttrInfo
->
m_storageType
==
NDB_STORAGETYPE_DISK
?
0
:
1
);
const
char
*
aValue
=
aValuePassed
;
const
char
*
aValue
=
aValuePassed
;
Uint32
ahValue
;
if
(
aValue
==
NULL
)
{
if
(
aValue
==
NULL
)
{
if
(
tAttrInfo
->
m_nullable
)
{
if
(
tAttrInfo
->
m_nullable
)
{
AttributeHeader
&
ah
=
AttributeHeader
::
init
(
&
ahValue
,
tAttrId
,
0
);
AttributeHeader
ah
(
tAttrId
,
0
);
ah
.
setNULL
();
ah
.
setNULL
();
insertATTRINFO
(
ah
V
alue
);
insertATTRINFO
(
ah
.
m_v
alue
);
// Insert Attribute Id with the value
// Insert Attribute Id with the value
// NULL into ATTRINFO part.
// NULL into ATTRINFO part.
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
...
@@ -534,8 +532,8 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
...
@@ -534,8 +532,8 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
const
Uint32
totalSizeInWords
=
(
sizeInBytes
+
3
)
/
4
;
const
Uint32
totalSizeInWords
=
(
sizeInBytes
+
3
)
/
4
;
// Excluding bits in last word
// Excluding bits in last word
const
Uint32
sizeInWords
=
sizeInBytes
/
4
;
const
Uint32
sizeInWords
=
sizeInBytes
/
4
;
AttributeHeader
&
ah
=
AttributeHeader
::
init
(
&
ahValue
,
tAttrId
,
sizeInBytes
);
AttributeHeader
ah
(
tAttrId
,
sizeInBytes
);
insertATTRINFO
(
ah
V
alue
);
insertATTRINFO
(
ah
.
m_v
alue
);
/***********************************************************************
/***********************************************************************
* Check if the pointer of the value passed is aligned on a 4 byte boundary.
* 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