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
64eb1621
Commit
64eb1621
authored
Oct 25, 2004
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb
parents
8c797644
40e93b00
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
36 deletions
+43
-36
ndb/src/ndbapi/NdbIndexOperation.cpp
ndb/src/ndbapi/NdbIndexOperation.cpp
+18
-17
ndb/src/ndbapi/NdbOperationSearch.cpp
ndb/src/ndbapi/NdbOperationSearch.cpp
+20
-16
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+5
-3
No files found.
ndb/src/ndbapi/NdbIndexOperation.cpp
View file @
64eb1621
...
...
@@ -242,6 +242,24 @@ int NdbIndexOperation::equal_impl(const NdbColumnImpl* tAttrInfo,
m_theIndexDefined
[
i
][
2
]
=
true
;
Uint32
sizeInBytes
=
tAttrInfo
->
m_attrSize
*
tAttrInfo
->
m_arraySize
;
{
/*************************************************************************
* Check if the pointer of the value passed is aligned on a 4 byte
* boundary. If so only assign the pointer to the internal variable
* aValue. If it is not aligned then we start by copying the value to
* tempData and use this as aValue instead.
*************************************************************************/
const
int
attributeSize
=
sizeInBytes
;
const
int
slack
=
sizeInBytes
&
3
;
if
((((
UintPtr
)
aValue
&
3
)
!=
0
)
||
(
slack
!=
0
)){
memcpy
(
&
tempData
[
0
],
aValue
,
attributeSize
);
aValue
=
(
char
*
)
&
tempData
[
0
];
if
(
slack
!=
0
)
{
char
*
tmp
=
(
char
*
)
&
tempData
[
0
];
memset
(
&
tmp
[
attributeSize
],
0
,
(
4
-
slack
));
}
//if
}
//if
}
const
char
*
aValueToWrite
=
aValue
;
CHARSET_INFO
*
cs
=
tAttrInfo
->
m_cs
;
...
...
@@ -294,25 +312,8 @@ int NdbIndexOperation::equal_impl(const NdbColumnImpl* tAttrInfo,
m_theIndexLen = m_theIndexLen + tAttrLenInWords;
}//if
#endif
/*************************************************************************
* Check if the pointer of the value passed is aligned on a 4 byte
* boundary. If so only assign the pointer to the internal variable
* aValue. If it is not aligned then we start by copying the value to
* tempData and use this as aValue instead.
*************************************************************************/
const
int
attributeSize
=
sizeInBytes
;
const
int
slack
=
sizeInBytes
&
3
;
int
tDistrKey
=
tAttrInfo
->
m_distributionKey
;
int
tDistrGroup
=
tAttrInfo
->
m_distributionGroup
;
if
((((
UintPtr
)
aValue
&
3
)
!=
0
)
||
(
slack
!=
0
)){
memcpy
(
&
tempData
[
0
],
aValue
,
attributeSize
);
aValue
=
(
char
*
)
&
tempData
[
0
];
if
(
slack
!=
0
)
{
char
*
tmp
=
(
char
*
)
&
tempData
[
0
];
memset
(
&
tmp
[
attributeSize
],
0
,
(
4
-
slack
));
}
//if
}
//if
OperationType
tOpType
=
theOperationType
;
if
((
tDistrKey
!=
1
)
&&
(
tDistrGroup
!=
1
))
{
;
...
...
ndb/src/ndbapi/NdbOperationSearch.cpp
View file @
64eb1621
...
...
@@ -118,6 +118,25 @@ NdbOperation::equal_impl(const NdbColumnImpl* tAttrInfo,
theTupleKeyDefined
[
i
][
2
]
=
true
;
Uint32
sizeInBytes
=
tAttrInfo
->
m_attrSize
*
tAttrInfo
->
m_arraySize
;
{
/***************************************************************************
* Check if the pointer of the value passed is aligned on a 4 byte
* boundary. If so only assign the pointer to the internal variable
* aValue. If it is not aligned then we start by copying the value to
* tempData and use this as aValue instead.
*****************************************************************************/
const
int
attributeSize
=
sizeInBytes
;
const
int
slack
=
sizeInBytes
&
3
;
if
((((
UintPtr
)
aValue
&
3
)
!=
0
)
||
(
slack
!=
0
)){
memcpy
(
&
tempData
[
0
],
aValue
,
attributeSize
);
aValue
=
(
char
*
)
&
tempData
[
0
];
if
(
slack
!=
0
)
{
char
*
tmp
=
(
char
*
)
&
tempData
[
0
];
memset
(
&
tmp
[
attributeSize
],
0
,
(
4
-
slack
));
}
//if
}
//if
}
const
char
*
aValueToWrite
=
aValue
;
CHARSET_INFO
*
cs
=
tAttrInfo
->
m_cs
;
...
...
@@ -170,24 +189,9 @@ NdbOperation::equal_impl(const NdbColumnImpl* tAttrInfo,
theTupKeyLen = theTupKeyLen + tAttrLenInWords;
}//if
#endif
/***************************************************************************
* Check if the pointer of the value passed is aligned on a 4 byte
* boundary. If so only assign the pointer to the internal variable
* aValue. If it is not aligned then we start by copying the value to
* tempData and use this as aValue instead.
*****************************************************************************/
const
int
attributeSize
=
sizeInBytes
;
const
int
slack
=
sizeInBytes
&
3
;
int
tDistrKey
=
tAttrInfo
->
m_distributionKey
;
int
tDistrGroup
=
tAttrInfo
->
m_distributionGroup
;
if
((((
UintPtr
)
aValue
&
3
)
!=
0
)
||
(
slack
!=
0
)){
memcpy
(
&
tempData
[
0
],
aValue
,
attributeSize
);
aValue
=
(
char
*
)
&
tempData
[
0
];
if
(
slack
!=
0
)
{
char
*
tmp
=
(
char
*
)
&
tempData
[
0
];
memset
(
&
tmp
[
attributeSize
],
0
,
(
4
-
slack
));
}
//if
}
//if
OperationType
tOpType
=
theOperationType
;
if
((
tDistrKey
!=
1
)
&&
(
tDistrGroup
!=
1
))
{
;
...
...
sql/ha_ndbcluster.cc
View file @
64eb1621
...
...
@@ -1261,7 +1261,7 @@ int ha_ndbcluster::set_bounds(NdbIndexScanOperation *op,
const
uint
key_parts
=
key_info
->
key_parts
;
uint
key_tot_len
[
2
];
uint
tot_len
;
int
i
,
j
;
u
int
i
,
j
;
DBUG_ENTER
(
"set_bounds"
);
DBUG_PRINT
(
"info"
,
(
"key_parts=%d"
,
key_parts
));
...
...
@@ -3877,13 +3877,14 @@ extern "C" byte* tables_get_key(const char *entry, uint *length,
int
ndbcluster_find_files
(
THD
*
thd
,
const
char
*
db
,
const
char
*
path
,
const
char
*
wild
,
bool
dir
,
List
<
char
>
*
files
)
{
DBUG_ENTER
(
"ndbcluster_find_files"
);
DBUG_PRINT
(
"enter"
,
(
"db: %s"
,
db
));
{
// extra bracket to avoid gcc 2.95.3 warning
uint
i
;
Ndb
*
ndb
;
char
name
[
FN_REFLEN
];
HASH
ndb_tables
,
ok_tables
;
NdbDictionary
::
Dictionary
::
List
list
;
DBUG_ENTER
(
"ndbcluster_find_files"
);
DBUG_PRINT
(
"enter"
,
(
"db: %s"
,
db
));
if
(
!
(
ndb
=
check_ndb_in_thd
(
thd
)))
DBUG_RETURN
(
HA_ERR_NO_CONNECTION
);
...
...
@@ -4023,6 +4024,7 @@ int ndbcluster_find_files(THD *thd,const char *db,const char *path,
hash_free
(
&
ok_tables
);
hash_free
(
&
ndb_tables
);
}
// extra bracket to avoid gcc 2.95.3 warning
DBUG_RETURN
(
0
);
}
...
...
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