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
6105fa4d
Commit
6105fa4d
authored
Dec 15, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wl2240 - ndb partitioning bug fixes for range scans
parent
e36d064a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
15 deletions
+27
-15
ndb/src/ndbapi/NdbDictionaryImpl.cpp
ndb/src/ndbapi/NdbDictionaryImpl.cpp
+21
-14
ndb/src/ndbapi/NdbOperationSearch.cpp
ndb/src/ndbapi/NdbOperationSearch.cpp
+3
-1
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+3
-0
No files found.
ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
6105fa4d
...
...
@@ -1949,9 +1949,12 @@ NdbDictInterface::create_index_obj_from_table(NdbIndexImpl** dst,
NdbDictionary
::
Index
::
Type
type
=
idx
->
m_type
=
tab
->
m_indexType
;
idx
->
m_logging
=
tab
->
m_logging
;
// skip last attribute (NDB$PK or NDB$TNODE)
Uint32
distKeys
=
0
;
for
(
unsigned
i
=
0
;
i
+
1
<
tab
->
m_columns
.
size
();
i
++
){
const
Uint32
distKeys
=
prim
->
m_noOfDistributionKeys
;
Uint32
keyCount
=
(
distKeys
?
distKeys
:
prim
->
m_noOfKeys
);
unsigned
i
;
for
(
i
=
0
;
i
+
1
<
tab
->
m_columns
.
size
();
i
++
){
NdbColumnImpl
*
org
=
tab
->
m_columns
[
i
];
NdbColumnImpl
*
col
=
new
NdbColumnImpl
;
...
...
@@ -1969,20 +1972,24 @@ NdbDictInterface::create_index_obj_from_table(NdbIndexImpl** dst,
idx
->
m_key_ids
[
key_id
]
=
i
;
col
->
m_keyInfoPos
=
key_id
;
/**
* Fix distribution key stuff for ordered indexes
*/
if
(
type
==
NdbDictionary
::
Index
::
OrderedIndex
)
if
(
type
==
NdbDictionary
::
Index
::
OrderedIndex
&&
(
primCol
->
m_distributionKey
||
(
distKeys
==
0
&&
primCol
->
getPrimaryKey
())))
{
if
(
primCol
->
m_distributionKey
||
(
prim
->
m_noOfDistributionKeys
==
0
&&
primCol
->
getPrimaryKey
()))
{
distKeys
++
;
org
->
m_distributionKey
=
1
;
}
keyCount
--
;
org
->
m_distributionKey
=
1
;
}
}
tab
->
m_noOfDistributionKeys
=
distKeys
;
if
(
keyCount
==
0
)
{
tab
->
m_noOfDistributionKeys
=
(
distKeys
?
distKeys
:
prim
->
m_noOfKeys
);
}
else
{
for
(
i
=
0
;
i
+
1
<
tab
->
m_columns
.
size
();
i
++
)
tab
->
m_columns
[
i
]
->
m_distributionKey
=
0
;
}
*
dst
=
idx
;
return
0
;
...
...
ndb/src/ndbapi/NdbOperationSearch.cpp
View file @
6105fa4d
...
...
@@ -512,8 +512,10 @@ NdbOperation::handle_distribution_key(const Uint64* value, Uint32 len)
{
setPartitionHash
(
value
,
len
);
}
else
else
if
(
tSignal
->
readSignalNumber
()
==
GSN_TCKEYREQ
)
{
// No support for combined distribution key and scan
/**
* Copy distribution key to linear memory
*/
...
...
sql/ha_ndbcluster.cc
View file @
6105fa4d
...
...
@@ -1304,6 +1304,9 @@ inline int ha_ndbcluster::next_result(byte *buf)
int
res
;
DBUG_ENTER
(
"next_result"
);
if
(
!
m_active_cursor
)
DBUG_RETURN
(
HA_ERR_END_OF_FILE
);
if
((
res
=
fetch_next
(
m_active_cursor
))
==
0
)
{
DBUG_PRINT
(
"info"
,
(
"One more record found"
));
...
...
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