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
60474c8b
Commit
60474c8b
authored
Jun 07, 2005
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - backup/restore, fix count of dist keys
better fix for bug#10190
parent
7050d08f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
ndb/src/ndbapi/NdbDictionaryImpl.cpp
ndb/src/ndbapi/NdbDictionaryImpl.cpp
+8
-6
No files found.
ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
60474c8b
...
...
@@ -1605,6 +1605,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
bool
haveAutoIncrement
=
false
;
Uint64
autoIncrementValue
=
0
;
Uint32
distKeys
=
0
;
for
(
i
=
0
;
i
<
sz
;
i
++
){
const
NdbColumnImpl
*
col
=
impl
.
m_columns
[
i
];
if
(
col
==
0
)
...
...
@@ -1616,7 +1617,9 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
}
haveAutoIncrement
=
true
;
autoIncrementValue
=
col
->
m_autoIncrementInitialValue
;
}
}
if
(
col
->
m_distributionKey
)
distKeys
++
;
}
// Check max length of frm data
...
...
@@ -1649,11 +1652,10 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
abort
();
}
int
distKeys
=
impl
.
m_noOfDistributionKeys
&&
impl
.
m_noOfDistributionKeys
<
impl
.
m_noOfKeys
;
if
(
distKeys
==
impl
.
m_noOfKeys
)
distKeys
=
0
;
impl
.
m_noOfDistributionKeys
=
distKeys
;
assert
(
distKeys
==
0
||
distKeys
==
1
);
for
(
i
=
0
;
i
<
sz
;
i
++
){
const
NdbColumnImpl
*
col
=
impl
.
m_columns
[
i
];
if
(
col
==
0
)
...
...
@@ -1665,7 +1667,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
tmpAttr
.
AttributeId
=
i
;
tmpAttr
.
AttributeKeyFlag
=
col
->
m_pk
;
tmpAttr
.
AttributeNullableFlag
=
col
->
m_nullable
;
tmpAttr
.
AttributeDKey
=
distKeys
*
col
->
m_distributionKey
;
tmpAttr
.
AttributeDKey
=
distKeys
?
col
->
m_distributionKey
:
0
;
tmpAttr
.
AttributeExtType
=
(
Uint32
)
col
->
m_type
;
tmpAttr
.
AttributeExtPrecision
=
((
unsigned
)
col
->
m_precision
&
0xFFFF
);
...
...
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