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
96cfb191
Commit
96cfb191
authored
Aug 07, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - bug#21478
make fragment logpart in DIH "global"
parent
4db1bba0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+7
-4
No files found.
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
View file @
96cfb191
...
@@ -6628,6 +6628,7 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal)
...
@@ -6628,6 +6628,7 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal)
ptrCheckGuard
(
NGPtr
,
MAX_NDB_NODES
,
nodeGroupRecord
);
ptrCheckGuard
(
NGPtr
,
MAX_NDB_NODES
,
nodeGroupRecord
);
const
Uint32
max
=
NGPtr
.
p
->
nodeCount
;
const
Uint32
max
=
NGPtr
.
p
->
nodeCount
;
fragments
[
count
++
]
=
c_nextLogPart
++
;
// Store logpart first
Uint32
tmp
=
next_replica_node
[
NGPtr
.
i
];
Uint32
tmp
=
next_replica_node
[
NGPtr
.
i
];
for
(
Uint32
replicaNo
=
0
;
replicaNo
<
noOfReplicas
;
replicaNo
++
)
for
(
Uint32
replicaNo
=
0
;
replicaNo
<
noOfReplicas
;
replicaNo
++
)
{
{
...
@@ -6674,7 +6675,8 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal)
...
@@ -6674,7 +6675,8 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal)
FragmentstorePtr
fragPtr
;
FragmentstorePtr
fragPtr
;
ReplicaRecordPtr
replicaPtr
;
ReplicaRecordPtr
replicaPtr
;
getFragstore
(
primTabPtr
.
p
,
fragNo
,
fragPtr
);
getFragstore
(
primTabPtr
.
p
,
fragNo
,
fragPtr
);
fragments
[
count
++
]
=
fragPtr
.
p
->
preferredPrimary
;
fragments
[
count
++
]
=
c_nextLogPart
++
;
fragments
[
count
++
]
=
fragPtr
.
p
->
preferredPrimary
;
for
(
replicaPtr
.
i
=
fragPtr
.
p
->
storedReplicas
;
for
(
replicaPtr
.
i
=
fragPtr
.
p
->
storedReplicas
;
replicaPtr
.
i
!=
RNIL
;
replicaPtr
.
i
!=
RNIL
;
replicaPtr
.
i
=
replicaPtr
.
p
->
nextReplica
)
{
replicaPtr
.
i
=
replicaPtr
.
p
->
nextReplica
)
{
...
@@ -6697,7 +6699,7 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal)
...
@@ -6697,7 +6699,7 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal)
}
}
}
}
}
}
ndbrequire
(
count
==
(
2U
+
noOfReplicas
*
noOfFragments
));
ndbrequire
(
count
==
(
2U
+
(
1
+
noOfReplicas
)
*
noOfFragments
));
CreateFragmentationConf
*
const
conf
=
CreateFragmentationConf
*
const
conf
=
(
CreateFragmentationConf
*
)
signal
->
getDataPtrSend
();
(
CreateFragmentationConf
*
)
signal
->
getDataPtrSend
();
...
@@ -6870,8 +6872,8 @@ void Dbdih::execDIADDTABREQ(Signal* signal)
...
@@ -6870,8 +6872,8 @@ void Dbdih::execDIADDTABREQ(Signal* signal)
FragmentstorePtr
fragPtr
;
FragmentstorePtr
fragPtr
;
Uint32
activeIndex
=
0
;
Uint32
activeIndex
=
0
;
getFragstore
(
tabPtr
.
p
,
fragId
,
fragPtr
);
getFragstore
(
tabPtr
.
p
,
fragId
,
fragPtr
);
fragPtr
.
p
->
m_log_part_id
=
fragments
[
index
++
];
fragPtr
.
p
->
preferredPrimary
=
fragments
[
index
];
fragPtr
.
p
->
preferredPrimary
=
fragments
[
index
];
fragPtr
.
p
->
m_log_part_id
=
c_nextLogPart
++
;
for
(
Uint32
i
=
0
;
i
<
noReplicas
;
i
++
)
{
for
(
Uint32
i
=
0
;
i
<
noReplicas
;
i
++
)
{
const
Uint32
nodeId
=
fragments
[
index
++
];
const
Uint32
nodeId
=
fragments
[
index
++
];
...
@@ -8543,7 +8545,8 @@ void Dbdih::openingTableErrorLab(Signal* signal, FileRecordPtr filePtr)
...
@@ -8543,7 +8545,8 @@ void Dbdih::openingTableErrorLab(Signal* signal, FileRecordPtr filePtr)
else
else
{
{
char
buf
[
256
];
char
buf
[
256
];
BaseString
::
snprintf
(
buf
,
"Error opening DIH schema files for table: %d"
,
BaseString
::
snprintf
(
buf
,
sizeof
(
buf
),
"Error opening DIH schema files for table: %d"
,
tabPtr
.
i
);
tabPtr
.
i
);
progError
(
__LINE__
,
NDBD_EXIT_AFS_NO_SUCH_FILE
,
buf
);
progError
(
__LINE__
,
NDBD_EXIT_AFS_NO_SUCH_FILE
,
buf
);
}
}
...
...
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