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
c25ce0e3
Commit
c25ce0e3
authored
Feb 24, 2005
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jonas/src/fix
into mysql.com:/home/jonas/src/mysql-4.1
parents
87402eb5
15de06f2
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
68 additions
and
27 deletions
+68
-27
ndb/include/kernel/signaldata/AlterIndx.hpp
ndb/include/kernel/signaldata/AlterIndx.hpp
+1
-0
ndb/include/kernel/signaldata/BuildIndx.hpp
ndb/include/kernel/signaldata/BuildIndx.hpp
+1
-0
ndb/include/kernel/signaldata/CreateIndx.hpp
ndb/include/kernel/signaldata/CreateIndx.hpp
+1
-2
ndb/include/kernel/signaldata/CreateTrig.hpp
ndb/include/kernel/signaldata/CreateTrig.hpp
+1
-0
ndb/include/kernel/signaldata/DropIndx.hpp
ndb/include/kernel/signaldata/DropIndx.hpp
+2
-2
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+45
-17
ndb/src/ndbapi/NdbDictionaryImpl.cpp
ndb/src/ndbapi/NdbDictionaryImpl.cpp
+14
-4
ndb/src/ndbapi/ndb_cluster_connection.cpp
ndb/src/ndbapi/ndb_cluster_connection.cpp
+2
-1
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+1
-1
No files found.
ndb/include/kernel/signaldata/AlterIndx.hpp
View file @
c25ce0e3
...
@@ -181,6 +181,7 @@ public:
...
@@ -181,6 +181,7 @@ public:
enum
ErrorCode
{
enum
ErrorCode
{
NoError
=
0
,
NoError
=
0
,
Busy
=
701
,
Busy
=
701
,
NotMaster
=
702
,
IndexNotFound
=
4243
,
IndexNotFound
=
4243
,
IndexExists
=
4244
,
IndexExists
=
4244
,
BadRequestType
=
4247
,
BadRequestType
=
4247
,
...
...
ndb/include/kernel/signaldata/BuildIndx.hpp
View file @
c25ce0e3
...
@@ -234,6 +234,7 @@ public:
...
@@ -234,6 +234,7 @@ public:
enum
ErrorCode
{
enum
ErrorCode
{
NoError
=
0
,
NoError
=
0
,
Busy
=
701
,
Busy
=
701
,
NotMaster
=
702
,
BadRequestType
=
4247
,
BadRequestType
=
4247
,
InvalidPrimaryTable
=
4249
,
InvalidPrimaryTable
=
4249
,
InvalidIndexType
=
4250
,
InvalidIndexType
=
4250
,
...
...
ndb/include/kernel/signaldata/CreateIndx.hpp
View file @
c25ce0e3
...
@@ -184,7 +184,7 @@ public:
...
@@ -184,7 +184,7 @@ public:
/**
/**
* CreateIndxRef.
* CreateIndxRef.
*/
*/
class
CreateIndxRef
{
struct
CreateIndxRef
{
friend
bool
printCREATE_INDX_REF
(
FILE
*
,
const
Uint32
*
,
Uint32
,
Uint16
);
friend
bool
printCREATE_INDX_REF
(
FILE
*
,
const
Uint32
*
,
Uint32
,
Uint16
);
public:
public:
...
@@ -210,7 +210,6 @@ public:
...
@@ -210,7 +210,6 @@ public:
InvalidAttributeOrder
=
4255
InvalidAttributeOrder
=
4255
};
};
private:
CreateIndxConf
m_conf
;
CreateIndxConf
m_conf
;
//Uint32 m_userRef;
//Uint32 m_userRef;
//Uint32 m_connectionPtr;
//Uint32 m_connectionPtr;
...
...
ndb/include/kernel/signaldata/CreateTrig.hpp
View file @
c25ce0e3
...
@@ -288,6 +288,7 @@ public:
...
@@ -288,6 +288,7 @@ public:
enum
ErrorCode
{
enum
ErrorCode
{
NoError
=
0
,
NoError
=
0
,
Busy
=
701
,
Busy
=
701
,
NotMaster
=
702
,
TriggerNameTooLong
=
4236
,
TriggerNameTooLong
=
4236
,
TooManyTriggers
=
4237
,
TooManyTriggers
=
4237
,
TriggerNotFound
=
4238
,
TriggerNotFound
=
4238
,
...
...
ndb/include/kernel/signaldata/DropIndx.hpp
View file @
c25ce0e3
...
@@ -160,7 +160,7 @@ public:
...
@@ -160,7 +160,7 @@ public:
/**
/**
* DropIndxRef.
* DropIndxRef.
*/
*/
class
DropIndxRef
{
struct
DropIndxRef
{
friend
bool
printDROP_INDX_REF
(
FILE
*
,
const
Uint32
*
,
Uint32
,
Uint16
);
friend
bool
printDROP_INDX_REF
(
FILE
*
,
const
Uint32
*
,
Uint32
,
Uint16
);
public:
public:
...
@@ -168,6 +168,7 @@ public:
...
@@ -168,6 +168,7 @@ public:
NoError
=
0
,
NoError
=
0
,
InvalidIndexVersion
=
241
,
InvalidIndexVersion
=
241
,
Busy
=
701
,
Busy
=
701
,
NotMaster
=
702
,
IndexNotFound
=
4243
,
IndexNotFound
=
4243
,
BadRequestType
=
4247
,
BadRequestType
=
4247
,
InvalidName
=
4248
,
InvalidName
=
4248
,
...
@@ -175,7 +176,6 @@ public:
...
@@ -175,7 +176,6 @@ public:
};
};
STATIC_CONST
(
SignalLength
=
DropIndxConf
::
SignalLength
+
3
);
STATIC_CONST
(
SignalLength
=
DropIndxConf
::
SignalLength
+
3
);
private:
DropIndxConf
m_conf
;
DropIndxConf
m_conf
;
//Uint32 m_userRef;
//Uint32 m_userRef;
//Uint32 m_connectionPtr;
//Uint32 m_connectionPtr;
...
...
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
View file @
c25ce0e3
...
@@ -6053,11 +6053,21 @@ Dbdict::execCREATE_INDX_REQ(Signal* signal)
...
@@ -6053,11 +6053,21 @@ Dbdict::execCREATE_INDX_REQ(Signal* signal)
jam
();
jam
();
if
(
getOwnNodeId
()
!=
c_masterNodeId
)
{
if
(
getOwnNodeId
()
!=
c_masterNodeId
)
{
jam
();
jam
();
// forward to DICT master
sendSignal
(
calcDictBlockRef
(
c_masterNodeId
),
GSN_CREATE_INDX_REQ
,
releaseSections
(
signal
);
signal
,
signal
->
getLength
(),
JBB
);
OpCreateIndex
opBusy
;
opPtr
.
p
=
&
opBusy
;
opPtr
.
p
->
save
(
req
);
opPtr
.
p
->
m_isMaster
=
(
senderRef
==
reference
());
opPtr
.
p
->
key
=
0
;
opPtr
.
p
->
m_requestType
=
CreateIndxReq
::
RT_DICT_PREPARE
;
opPtr
.
p
->
m_errorCode
=
CreateIndxRef
::
NotMaster
;
opPtr
.
p
->
m_errorLine
=
__LINE__
;
opPtr
.
p
->
m_errorNode
=
c_masterNodeId
;
createIndex_sendReply
(
signal
,
opPtr
,
true
);
return
;
return
;
}
}
// forward initial request plus operation key to all
// forward initial request plus operation key to all
req
->
setOpKey
(
++
c_opRecordSequence
);
req
->
setOpKey
(
++
c_opRecordSequence
);
NodeReceiverGroup
rg
(
DBDICT
,
c_aliveNodes
);
NodeReceiverGroup
rg
(
DBDICT
,
c_aliveNodes
);
...
@@ -6588,10 +6598,9 @@ Dbdict::execDROP_INDX_REQ(Signal* signal)
...
@@ -6588,10 +6598,9 @@ Dbdict::execDROP_INDX_REQ(Signal* signal)
jam
();
jam
();
if
(
getOwnNodeId
()
!=
c_masterNodeId
)
{
if
(
getOwnNodeId
()
!=
c_masterNodeId
)
{
jam
();
jam
();
// forward to DICT master
sendSignal
(
calcDictBlockRef
(
c_masterNodeId
),
GSN_DROP_INDX_REQ
,
err
=
DropIndxRef
::
NotMaster
;
signal
,
signal
->
getLength
(),
JBB
);
goto
error
;
return
;
}
}
// forward initial request plus operation key to all
// forward initial request plus operation key to all
Uint32
indexId
=
req
->
getIndexId
();
Uint32
indexId
=
req
->
getIndexId
();
...
@@ -6679,6 +6688,7 @@ error:
...
@@ -6679,6 +6688,7 @@ error:
opPtr
.
p
->
save
(
req
);
opPtr
.
p
->
save
(
req
);
opPtr
.
p
->
m_errorCode
=
(
DropIndxRef
::
ErrorCode
)
err
;
opPtr
.
p
->
m_errorCode
=
(
DropIndxRef
::
ErrorCode
)
err
;
opPtr
.
p
->
m_errorLine
=
__LINE__
;
opPtr
.
p
->
m_errorLine
=
__LINE__
;
opPtr
.
p
->
m_errorNode
=
c_masterNodeId
;
dropIndex_sendReply
(
signal
,
opPtr
,
true
);
dropIndex_sendReply
(
signal
,
opPtr
,
true
);
}
}
...
@@ -9117,9 +9127,15 @@ Dbdict::execALTER_INDX_REQ(Signal* signal)
...
@@ -9117,9 +9127,15 @@ Dbdict::execALTER_INDX_REQ(Signal* signal)
jam
();
jam
();
if
(
!
isLocal
&&
getOwnNodeId
()
!=
c_masterNodeId
)
{
if
(
!
isLocal
&&
getOwnNodeId
()
!=
c_masterNodeId
)
{
jam
();
jam
();
// forward to DICT master
sendSignal
(
calcDictBlockRef
(
c_masterNodeId
),
GSN_ALTER_INDX_REQ
,
releaseSections
(
signal
);
signal
,
signal
->
getLength
(),
JBB
);
OpAlterIndex
opBad
;
opPtr
.
p
=
&
opBad
;
opPtr
.
p
->
save
(
req
);
opPtr
.
p
->
m_errorCode
=
AlterIndxRef
::
NotMaster
;
opPtr
.
p
->
m_errorLine
=
__LINE__
;
opPtr
.
p
->
m_errorNode
=
c_masterNodeId
;
alterIndex_sendReply
(
signal
,
opPtr
,
true
);
return
;
return
;
}
}
// forward initial request plus operation key to all
// forward initial request plus operation key to all
...
@@ -9797,9 +9813,15 @@ Dbdict::execBUILDINDXREQ(Signal* signal)
...
@@ -9797,9 +9813,15 @@ Dbdict::execBUILDINDXREQ(Signal* signal)
jam
();
jam
();
if
(
getOwnNodeId
()
!=
c_masterNodeId
)
{
if
(
getOwnNodeId
()
!=
c_masterNodeId
)
{
jam
();
jam
();
// forward to DICT master
sendSignal
(
calcDictBlockRef
(
c_masterNodeId
),
GSN_BUILDINDXREQ
,
releaseSections
(
signal
);
signal
,
signal
->
getLength
(),
JBB
);
OpBuildIndex
opBad
;
opPtr
.
p
=
&
opBad
;
opPtr
.
p
->
save
(
req
);
opPtr
.
p
->
m_errorCode
=
BuildIndxRef
::
NotMaster
;
opPtr
.
p
->
m_errorLine
=
__LINE__
;
opPtr
.
p
->
m_errorNode
=
c_masterNodeId
;
buildIndex_sendReply
(
signal
,
opPtr
,
true
);
return
;
return
;
}
}
// forward initial request plus operation key to all
// forward initial request plus operation key to all
...
@@ -10263,9 +10285,15 @@ Dbdict::execCREATE_TRIG_REQ(Signal* signal)
...
@@ -10263,9 +10285,15 @@ Dbdict::execCREATE_TRIG_REQ(Signal* signal)
jam
();
jam
();
if
(
!
isLocal
&&
getOwnNodeId
()
!=
c_masterNodeId
)
{
if
(
!
isLocal
&&
getOwnNodeId
()
!=
c_masterNodeId
)
{
jam
();
jam
();
// forward to DICT master
sendSignal
(
calcDictBlockRef
(
c_masterNodeId
),
GSN_CREATE_TRIG_REQ
,
releaseSections
(
signal
);
signal
,
signal
->
getLength
(),
JBB
);
OpCreateTrigger
opBad
;
opPtr
.
p
=
&
opBad
;
opPtr
.
p
->
save
(
req
);
opPtr
.
p
->
m_errorCode
=
CreateTrigRef
::
NotMaster
;
opPtr
.
p
->
m_errorLine
=
__LINE__
;
opPtr
.
p
->
m_errorNode
=
c_masterNodeId
;
createTrigger_sendReply
(
signal
,
opPtr
,
true
);
return
;
return
;
}
}
// forward initial request plus operation key to all
// forward initial request plus operation key to all
...
...
ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
c25ce0e3
...
@@ -946,6 +946,12 @@ NdbDictInterface::dictSignal(NdbApiSignal* signal,
...
@@ -946,6 +946,12 @@ NdbDictInterface::dictSignal(NdbApiSignal* signal,
if
(
m_waiter
.
m_state
==
WAIT_NODE_FAILURE
)
if
(
m_waiter
.
m_state
==
WAIT_NODE_FAILURE
)
continue
;
continue
;
if
(
m_waiter
.
m_state
==
WST_WAIT_TIMEOUT
)
{
m_error
.
code
=
4008
;
DBUG_RETURN
(
-
1
);
}
if
(
(
temporaryMask
&
m_error
.
code
)
!=
0
)
{
if
(
(
temporaryMask
&
m_error
.
code
)
!=
0
)
{
continue
;
continue
;
}
}
...
@@ -2093,8 +2099,8 @@ int
...
@@ -2093,8 +2099,8 @@ int
NdbDictInterface
::
createIndex
(
NdbApiSignal
*
signal
,
NdbDictInterface
::
createIndex
(
NdbApiSignal
*
signal
,
LinearSectionPtr
ptr
[
3
])
LinearSectionPtr
ptr
[
3
])
{
{
const
int
noErrCodes
=
1
;
const
int
noErrCodes
=
2
;
int
errCodes
[
noErrCodes
]
=
{
CreateIndxRef
::
Busy
};
int
errCodes
[
noErrCodes
]
=
{
CreateIndxRef
::
Busy
,
CreateIndxRef
::
NotMaster
};
return
dictSignal
(
signal
,
ptr
,
2
,
return
dictSignal
(
signal
,
ptr
,
2
,
1
/*use masternode id*/
,
1
/*use masternode id*/
,
100
,
100
,
...
@@ -2118,6 +2124,8 @@ NdbDictInterface::execCREATE_INDX_REF(NdbApiSignal * signal,
...
@@ -2118,6 +2124,8 @@ NdbDictInterface::execCREATE_INDX_REF(NdbApiSignal * signal,
{
{
const
CreateIndxRef
*
const
ref
=
CAST_CONSTPTR
(
CreateIndxRef
,
signal
->
getDataPtr
());
const
CreateIndxRef
*
const
ref
=
CAST_CONSTPTR
(
CreateIndxRef
,
signal
->
getDataPtr
());
m_error
.
code
=
ref
->
getErrorCode
();
m_error
.
code
=
ref
->
getErrorCode
();
if
(
m_error
.
code
==
ref
->
NotMaster
)
m_masterNodeId
=
ref
->
m_errorNode
;
m_waiter
.
signal
(
NO_WAIT
);
m_waiter
.
signal
(
NO_WAIT
);
}
}
...
@@ -2214,8 +2222,8 @@ NdbDictInterface::dropIndex(const NdbIndexImpl & impl,
...
@@ -2214,8 +2222,8 @@ NdbDictInterface::dropIndex(const NdbIndexImpl & impl,
int
int
NdbDictInterface
::
dropIndex
(
NdbApiSignal
*
signal
,
LinearSectionPtr
ptr
[
3
])
NdbDictInterface
::
dropIndex
(
NdbApiSignal
*
signal
,
LinearSectionPtr
ptr
[
3
])
{
{
const
int
noErrCodes
=
1
;
const
int
noErrCodes
=
2
;
int
errCodes
[
noErrCodes
]
=
{
DropIndxRef
::
Busy
};
int
errCodes
[
noErrCodes
]
=
{
DropIndxRef
::
Busy
,
DropIndxRef
::
NotMaster
};
int
r
=
dictSignal
(
signal
,
NULL
,
0
,
int
r
=
dictSignal
(
signal
,
NULL
,
0
,
1
/*Use masternode id*/
,
1
/*Use masternode id*/
,
100
,
100
,
...
@@ -2242,6 +2250,8 @@ NdbDictInterface::execDROP_INDX_REF(NdbApiSignal * signal,
...
@@ -2242,6 +2250,8 @@ NdbDictInterface::execDROP_INDX_REF(NdbApiSignal * signal,
{
{
const
DropIndxRef
*
const
ref
=
CAST_CONSTPTR
(
DropIndxRef
,
signal
->
getDataPtr
());
const
DropIndxRef
*
const
ref
=
CAST_CONSTPTR
(
DropIndxRef
,
signal
->
getDataPtr
());
m_error
.
code
=
ref
->
getErrorCode
();
m_error
.
code
=
ref
->
getErrorCode
();
if
(
m_error
.
code
==
ref
->
NotMaster
)
m_masterNodeId
=
ref
->
m_errorNode
;
m_waiter
.
signal
(
NO_WAIT
);
m_waiter
.
signal
(
NO_WAIT
);
}
}
...
...
ndb/src/ndbapi/ndb_cluster_connection.cpp
View file @
c25ce0e3
...
@@ -219,7 +219,8 @@ Ndb_cluster_connection::wait_until_ready(int timeout,
...
@@ -219,7 +219,8 @@ Ndb_cluster_connection::wait_until_ready(int timeout,
else
if
(
foundAliveNode
>
0
)
else
if
(
foundAliveNode
>
0
)
{
{
noChecksSinceFirstAliveFound
++
;
noChecksSinceFirstAliveFound
++
;
if
(
noChecksSinceFirstAliveFound
>
timeout_after_first_alive
)
// 100 ms delay -> 10*
if
(
noChecksSinceFirstAliveFound
>
10
*
timeout_after_first_alive
)
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
}
}
else
if
(
secondsCounter
>=
timeout
)
else
if
(
secondsCounter
>=
timeout
)
...
...
sql/ha_ndbcluster.cc
View file @
c25ce0e3
...
@@ -4407,7 +4407,7 @@ bool ndbcluster_init()
...
@@ -4407,7 +4407,7 @@ bool ndbcluster_init()
DBUG_PRINT
(
"info"
,(
"NDBCLUSTER storage engine at %s on port %d"
,
DBUG_PRINT
(
"info"
,(
"NDBCLUSTER storage engine at %s on port %d"
,
g_ndb_cluster_connection
->
get_connected_host
(),
g_ndb_cluster_connection
->
get_connected_host
(),
g_ndb_cluster_connection
->
get_connected_port
()));
g_ndb_cluster_connection
->
get_connected_port
()));
g_ndb_cluster_connection
->
wait_until_ready
(
10
,
0
);
g_ndb_cluster_connection
->
wait_until_ready
(
10
,
3
);
}
}
else
if
(
res
==
1
)
else
if
(
res
==
1
)
{
{
...
...
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