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
d10e9ba9
Commit
d10e9ba9
authored
Aug 27, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better handling of transaction ids,
make *sure* that no one gets same transid twice (wo/ restarting process)
parent
6af42cfb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
12 deletions
+13
-12
ndb/src/ndbapi/NdbDictionaryImpl.cpp
ndb/src/ndbapi/NdbDictionaryImpl.cpp
+1
-1
ndb/src/ndbapi/Ndbif.cpp
ndb/src/ndbapi/Ndbif.cpp
+2
-2
ndb/src/ndbapi/Ndbinit.cpp
ndb/src/ndbapi/Ndbinit.cpp
+2
-2
ndb/src/ndbapi/TransporterFacade.cpp
ndb/src/ndbapi/TransporterFacade.cpp
+4
-3
ndb/src/ndbapi/TransporterFacade.hpp
ndb/src/ndbapi/TransporterFacade.hpp
+4
-4
No files found.
ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
d10e9ba9
...
...
@@ -682,7 +682,7 @@ NdbDictInterface::~NdbDictInterface()
{
if
(
m_transporter
!=
NULL
){
if
(
m_blockNumber
!=
-
1
)
m_transporter
->
close
(
m_blockNumber
);
m_transporter
->
close
(
m_blockNumber
,
0
);
}
}
...
...
ndb/src/ndbapi/Ndbif.cpp
View file @
d10e9ba9
...
...
@@ -97,7 +97,7 @@ Ndb::init(int aMaxNoOfTransactions)
}
theFirstTransId
=
((
Uint64
)
theNdbBlockNumber
<<
52
)
+
((
Uint64
)
theNode
<<
40
);
theFirstTransId
+=
theFacade
->
m_
open_count
;
theFirstTransId
+=
theFacade
->
m_
max_trans_id
;
theFacade
->
unlock_mutex
();
...
...
@@ -175,7 +175,7 @@ error_handler:
freeOperation
();
delete
theDictionary
;
TransporterFacade
::
instance
()
->
close
(
theNdbBlockNumber
);
TransporterFacade
::
instance
()
->
close
(
theNdbBlockNumber
,
0
);
return
-
1
;
}
...
...
ndb/src/ndbapi/Ndbinit.cpp
View file @
d10e9ba9
...
...
@@ -195,9 +195,9 @@ Ndb::~Ndb()
NdbGlobalEventBuffer_drop
(
theGlobalEventBufferHandle
);
if
(
TransporterFacade
::
instance
()
!=
NULL
&&
theNdbBlockNumber
>
0
){
TransporterFacade
::
instance
()
->
close
(
theNdbBlockNumber
);
TransporterFacade
::
instance
()
->
close
(
theNdbBlockNumber
,
theFirstTransId
);
}
NdbMutex_Lock
(
&
createNdbMutex
);
theNoOfNdbObjects
-=
1
;
...
...
ndb/src/ndbapi/TransporterFacade.cpp
View file @
d10e9ba9
...
...
@@ -548,7 +548,7 @@ TransporterFacade::TransporterFacade() :
theClusterMgr
=
NULL
;
theArbitMgr
=
NULL
;
theStartNodeId
=
1
;
m_
open_count
=
0
;
m_
max_trans_id
=
0
;
}
bool
...
...
@@ -684,9 +684,11 @@ TransporterFacade::ReportNodeAlive(NodeId tNodeId)
}
int
TransporterFacade
::
close
(
BlockNumber
blockNumber
)
TransporterFacade
::
close
(
BlockNumber
blockNumber
,
Uint64
trans_id
)
{
NdbMutex_Lock
(
theMutexPtr
);
Uint32
low_bits
=
(
Uint32
)
trans_id
;
m_max_trans_id
=
m_max_trans_id
>
low_bits
?
m_max_trans_id
:
low_bits
;
close_local
(
blockNumber
);
NdbMutex_Unlock
(
theMutexPtr
);
return
0
;
...
...
@@ -703,7 +705,6 @@ TransporterFacade::open(void* objRef,
ExecuteFunction
fun
,
NodeStatusFunction
statusFun
)
{
m_open_count
++
;
return
m_threads
.
open
(
objRef
,
fun
,
statusFun
);
}
...
...
ndb/src/ndbapi/TransporterFacade.hpp
View file @
d10e9ba9
...
...
@@ -67,7 +67,7 @@ public:
int
open
(
void
*
objRef
,
ExecuteFunction
,
NodeStatusFunction
);
// Close this block number
int
close
(
BlockNumber
blockNumber
);
int
close
(
BlockNumber
blockNumber
,
Uint64
trans_id
);
// Only sends to nodes which are alive
int
sendSignal
(
NdbApiSignal
*
signal
,
NodeId
nodeId
);
...
...
@@ -210,9 +210,9 @@ private:
return
(
m_statusNext
[
index
]
&
(
1
<<
16
))
!=
0
;
}
}
m_threads
;
Uint32
m_
open_count
;
Uint32
m_
max_trans_id
;
/**
* execute function
*/
...
...
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