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
6d975ea2
Commit
6d975ea2
authored
Feb 13, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge lthalmann@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/users/lthalmann/bkroot/mysql-5.1-new
parents
a5fda39d
dddd8a65
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
273 additions
and
18 deletions
+273
-18
VC++Files/mysql.sln
VC++Files/mysql.sln
+41
-0
VC++Files/plugin/fulltext/fulltext.def
VC++Files/plugin/fulltext/fulltext.def
+5
-0
VC++Files/plugin/fulltext/fulltext.vcproj
VC++Files/plugin/fulltext/fulltext.vcproj
+125
-0
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+5
-1
storage/ndb/include/mgmapi/mgmapi.h
storage/ndb/include/mgmapi/mgmapi.h
+8
-0
storage/ndb/include/ndbapi/ndb_cluster_connection.hpp
storage/ndb/include/ndbapi/ndb_cluster_connection.hpp
+8
-0
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+14
-14
storage/ndb/src/mgmapi/mgmapi.cpp
storage/ndb/src/mgmapi/mgmapi.cpp
+13
-0
storage/ndb/src/mgmsrv/Services.cpp
storage/ndb/src/mgmsrv/Services.cpp
+7
-0
storage/ndb/src/ndbapi/ndb_cluster_connection.cpp
storage/ndb/src/ndbapi/ndb_cluster_connection.cpp
+28
-2
storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp
storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp
+2
-0
storage/ndb/tools/restore/consumer_restore.cpp
storage/ndb/tools/restore/consumer_restore.cpp
+3
-0
storage/ndb/tools/restore/restore_main.cpp
storage/ndb/tools/restore/restore_main.cpp
+14
-1
No files found.
VC++Files/mysql.sln
View file @
6d975ea2
...
...
@@ -124,6 +124,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysqld", "sql\mysqld.vcproj
{13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD} = {13A3EB35-EF87-42DC-AFD6-CDF5EFB228AD}
{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB} = {BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}
{DB28DE80-837F-4497-9AA9-CC0A20584C98} = {DB28DE80-837F-4497-9AA9-CC0A20584C98}
{BFCDA391-91A5-45F5-A14F-1011F8424113} = {BFCDA391-91A5-45F5-A14F-1011F8424113}
{433BCD9B-15C5-4B11-B8BE-825EA98EACE6} = {433BCD9B-15C5-4B11-B8BE-825EA98EACE6}
{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
{F74653C4-8003-4A79-8F53-FC69E0AD7A9B} = {F74653C4-8003-4A79-8F53-FC69E0AD7A9B}
...
...
@@ -302,6 +303,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "storage\example\
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fulltext", "plugin\fulltext\fulltext.vcproj", "{BFCDA391-91A5-45F5-A14F-1011F8424113}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
classic = classic
...
...
@@ -1778,6 +1783,42 @@ Global
{6B6812DB-636E-465D-B53D-5012F237E539}.TLS.Build.0 = TLS|Win32
{6B6812DB-636E-465D-B53D-5012F237E539}.TLS_DEBUG.ActiveCfg = TLS_DEBUG|Win32
{6B6812DB-636E-465D-B53D-5012F237E539}.TLS_DEBUG.Build.0 = TLS_DEBUG|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.classic.ActiveCfg = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.classic.Build.0 = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.classic nt.ActiveCfg = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.classic nt.Build.0 = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Debug.ActiveCfg = Debug|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Debug.Build.0 = Debug|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Embedded_Classic.ActiveCfg = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Embedded_Classic.Build.0 = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Embedded_Debug.ActiveCfg = Debug|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Embedded_Debug.Build.0 = Debug|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Embedded_Pro.ActiveCfg = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Embedded_Pro.Build.0 = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Embedded_ProGPL.ActiveCfg = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Embedded_ProGPL.Build.0 = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Embedded_Release.ActiveCfg = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Embedded_Release.Build.0 = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Max.ActiveCfg = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Max.Build.0 = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Max nt.ActiveCfg = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Max nt.Build.0 = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.nt.ActiveCfg = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.nt.Build.0 = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.pro.ActiveCfg = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.pro.Build.0 = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.pro gpl.ActiveCfg = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.pro gpl.Build.0 = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.pro gpl nt.ActiveCfg = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.pro gpl nt.Build.0 = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.pro nt.ActiveCfg = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.pro nt.Build.0 = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Release.ActiveCfg = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.Release.Build.0 = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.TLS.ActiveCfg = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.TLS.Build.0 = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.TLS_DEBUG.ActiveCfg = Release|Win32
{BFCDA391-91A5-45F5-A14F-1011F8424113}.TLS_DEBUG.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
...
...
VC++Files/plugin/fulltext/fulltext.def
0 → 100644
View file @
6d975ea2
LIBRARY fulltext
EXPORTS
_mysql_plugin_interface_version_
_mysql_plugin_declarations_
\ No newline at end of file
VC++Files/plugin/fulltext/fulltext.vcproj
0 → 100644
View file @
6d975ea2
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType=
"Visual C++"
Version=
"7.10"
Name=
"fulltext"
ProjectGUID=
"{BFCDA391-91A5-45F5-A14F-1011F8424113}"
Keyword=
"Win32Proj"
>
<Platforms>
<Platform
Name=
"Win32"
/>
</Platforms>
<Configurations>
<Configuration
Name=
"Debug|Win32"
OutputDirectory=
"Debug"
IntermediateDirectory=
"Debug"
ConfigurationType=
"2"
CharacterSet=
"2"
>
<Tool
Name=
"VCCLCompilerTool"
Optimization=
"0"
AdditionalIncludeDirectories=
"../../include"
PreprocessorDefinitions=
"WIN32;_DEBUG;_WINDOWS;_USRDLL;FULLTEXT_EXPORTS"
MinimalRebuild=
"TRUE"
BasicRuntimeChecks=
"3"
RuntimeLibrary=
"1"
WarningLevel=
"3"
Detect64BitPortabilityProblems=
"TRUE"
DebugInformationFormat=
"4"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCLinkerTool"
OutputFile=
"../../client_debug/fulltext.dll"
LinkIncremental=
"2"
ModuleDefinitionFile=
"fulltext.def"
GenerateDebugInformation=
"TRUE"
ProgramDatabaseFile=
"$(OutDir)/fulltext.pdb"
SubSystem=
"2"
ImportLibrary=
"$(OutDir)/fulltext.lib"
TargetMachine=
"1"
/>
<Tool
Name=
"VCMIDLTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
/>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebDeploymentTool"
/>
<Tool
Name=
"VCManagedWrapperGeneratorTool"
/>
<Tool
Name=
"VCAuxiliaryManagedWrapperGeneratorTool"
/>
</Configuration>
<Configuration
Name=
"Release|Win32"
OutputDirectory=
"Release"
IntermediateDirectory=
"Release"
ConfigurationType=
"2"
CharacterSet=
"2"
>
<Tool
Name=
"VCCLCompilerTool"
AdditionalIncludeDirectories=
"../../include"
PreprocessorDefinitions=
"WIN32;NDEBUG;_WINDOWS;_USRDLL;FULLTEXT_EXPORTS"
RuntimeLibrary=
"0"
UsePrecompiledHeader=
"0"
WarningLevel=
"3"
Detect64BitPortabilityProblems=
"TRUE"
DebugInformationFormat=
"3"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCLinkerTool"
OutputFile=
"../../client_release/fulltext.dll"
LinkIncremental=
"1"
ModuleDefinitionFile=
"fulltext.def"
GenerateDebugInformation=
"TRUE"
SubSystem=
"2"
OptimizeReferences=
"2"
EnableCOMDATFolding=
"2"
ImportLibrary=
"$(OutDir)/fulltext.lib"
TargetMachine=
"1"
/>
<Tool
Name=
"VCMIDLTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
/>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebDeploymentTool"
/>
<Tool
Name=
"VCManagedWrapperGeneratorTool"
/>
<Tool
Name=
"VCAuxiliaryManagedWrapperGeneratorTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=
".\fulltext.def"
>
</File>
<File
RelativePath=
".\plugin_example.c"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
sql/ha_ndbcluster.cc
View file @
6d975ea2
...
...
@@ -5813,7 +5813,11 @@ static bool ndbcluster_init()
opt_ndbcluster_connectstring
));
goto
ndbcluster_init_error
;
}
{
char
buf
[
128
];
my_snprintf
(
buf
,
sizeof
(
buf
),
"mysqld --server-id=%d"
,
server_id
);
g_ndb_cluster_connection
->
set_name
(
buf
);
}
g_ndb_cluster_connection
->
set_optimized_node_selection
(
opt_ndb_optimized_node_selection
);
...
...
storage/ndb/include/mgmapi/mgmapi.h
View file @
6d975ea2
...
...
@@ -468,6 +468,14 @@ extern "C" {
*/
void
ndb_mgm_destroy_handle
(
NdbMgmHandle
*
handle
);
/**
* Set a name of the handle. Name is reported in cluster log.
*
* @param handle Management handle
* @param name Name
*/
void
ndb_mgm_set_name
(
NdbMgmHandle
handle
,
const
char
*
name
);
/** @} *********************************************************************/
/**
* @name Functions: Connect/Disconnect Management Server
...
...
storage/ndb/include/ndbapi/ndb_cluster_connection.hpp
View file @
6d975ea2
...
...
@@ -54,6 +54,14 @@ public:
Ndb_cluster_connection
(
const
char
*
connectstring
=
0
);
~
Ndb_cluster_connection
();
/**
* Set a name on the connection, which will be reported in cluster log
*
* @param name
*
*/
void
set_name
(
const
char
*
name
);
/**
* Connect to a cluster management server
*
...
...
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
View file @
6d975ea2
...
...
@@ -3027,7 +3027,7 @@ void Dbtc::tckeyreq050Lab(Signal* signal)
/* NODE IF POSSIBLE TO AVOID UNNECESSARY COMMUNICATION */
/* WITH SIMPLE READS. */
/*-------------------------------------------------------------*/
arrGuard
(
tnoOfBackup
,
4
);
arrGuard
(
tnoOfBackup
,
MAX_REPLICAS
);
UintR
Tindex
;
UintR
TownNode
=
cownNodeid
;
for
(
Tindex
=
1
;
Tindex
<=
tnoOfBackup
;
Tindex
++
)
{
...
...
@@ -6306,7 +6306,7 @@ void Dbtc::timeOutFoundLab(Signal* signal, Uint32 TapiConPtr)
jam
();
tcConnectptr
.
i
=
apiConnectptr
.
p
->
currentTcConnect
;
ptrCheckGuard
(
tcConnectptr
,
ctcConnectFilesize
,
tcConnectRecord
);
arrGuard
(
apiConnectptr
.
p
->
currentReplicaNo
,
4
);
arrGuard
(
apiConnectptr
.
p
->
currentReplicaNo
,
MAX_REPLICAS
);
hostptr
.
i
=
tcConnectptr
.
p
->
tcNodedata
[
apiConnectptr
.
p
->
currentReplicaNo
];
ptrCheckGuard
(
hostptr
,
chostFilesize
,
hostRecord
);
if
(
hostptr
.
p
->
hostStatus
==
HS_ALIVE
)
{
...
...
@@ -6332,7 +6332,7 @@ void Dbtc::timeOutFoundLab(Signal* signal, Uint32 TapiConPtr)
jam
();
tcConnectptr
.
i
=
apiConnectptr
.
p
->
currentTcConnect
;
ptrCheckGuard
(
tcConnectptr
,
ctcConnectFilesize
,
tcConnectRecord
);
arrGuard
(
apiConnectptr
.
p
->
currentReplicaNo
,
4
);
arrGuard
(
apiConnectptr
.
p
->
currentReplicaNo
,
MAX_REPLICAS
);
hostptr
.
i
=
tcConnectptr
.
p
->
tcNodedata
[
apiConnectptr
.
p
->
currentReplicaNo
];
ptrCheckGuard
(
hostptr
,
chostFilesize
,
hostRecord
);
if
(
hostptr
.
p
->
hostStatus
==
HS_ALIVE
)
{
...
...
@@ -6358,7 +6358,7 @@ void Dbtc::timeOutFoundLab(Signal* signal, Uint32 TapiConPtr)
jam
();
tcConnectptr
.
i
=
apiConnectptr
.
p
->
currentTcConnect
;
ptrCheckGuard
(
tcConnectptr
,
ctcConnectFilesize
,
tcConnectRecord
);
arrGuard
(
apiConnectptr
.
p
->
currentReplicaNo
,
4
);
arrGuard
(
apiConnectptr
.
p
->
currentReplicaNo
,
MAX_REPLICAS
);
hostptr
.
i
=
tcConnectptr
.
p
->
tcNodedata
[
apiConnectptr
.
p
->
currentReplicaNo
];
ptrCheckGuard
(
hostptr
,
chostFilesize
,
hostRecord
);
if
(
hostptr
.
p
->
hostStatus
==
HS_ALIVE
)
{
...
...
@@ -6495,7 +6495,7 @@ void Dbtc::sendAbortedAfterTimeout(Signal* signal, int Tcheck)
// in time to the ABORT signal we will declare it as dead.
/*------------------------------------------------------------------*/
UintR
Ti
=
0
;
arrGuard
(
tcConnectptr
.
p
->
noOfNodes
,
4
);
arrGuard
(
tcConnectptr
.
p
->
noOfNodes
,
MAX_REPLICAS
+
1
);
for
(
Ti
=
0
;
Ti
<
tcConnectptr
.
p
->
noOfNodes
;
Ti
++
)
{
jam
();
if
(
tcConnectptr
.
p
->
tcNodedata
[
Ti
]
!=
0
)
{
...
...
@@ -7552,7 +7552,7 @@ void Dbtc::execABORTCONF(Signal* signal)
warningReport
(
signal
,
18
);
return
;
}
//if
arrGuard
(
apiConnectptr
.
p
->
currentReplicaNo
,
4
);
arrGuard
(
apiConnectptr
.
p
->
currentReplicaNo
,
MAX_REPLICAS
);
if
(
tcConnectptr
.
p
->
tcNodedata
[
apiConnectptr
.
p
->
currentReplicaNo
]
!=
tnodeid
)
{
warningReport
(
signal
,
19
);
...
...
@@ -7568,7 +7568,7 @@ void Dbtc::toAbortHandlingLab(Signal* signal)
do
{
if
(
tcurrentReplicaNo
!=
(
Uint8
)
Z8NIL
)
{
jam
();
arrGuard
(
tcurrentReplicaNo
,
4
);
arrGuard
(
tcurrentReplicaNo
,
MAX_REPLICAS
);
const
LqhTransConf
::
OperationStatus
stat
=
(
LqhTransConf
::
OperationStatus
)
tcConnectptr
.
p
->
failData
[
tcurrentReplicaNo
];
...
...
@@ -7702,7 +7702,7 @@ void Dbtc::execCOMMITCONF(Signal* signal)
warningReport
(
signal
,
10
);
return
;
}
//if
arrGuard
(
apiConnectptr
.
p
->
currentReplicaNo
,
4
);
arrGuard
(
apiConnectptr
.
p
->
currentReplicaNo
,
MAX_REPLICAS
);
if
(
tcConnectptr
.
p
->
tcNodedata
[
apiConnectptr
.
p
->
currentReplicaNo
]
!=
tnodeid
)
{
warningReport
(
signal
,
11
);
...
...
@@ -7722,7 +7722,7 @@ void Dbtc::toCommitHandlingLab(Signal* signal)
do
{
if
(
tcurrentReplicaNo
!=
(
Uint8
)
Z8NIL
)
{
jam
();
arrGuard
(
tcurrentReplicaNo
,
4
);
arrGuard
(
tcurrentReplicaNo
,
MAX_REPLICAS
);
switch
(
tcConnectptr
.
p
->
failData
[
tcurrentReplicaNo
])
{
case
LqhTransConf
:
:
InvalidStatus
:
jam
();
...
...
@@ -7847,7 +7847,7 @@ void Dbtc::execCOMPLETECONF(Signal* signal)
warningReport
(
signal
,
14
);
return
;
}
//if
arrGuard
(
apiConnectptr
.
p
->
currentReplicaNo
,
4
);
arrGuard
(
apiConnectptr
.
p
->
currentReplicaNo
,
MAX_REPLICAS
);
if
(
tcConnectptr
.
p
->
tcNodedata
[
apiConnectptr
.
p
->
currentReplicaNo
]
!=
tnodeid
)
{
warningReport
(
signal
,
15
);
...
...
@@ -7867,7 +7867,7 @@ void Dbtc::toCompleteHandlingLab(Signal* signal)
do
{
if
(
tcurrentReplicaNo
!=
(
Uint8
)
Z8NIL
)
{
jam
();
arrGuard
(
tcurrentReplicaNo
,
4
);
arrGuard
(
tcurrentReplicaNo
,
MAX_REPLICAS
);
switch
(
tcConnectptr
.
p
->
failData
[
tcurrentReplicaNo
])
{
case
LqhTransConf
:
:
InvalidStatus
:
jam
();
...
...
@@ -8156,6 +8156,7 @@ void Dbtc::setupFailData(Signal* signal)
case
OS_PREPARED
:
case
OS_COMMITTING
:
jam
();
arrGuard
(
tcConnectptr
.
p
->
lastReplicaNo
,
MAX_REPLICAS
);
for
(
tindex
=
0
;
tindex
<=
tcConnectptr
.
p
->
lastReplicaNo
;
tindex
++
)
{
jam
();
/*-------------------------------------------------------------------
...
...
@@ -8163,13 +8164,13 @@ void Dbtc::setupFailData(Signal* signal)
* IN THIS CASE ALL LQH'S ARE PREPARED AND WAITING FOR
* COMMIT/ABORT DECISION.
*------------------------------------------------------------------*/
arrGuard
(
tindex
,
4
);
tcConnectptr
.
p
->
failData
[
tindex
]
=
LqhTransConf
::
Prepared
;
}
//for
break
;
case
OS_COMMITTED
:
case
OS_COMPLETING
:
jam
();
arrGuard
(
tcConnectptr
.
p
->
lastReplicaNo
,
MAX_REPLICAS
);
for
(
tindex
=
0
;
tindex
<=
tcConnectptr
.
p
->
lastReplicaNo
;
tindex
++
)
{
jam
();
/*-------------------------------------------------------------------
...
...
@@ -8177,19 +8178,18 @@ void Dbtc::setupFailData(Signal* signal)
* IN THIS CASE ALL LQH'S ARE COMMITTED AND WAITING FOR
* COMPLETE MESSAGE.
*------------------------------------------------------------------*/
arrGuard
(
tindex
,
4
);
tcConnectptr
.
p
->
failData
[
tindex
]
=
LqhTransConf
::
Committed
;
}
//for
break
;
case
OS_COMPLETED
:
jam
();
arrGuard
(
tcConnectptr
.
p
->
lastReplicaNo
,
MAX_REPLICAS
);
for
(
tindex
=
0
;
tindex
<=
tcConnectptr
.
p
->
lastReplicaNo
;
tindex
++
)
{
jam
();
/*-------------------------------------------------------------------
* KEYDATA IS USED TO KEEP AN INDICATION OF STATE IN LQH.
* IN THIS CASE ALL LQH'S ARE COMPLETED.
*-------------------------------------------------------------------*/
arrGuard
(
tindex
,
4
);
tcConnectptr
.
p
->
failData
[
tindex
]
=
LqhTransConf
::
InvalidStatus
;
}
//for
break
;
...
...
storage/ndb/src/mgmapi/mgmapi.cpp
View file @
6d975ea2
...
...
@@ -102,6 +102,7 @@ struct ndb_mgm_handle {
FILE
*
logfile
;
#endif
FILE
*
errstream
;
char
*
m_name
;
};
#define SET_ERROR(h, e, s) setError(h, e, __LINE__, s)
...
...
@@ -156,6 +157,7 @@ ndb_mgm_create_handle()
h
->
write_timeout
=
100
;
h
->
cfg_i
=
-
1
;
h
->
errstream
=
stdout
;
h
->
m_name
=
0
;
strncpy
(
h
->
last_error_desc
,
"No error"
,
NDB_MGM_MAX_ERR_DESC_SIZE
);
...
...
@@ -170,6 +172,14 @@ ndb_mgm_create_handle()
DBUG_RETURN
(
h
);
}
extern
"C"
void
ndb_mgm_set_name
(
NdbMgmHandle
handle
,
const
char
*
name
)
{
my_free
(
handle
->
m_name
,
MYF
(
MY_ALLOW_ZERO_PTR
));
handle
->
m_name
=
my_strdup
(
name
,
MYF
(
MY_WME
));
}
extern
"C"
int
ndb_mgm_set_connectstring
(
NdbMgmHandle
handle
,
const
char
*
mgmsrv
)
...
...
@@ -216,6 +226,7 @@ ndb_mgm_destroy_handle(NdbMgmHandle * handle)
}
#endif
(
*
handle
)
->
cfg
.
~
LocalConfig
();
my_free
((
*
handle
)
->
m_name
,
MYF
(
MY_ALLOW_ZERO_PTR
));
my_free
((
char
*
)
*
handle
,
MYF
(
MY_ALLOW_ZERO_PTR
));
*
handle
=
0
;
DBUG_VOID_RETURN
;
...
...
@@ -1875,6 +1886,8 @@ ndb_mgm_alloc_nodeid(NdbMgmHandle handle, unsigned int version, int nodetype)
args
.
put
(
"password"
,
"mysqld"
);
args
.
put
(
"public key"
,
"a public key"
);
args
.
put
(
"endian"
,
(
endian_check
.
c
[
sizeof
(
long
)
-
1
])
?
"big"
:
"little"
);
if
(
handle
->
m_name
)
args
.
put
(
"name"
,
handle
->
m_name
);
const
ParserRow
<
ParserDummy
>
reply
[]
=
{
MGM_CMD
(
"get nodeid reply"
,
NULL
,
""
),
...
...
storage/ndb/src/mgmsrv/Services.cpp
View file @
6d975ea2
...
...
@@ -35,6 +35,7 @@
#include <base64.h>
extern
bool
g_StopServer
;
extern
EventLogger
g_eventLogger
;
static
const
unsigned
int
MAX_READ_TIMEOUT
=
1000
;
static
const
unsigned
int
MAX_WRITE_TIMEOUT
=
100
;
...
...
@@ -135,6 +136,7 @@ ParserRow<MgmApiSession> commands[] = {
MGM_ARG
(
"password"
,
String
,
Mandatory
,
"Password"
),
MGM_ARG
(
"public key"
,
String
,
Mandatory
,
"Public key"
),
MGM_ARG
(
"endian"
,
String
,
Optional
,
"Endianness"
),
MGM_ARG
(
"name"
,
String
,
Optional
,
"Name of connection"
),
MGM_CMD
(
"get version"
,
&
MgmApiSession
::
getVersion
,
""
),
...
...
@@ -411,6 +413,7 @@ MgmApiSession::get_nodeid(Parser_t::Context &,
const
char
*
password
;
const
char
*
public_key
;
const
char
*
endian
=
NULL
;
const
char
*
name
=
NULL
;
union
{
long
l
;
char
c
[
sizeof
(
long
)];
}
endian_check
;
args
.
get
(
"version"
,
&
version
);
...
...
@@ -421,6 +424,7 @@ MgmApiSession::get_nodeid(Parser_t::Context &,
args
.
get
(
"password"
,
&
password
);
args
.
get
(
"public key"
,
&
public_key
);
args
.
get
(
"endian"
,
&
endian
);
args
.
get
(
"name"
,
&
name
);
endian_check
.
l
=
1
;
if
(
endian
...
...
@@ -489,6 +493,9 @@ MgmApiSession::get_nodeid(Parser_t::Context &,
m_output
->
println
(
""
);
m_allocated_resources
->
reserve_node
(
tmp
);
if
(
name
)
g_eventLogger
.
info
(
"Node %d: %s"
,
tmp
,
name
);
return
;
}
...
...
storage/ndb/src/ndbapi/ndb_cluster_connection.cpp
View file @
6d975ea2
...
...
@@ -262,7 +262,8 @@ Ndb_cluster_connection::wait_until_ready(int timeout,
Ndb_cluster_connection_impl
::
Ndb_cluster_connection_impl
(
const
char
*
connect_string
)
:
Ndb_cluster_connection
(
*
this
),
m_optimized_node_selection
(
1
)
m_optimized_node_selection
(
1
),
m_name
(
0
)
{
DBUG_ENTER
(
"Ndb_cluster_connection"
);
DBUG_PRINT
(
"enter"
,(
"Ndb_cluster_connection this=0x%x"
,
this
));
...
...
@@ -287,7 +288,11 @@ Ndb_cluster_connection_impl::Ndb_cluster_connection_impl(const char *
delete
m_config_retriever
;
m_config_retriever
=
0
;
}
if
(
m_name
)
{
NdbMgmHandle
h
=
m_config_retriever
->
get_mgmHandle
();
ndb_mgm_set_name
(
h
,
m_name
);
}
m_transporter_facade
=
TransporterFacade
::
theFacadeInstance
=
new
TransporterFacade
();
...
...
@@ -326,9 +331,25 @@ Ndb_cluster_connection_impl::~Ndb_cluster_connection_impl()
ndb_print_state_mutex
=
NULL
;
}
#endif
if
(
m_name
)
free
(
m_name
);
DBUG_VOID_RETURN
;
}
void
Ndb_cluster_connection_impl
::
set_name
(
const
char
*
name
)
{
if
(
m_name
)
free
(
m_name
);
m_name
=
strdup
(
name
);
if
(
m_config_retriever
&&
m_name
)
{
NdbMgmHandle
h
=
m_config_retriever
->
get_mgmHandle
();
ndb_mgm_set_name
(
h
,
m_name
);
}
}
void
Ndb_cluster_connection_impl
::
init_nodes_vector
(
Uint32
nodeid
,
const
ndb_mgm_configuration
...
...
@@ -480,6 +501,11 @@ Ndb_cluster_connection_impl::do_test()
delete
[]
nodes
;
}
void
Ndb_cluster_connection
::
set_name
(
const
char
*
name
)
{
m_impl
.
set_name
(
name
);
}
int
Ndb_cluster_connection
::
connect
(
int
no_retries
,
int
retry_delay_in_seconds
,
int
verbose
)
{
...
...
storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp
View file @
6d975ea2
...
...
@@ -62,6 +62,7 @@ private:
Vector
<
Node
>
m_all_nodes
;
void
init_nodes_vector
(
Uint32
nodeid
,
const
ndb_mgm_configuration
&
config
);
void
connect_thread
();
void
set_name
(
const
char
*
name
);
TransporterFacade
*
m_transporter_facade
;
ConfigRetriever
*
m_config_retriever
;
...
...
@@ -69,6 +70,7 @@ private:
int
(
*
m_connect_callback
)(
void
);
int
m_optimized_node_selection
;
char
*
m_name
;
};
#endif
storage/ndb/tools/restore/consumer_restore.cpp
View file @
6d975ea2
...
...
@@ -30,6 +30,8 @@ static Uint32 get_part_id(const NdbDictionary::Table *table,
Uint32
hash_value
);
extern
const
char
*
g_connect_string
;
extern
BaseString
g_options
;
bool
BackupRestore
::
init
()
{
...
...
@@ -39,6 +41,7 @@ BackupRestore::init()
return
true
;
m_cluster_connection
=
new
Ndb_cluster_connection
(
g_connect_string
);
m_cluster_connection
->
set_name
(
g_options
.
c_str
());
if
(
m_cluster_connection
->
connect
(
12
,
5
,
1
)
!=
0
)
{
return
false
;
...
...
storage/ndb/tools/restore/restore_main.cpp
View file @
6d975ea2
...
...
@@ -58,6 +58,7 @@ static int _print_log = 0;
static
int
_restore_data
=
0
;
static
int
_restore_meta
=
0
;
static
int
_no_restore_disk
=
0
;
BaseString
g_options
(
"ndb_restore"
);
static
struct
my_option
my_long_options
[]
=
{
...
...
@@ -450,6 +451,18 @@ main(int argc, char** argv)
exitHandler
(
NDBT_FAILED
);
}
g_options
.
appfmt
(
" -b %d"
,
ga_backupId
);
g_options
.
appfmt
(
" -n %d"
,
ga_nodeId
);
if
(
_restore_meta
)
g_options
.
appfmt
(
" -m"
);
if
(
_restore_data
)
g_options
.
appfmt
(
" -r"
);
if
(
ga_restore_epoch
)
g_options
.
appfmt
(
" -e"
);
if
(
_restore_disk
)
g_options
.
appfmt
(
" -d"
);
g_options
.
appfmt
(
" -p %d"
,
ga_nParallelism
);
g_connect_string
=
opt_connect_str
;
/**
...
...
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