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
ff294177
Commit
ff294177
authored
Dec 15, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wl2240 - ndb - scan only 1 fragment if possible
parent
ae97c56c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
8 deletions
+28
-8
ndb/src/common/debugger/signaldata/ScanTab.cpp
ndb/src/common/debugger/signaldata/ScanTab.cpp
+1
-1
ndb/src/ndbapi/NdbDictionaryImpl.cpp
ndb/src/ndbapi/NdbDictionaryImpl.cpp
+24
-4
ndb/src/ndbapi/NdbDictionaryImpl.hpp
ndb/src/ndbapi/NdbDictionaryImpl.hpp
+2
-2
ndb/tools/restore/consumer_restore.cpp
ndb/tools/restore/consumer_restore.cpp
+1
-1
No files found.
ndb/src/common/debugger/signaldata/ScanTab.cpp
View file @
ff294177
...
@@ -41,7 +41,7 @@ printSCANTABREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiv
...
@@ -41,7 +41,7 @@ printSCANTABREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiv
sig
->
getDistributionKeyFlag
(
requestInfo
));
sig
->
getDistributionKeyFlag
(
requestInfo
));
if
(
sig
->
getDistributionKeyFlag
(
requestInfo
))
if
(
sig
->
getDistributionKeyFlag
(
requestInfo
))
fprintf
(
output
,
" DKey: %
u
"
,
sig
->
distributionKey
);
fprintf
(
output
,
" DKey: %
x
"
,
sig
->
distributionKey
);
Uint32
keyLen
=
(
sig
->
attrLenKeyLen
>>
16
);
Uint32
keyLen
=
(
sig
->
attrLenKeyLen
>>
16
);
Uint32
attrLen
=
(
sig
->
attrLenKeyLen
&
0xFFFF
);
Uint32
attrLen
=
(
sig
->
attrLenKeyLen
&
0xFFFF
);
...
...
ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
ff294177
...
@@ -1930,7 +1930,7 @@ NdbDictionaryImpl::getIndexImpl(const char * externalName,
...
@@ -1930,7 +1930,7 @@ NdbDictionaryImpl::getIndexImpl(const char * externalName,
int
int
NdbDictInterface
::
create_index_obj_from_table
(
NdbIndexImpl
**
dst
,
NdbDictInterface
::
create_index_obj_from_table
(
NdbIndexImpl
**
dst
,
const
NdbTableImpl
*
tab
,
NdbTableImpl
*
tab
,
const
NdbTableImpl
*
prim
){
const
NdbTableImpl
*
prim
){
NdbIndexImpl
*
idx
=
new
NdbIndexImpl
();
NdbIndexImpl
*
idx
=
new
NdbIndexImpl
();
idx
->
m_version
=
tab
->
m_version
;
idx
->
m_version
=
tab
->
m_version
;
...
@@ -1938,23 +1938,43 @@ NdbDictInterface::create_index_obj_from_table(NdbIndexImpl** dst,
...
@@ -1938,23 +1938,43 @@ NdbDictInterface::create_index_obj_from_table(NdbIndexImpl** dst,
idx
->
m_indexId
=
tab
->
m_tableId
;
idx
->
m_indexId
=
tab
->
m_tableId
;
idx
->
m_externalName
.
assign
(
tab
->
getName
());
idx
->
m_externalName
.
assign
(
tab
->
getName
());
idx
->
m_tableName
.
assign
(
prim
->
m_externalName
);
idx
->
m_tableName
.
assign
(
prim
->
m_externalName
);
idx
->
m_type
=
tab
->
m_indexType
;
NdbDictionary
::
Index
::
Type
type
=
idx
->
m_type
=
tab
->
m_indexType
;
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
;
for
(
unsigned
i
=
0
;
i
+
1
<
tab
->
m_columns
.
size
();
i
++
){
for
(
unsigned
i
=
0
;
i
+
1
<
tab
->
m_columns
.
size
();
i
++
){
NdbColumnImpl
*
org
=
tab
->
m_columns
[
i
];
NdbColumnImpl
*
col
=
new
NdbColumnImpl
;
NdbColumnImpl
*
col
=
new
NdbColumnImpl
;
// Copy column definition
// Copy column definition
*
col
=
*
tab
->
m_columns
[
i
]
;
*
col
=
*
org
;
idx
->
m_columns
.
push_back
(
col
);
idx
->
m_columns
.
push_back
(
col
);
/**
/**
* reverse map
* reverse map
*/
*/
int
key_id
=
prim
->
getColumn
(
col
->
getName
())
->
getColumnNo
();
const
NdbColumnImpl
*
primCol
=
prim
->
getColumn
(
col
->
getName
());
int
key_id
=
primCol
->
getColumnNo
();
int
fill
=
-
1
;
int
fill
=
-
1
;
idx
->
m_key_ids
.
fill
(
key_id
,
fill
);
idx
->
m_key_ids
.
fill
(
key_id
,
fill
);
idx
->
m_key_ids
[
key_id
]
=
i
;
idx
->
m_key_ids
[
key_id
]
=
i
;
col
->
m_keyInfoPos
=
key_id
;
col
->
m_keyInfoPos
=
key_id
;
/**
* Fix distribution key stuff for ordered indexes
*/
if
(
type
==
NdbDictionary
::
Index
::
OrderedIndex
)
{
if
(
primCol
->
m_distributionKey
||
(
prim
->
m_noOfDistributionKeys
==
0
&&
primCol
->
getPrimaryKey
()))
{
distKeys
++
;
org
->
m_distributionKey
=
1
;
}
}
}
}
tab
->
m_noOfDistributionKeys
=
distKeys
;
*
dst
=
idx
;
*
dst
=
idx
;
return
0
;
return
0
;
...
...
ndb/src/ndbapi/NdbDictionaryImpl.hpp
View file @
ff294177
...
@@ -303,8 +303,8 @@ public:
...
@@ -303,8 +303,8 @@ public:
bool
fullyQualifiedNames
);
bool
fullyQualifiedNames
);
static
int
create_index_obj_from_table
(
NdbIndexImpl
**
dst
,
static
int
create_index_obj_from_table
(
NdbIndexImpl
**
dst
,
const
NdbTableImpl
*
,
NdbTableImpl
*
index_table
,
const
NdbTableImpl
*
);
const
NdbTableImpl
*
primary_table
);
NdbError
&
m_error
;
NdbError
&
m_error
;
private:
private:
...
...
ndb/tools/restore/consumer_restore.cpp
View file @
ff294177
...
@@ -209,7 +209,7 @@ BackupRestore::endOfTables(){
...
@@ -209,7 +209,7 @@ BackupRestore::endOfTables(){
NdbDictionary
::
Dictionary
*
dict
=
m_ndb
->
getDictionary
();
NdbDictionary
::
Dictionary
*
dict
=
m_ndb
->
getDictionary
();
for
(
size_t
i
=
0
;
i
<
m_indexes
.
size
();
i
++
){
for
(
size_t
i
=
0
;
i
<
m_indexes
.
size
();
i
++
){
const
NdbTableImpl
&
indtab
=
NdbTableImpl
::
getImpl
(
*
m_indexes
[
i
]);
NdbTableImpl
&
indtab
=
NdbTableImpl
::
getImpl
(
*
m_indexes
[
i
]);
BaseString
tmp
(
indtab
.
m_primaryTable
.
c_str
());
BaseString
tmp
(
indtab
.
m_primaryTable
.
c_str
());
Vector
<
BaseString
>
split
;
Vector
<
BaseString
>
split
;
...
...
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