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
3d3d366d
Commit
3d3d366d
authored
Mar 09, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug#18040 - ndb online index build
parent
d56ca9c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+3
-5
storage/ndb/src/kernel/blocks/suma/Suma.cpp
storage/ndb/src/kernel/blocks/suma/Suma.cpp
+11
-2
storage/ndb/src/kernel/blocks/suma/Suma.hpp
storage/ndb/src/kernel/blocks/suma/Suma.hpp
+3
-1
No files found.
sql/ha_ndbcluster.cc
View file @
3d3d366d
...
@@ -1319,13 +1319,11 @@ int ha_ndbcluster::drop_indexes(Ndb *ndb, TABLE *tab)
...
@@ -1319,13 +1319,11 @@ int ha_ndbcluster::drop_indexes(Ndb *ndb, TABLE *tab)
int
error
=
0
;
int
error
=
0
;
const
char
*
index_name
;
const
char
*
index_name
;
KEY
*
key_info
=
tab
->
key_info
;
KEY
*
key_info
=
tab
->
key_info
;
const
char
**
key_name
=
tab
->
s
->
keynames
.
type_names
;
NDBDICT
*
dict
=
ndb
->
getDictionary
();
NDBDICT
*
dict
=
ndb
->
getDictionary
();
DBUG_ENTER
(
"ha_ndbcluster::drop_indexes"
);
DBUG_ENTER
(
"ha_ndbcluster::drop_indexes"
);
for
(
i
=
0
;
i
<
tab
->
s
->
keys
;
i
++
,
key_info
++
,
key_name
++
)
for
(
i
=
0
;
i
<
tab
->
s
->
keys
;
i
++
,
key_info
++
)
{
{
index_name
=
*
key_name
;
NDB_INDEX_TYPE
idx_type
=
get_index_type_from_table
(
i
);
NDB_INDEX_TYPE
idx_type
=
get_index_type_from_table
(
i
);
m_index
[
i
].
type
=
idx_type
;
m_index
[
i
].
type
=
idx_type
;
if
(
m_index
[
i
].
status
==
TO_BE_DROPPED
)
if
(
m_index
[
i
].
status
==
TO_BE_DROPPED
)
...
@@ -1346,8 +1344,8 @@ int ha_ndbcluster::drop_indexes(Ndb *ndb, TABLE *tab)
...
@@ -1346,8 +1344,8 @@ int ha_ndbcluster::drop_indexes(Ndb *ndb, TABLE *tab)
m_index
[
i
].
index
=
NULL
;
m_index
[
i
].
index
=
NULL
;
if
(
!
error
&&
unique_index
)
if
(
!
error
&&
unique_index
)
{
{
index_name
=
index
->
getName
();
index_name
=
unique_
index
->
getName
();
DBUG_PRINT
(
"info"
,
(
"Dropping index %u: %s"
,
i
,
index_name
));
DBUG_PRINT
(
"info"
,
(
"Dropping
unique
index %u: %s"
,
i
,
index_name
));
// Drop unique index from ndb
// Drop unique index from ndb
error
=
drop_ndb_index
(
index_name
);
error
=
drop_ndb_index
(
index_name
);
}
}
...
...
storage/ndb/src/kernel/blocks/suma/Suma.cpp
View file @
3d3d366d
...
@@ -1092,6 +1092,7 @@ Suma::execSUB_CREATE_REQ(Signal* signal)
...
@@ -1092,6 +1092,7 @@ Suma::execSUB_CREATE_REQ(Signal* signal)
subPtr
.
p
->
m_table_ptrI
=
RNIL
;
subPtr
.
p
->
m_table_ptrI
=
RNIL
;
subPtr
.
p
->
m_state
=
Subscription
::
DEFINED
;
subPtr
.
p
->
m_state
=
Subscription
::
DEFINED
;
subPtr
.
p
->
n_subscribers
=
0
;
subPtr
.
p
->
n_subscribers
=
0
;
subPtr
.
p
->
m_current_sync_ptrI
=
RNIL
;
fprintf
(
stderr
,
"table %d options %x
\n
"
,
subPtr
.
p
->
m_tableId
,
subPtr
.
p
->
m_options
);
fprintf
(
stderr
,
"table %d options %x
\n
"
,
subPtr
.
p
->
m_tableId
,
subPtr
.
p
->
m_options
);
DBUG_PRINT
(
"info"
,(
"Added: key.m_subscriptionId: %u, key.m_subscriptionKey: %u"
,
DBUG_PRINT
(
"info"
,(
"Added: key.m_subscriptionId: %u, key.m_subscriptionKey: %u"
,
...
@@ -1163,13 +1164,15 @@ Suma::execSUB_SYNC_REQ(Signal* signal)
...
@@ -1163,13 +1164,15 @@ Suma::execSUB_SYNC_REQ(Signal* signal)
DBUG_PRINT
(
"info"
,(
"c_syncPool size: %d free: %d"
,
DBUG_PRINT
(
"info"
,(
"c_syncPool size: %d free: %d"
,
c_syncPool
.
getSize
(),
c_syncPool
.
getSize
(),
c_syncPool
.
getNoOfFree
()));
c_syncPool
.
getNoOfFree
()));
new
(
syncPtr
.
p
)
Ptr
<
SyncRecord
>
;
syncPtr
.
p
->
m_senderRef
=
req
->
senderRef
;
syncPtr
.
p
->
m_senderRef
=
req
->
senderRef
;
syncPtr
.
p
->
m_senderData
=
req
->
senderData
;
syncPtr
.
p
->
m_senderData
=
req
->
senderData
;
syncPtr
.
p
->
m_subscriptionPtrI
=
subPtr
.
i
;
syncPtr
.
p
->
m_subscriptionPtrI
=
subPtr
.
i
;
syncPtr
.
p
->
ptrI
=
syncPtr
.
i
;
syncPtr
.
p
->
ptrI
=
syncPtr
.
i
;
syncPtr
.
p
->
m_error
=
0
;
syncPtr
.
p
->
m_error
=
0
;
subPtr
.
p
->
m_current_sync_ptrI
=
syncPtr
.
i
;
{
{
jam
();
jam
();
syncPtr
.
p
->
m_tableList
.
append
(
&
subPtr
.
p
->
m_tableId
,
1
);
syncPtr
.
p
->
m_tableList
.
append
(
&
subPtr
.
p
->
m_tableId
,
1
);
...
@@ -2059,7 +2062,7 @@ Suma::execSUB_SYNC_CONTINUE_CONF(Signal* signal){
...
@@ -2059,7 +2062,7 @@ Suma::execSUB_SYNC_CONTINUE_CONF(Signal* signal){
ndbrequire
(
c_subscriptions
.
find
(
subPtr
,
key
));
ndbrequire
(
c_subscriptions
.
find
(
subPtr
,
key
));
ScanFragNextReq
*
req
=
(
ScanFragNextReq
*
)
signal
->
getDataPtrSend
();
ScanFragNextReq
*
req
=
(
ScanFragNextReq
*
)
signal
->
getDataPtrSend
();
req
->
senderData
=
subPtr
.
i
;
req
->
senderData
=
subPtr
.
p
->
m_current_sync_ptrI
;
req
->
closeFlag
=
0
;
req
->
closeFlag
=
0
;
req
->
transId1
=
0
;
req
->
transId1
=
0
;
req
->
transId2
=
(
SUMA
<<
20
)
+
(
getOwnNodeId
()
<<
8
);
req
->
transId2
=
(
SUMA
<<
20
)
+
(
getOwnNodeId
()
<<
8
);
...
@@ -2098,6 +2101,12 @@ Suma::SyncRecord::completeScan(Signal* signal, int error)
...
@@ -2098,6 +2101,12 @@ Suma::SyncRecord::completeScan(Signal* signal, int error)
#endif
#endif
release
();
release
();
Ptr
<
Subscription
>
subPtr
;
suma
.
c_subscriptions
.
getPtr
(
subPtr
,
m_subscriptionPtrI
);
ndbrequire
(
subPtr
.
p
->
m_current_sync_ptrI
==
ptrI
);
subPtr
.
p
->
m_current_sync_ptrI
=
RNIL
;
suma
.
c_syncPool
.
release
(
ptrI
);
suma
.
c_syncPool
.
release
(
ptrI
);
DBUG_PRINT
(
"info"
,(
"c_syncPool size: %d free: %d"
,
DBUG_PRINT
(
"info"
,(
"c_syncPool size: %d free: %d"
,
suma
.
c_syncPool
.
getSize
(),
suma
.
c_syncPool
.
getSize
(),
...
...
storage/ndb/src/kernel/blocks/suma/Suma.hpp
View file @
3d3d366d
...
@@ -189,6 +189,7 @@ public:
...
@@ -189,6 +189,7 @@ public:
*/
*/
Uint32
m_tableId
;
Uint32
m_tableId
;
Uint32
m_table_ptrI
;
Uint32
m_table_ptrI
;
Uint32
m_current_sync_ptrI
;
};
};
typedef
Ptr
<
Subscription
>
SubscriptionPtr
;
typedef
Ptr
<
Subscription
>
SubscriptionPtr
;
...
@@ -239,7 +240,8 @@ public:
...
@@ -239,7 +240,8 @@ public:
suma
.
progError
(
line
,
cause
,
extra
);
suma
.
progError
(
line
,
cause
,
extra
);
}
}
union
{
Uint32
nextPool
;
Uint32
nextList
;
Uint32
prevList
;
Uint32
ptrI
;
};
Uint32
prevList
;
Uint32
ptrI
;
union
{
Uint32
nextPool
;
Uint32
nextList
;
};
};
};
friend
struct
SyncRecord
;
friend
struct
SyncRecord
;
...
...
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