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
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
Show 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
...
@@ -1950,8 +1950,11 @@ NdbDictInterface::create_index_obj_from_table(NdbIndexImpl** dst,
...
@@ -1950,8 +1950,11 @@ NdbDictInterface::create_index_obj_from_table(NdbIndexImpl** dst,
idx
->
m_logging
=
tab
->
m_logging
;
idx
->
m_logging
=
tab
->
m_logging
;
// skip last attribute (NDB$PK or NDB$TNODE)
// skip last attribute (NDB$PK or NDB$TNODE)
Uint32
distKeys
=
0
;
const
Uint32
distKeys
=
prim
->
m_noOfDistributionKeys
;
for
(
unsigned
i
=
0
;
i
+
1
<
tab
->
m_columns
.
size
();
i
++
){
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
*
org
=
tab
->
m_columns
[
i
];
NdbColumnImpl
*
col
=
new
NdbColumnImpl
;
NdbColumnImpl
*
col
=
new
NdbColumnImpl
;
...
@@ -1969,20 +1972,24 @@ NdbDictInterface::create_index_obj_from_table(NdbIndexImpl** dst,
...
@@ -1969,20 +1972,24 @@ NdbDictInterface::create_index_obj_from_table(NdbIndexImpl** dst,
idx
->
m_key_ids
[
key_id
]
=
i
;
idx
->
m_key_ids
[
key_id
]
=
i
;
col
->
m_keyInfoPos
=
key_id
;
col
->
m_keyInfoPos
=
key_id
;
/**
if
(
type
==
NdbDictionary
::
Index
::
OrderedIndex
&&
* Fix distribution key stuff for ordered indexes
(
primCol
->
m_distributionKey
||
*/
(
distKeys
==
0
&&
primCol
->
getPrimaryKey
())))
if
(
type
==
NdbDictionary
::
Index
::
OrderedIndex
)
{
if
(
primCol
->
m_distributionKey
||
(
prim
->
m_noOfDistributionKeys
==
0
&&
primCol
->
getPrimaryKey
()))
{
{
distKeys
++
;
keyCount
--
;
org
->
m_distributionKey
=
1
;
org
->
m_distributionKey
=
1
;
}
}
}
}
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
;
}
}
tab
->
m_noOfDistributionKeys
=
distKeys
;
*
dst
=
idx
;
*
dst
=
idx
;
return
0
;
return
0
;
...
...
ndb/src/ndbapi/NdbOperationSearch.cpp
View file @
6105fa4d
...
@@ -512,8 +512,10 @@ NdbOperation::handle_distribution_key(const Uint64* value, Uint32 len)
...
@@ -512,8 +512,10 @@ NdbOperation::handle_distribution_key(const Uint64* value, Uint32 len)
{
{
setPartitionHash
(
value
,
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
* 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)
...
@@ -1304,6 +1304,9 @@ inline int ha_ndbcluster::next_result(byte *buf)
int
res
;
int
res
;
DBUG_ENTER
(
"next_result"
);
DBUG_ENTER
(
"next_result"
);
if
(
!
m_active_cursor
)
DBUG_RETURN
(
HA_ERR_END_OF_FILE
);
if
((
res
=
fetch_next
(
m_active_cursor
))
==
0
)
if
((
res
=
fetch_next
(
m_active_cursor
))
==
0
)
{
{
DBUG_PRINT
(
"info"
,
(
"One more record found"
));
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