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
ee54423a
Commit
ee54423a
authored
Nov 23, 2004
by
pekka@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/space/pekka/ndb/version/my41
parents
2ca5a0f2
37f0ff9b
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
340 additions
and
3 deletions
+340
-3
ndb/include/ndbapi/NdbConnection.hpp
ndb/include/ndbapi/NdbConnection.hpp
+2
-2
ndb/src/ndbapi/NdbConnection.cpp
ndb/src/ndbapi/NdbConnection.cpp
+36
-0
ndb/test/ndbapi/testBlobs.cpp
ndb/test/ndbapi/testBlobs.cpp
+302
-1
No files found.
ndb/include/ndbapi/NdbConnection.hpp
View file @
ee54423a
...
@@ -607,8 +607,8 @@ private:
...
@@ -607,8 +607,8 @@ private:
NdbOperation
*
theLastExecOpInList
;
// Last executing operation in list.
NdbOperation
*
theLastExecOpInList
;
// Last executing operation in list.
NdbOperation
*
theCompletedFirstOp
;
// First operation in completed
NdbOperation
*
theCompletedFirstOp
;
// First
& last
operation in completed
// operation list.
NdbOperation
*
theCompletedLastOp
;
// operation list.
Uint32
theNoOfOpSent
;
// How many operations have been sent
Uint32
theNoOfOpSent
;
// How many operations have been sent
Uint32
theNoOfOpCompleted
;
// How many operations have completed
Uint32
theNoOfOpCompleted
;
// How many operations have completed
...
...
ndb/src/ndbapi/NdbConnection.cpp
View file @
ee54423a
...
@@ -55,6 +55,7 @@ NdbConnection::NdbConnection( Ndb* aNdb ) :
...
@@ -55,6 +55,7 @@ NdbConnection::NdbConnection( Ndb* aNdb ) :
theFirstExecOpInList
(
NULL
),
theFirstExecOpInList
(
NULL
),
theLastExecOpInList
(
NULL
),
theLastExecOpInList
(
NULL
),
theCompletedFirstOp
(
NULL
),
theCompletedFirstOp
(
NULL
),
theCompletedLastOp
(
NULL
),
theNoOfOpSent
(
0
),
theNoOfOpSent
(
0
),
theNoOfOpCompleted
(
0
),
theNoOfOpCompleted
(
0
),
theNoOfOpFetched
(
0
),
theNoOfOpFetched
(
0
),
...
@@ -124,6 +125,7 @@ NdbConnection::init()
...
@@ -124,6 +125,7 @@ NdbConnection::init()
theLastExecOpInList
=
NULL
;
theLastExecOpInList
=
NULL
;
theCompletedFirstOp
=
NULL
;
theCompletedFirstOp
=
NULL
;
theCompletedLastOp
=
NULL
;
theGlobalCheckpointId
=
0
;
theGlobalCheckpointId
=
0
;
theCommitStatus
=
Started
;
theCommitStatus
=
Started
;
...
@@ -256,6 +258,8 @@ NdbConnection::handleExecuteCompletion()
...
@@ -256,6 +258,8 @@ NdbConnection::handleExecuteCompletion()
if
(
tLastExecOp
!=
NULL
)
{
if
(
tLastExecOp
!=
NULL
)
{
tLastExecOp
->
next
(
theCompletedFirstOp
);
tLastExecOp
->
next
(
theCompletedFirstOp
);
theCompletedFirstOp
=
tFirstExecOp
;
theCompletedFirstOp
=
tFirstExecOp
;
if
(
theCompletedLastOp
==
NULL
)
theCompletedLastOp
=
tLastExecOp
;
theFirstExecOpInList
=
NULL
;
theFirstExecOpInList
=
NULL
;
theLastExecOpInList
=
NULL
;
theLastExecOpInList
=
NULL
;
}
//if
}
//if
...
@@ -292,6 +296,8 @@ NdbConnection::execute(ExecType aTypeOfExec,
...
@@ -292,6 +296,8 @@ NdbConnection::execute(ExecType aTypeOfExec,
ExecType
tExecType
;
ExecType
tExecType
;
NdbOperation
*
tPrepOp
;
NdbOperation
*
tPrepOp
;
NdbOperation
*
tCompletedFirstOp
=
NULL
;
NdbOperation
*
tCompletedLastOp
=
NULL
;
int
ret
=
0
;
int
ret
=
0
;
do
{
do
{
...
@@ -314,6 +320,7 @@ NdbConnection::execute(ExecType aTypeOfExec,
...
@@ -314,6 +320,7 @@ NdbConnection::execute(ExecType aTypeOfExec,
}
}
tPrepOp
=
tPrepOp
->
next
();
tPrepOp
=
tPrepOp
->
next
();
}
}
// save rest of prepared ops if batch
// save rest of prepared ops if batch
NdbOperation
*
tRestOp
=
0
;
NdbOperation
*
tRestOp
=
0
;
NdbOperation
*
tLastOp
=
0
;
NdbOperation
*
tLastOp
=
0
;
...
@@ -323,6 +330,7 @@ NdbConnection::execute(ExecType aTypeOfExec,
...
@@ -323,6 +330,7 @@ NdbConnection::execute(ExecType aTypeOfExec,
tLastOp
=
theLastOpInList
;
tLastOp
=
theLastOpInList
;
theLastOpInList
=
tPrepOp
;
theLastOpInList
=
tPrepOp
;
}
}
if
(
tExecType
==
Commit
)
{
if
(
tExecType
==
Commit
)
{
NdbOperation
*
tOp
=
theCompletedFirstOp
;
NdbOperation
*
tOp
=
theCompletedFirstOp
;
while
(
tOp
!=
NULL
)
{
while
(
tOp
!=
NULL
)
{
...
@@ -338,6 +346,19 @@ NdbConnection::execute(ExecType aTypeOfExec,
...
@@ -338,6 +346,19 @@ NdbConnection::execute(ExecType aTypeOfExec,
}
}
}
}
// completed ops are in unspecified order
if
(
theCompletedFirstOp
!=
NULL
)
{
if
(
tCompletedFirstOp
==
NULL
)
{
tCompletedFirstOp
=
theCompletedFirstOp
;
tCompletedLastOp
=
theCompletedLastOp
;
}
else
{
tCompletedLastOp
->
next
(
theCompletedFirstOp
);
tCompletedLastOp
=
theCompletedLastOp
;
}
theCompletedFirstOp
=
NULL
;
theCompletedLastOp
=
NULL
;
}
if
(
executeNoBlobs
(
tExecType
,
abortOption
,
forceSend
)
==
-
1
)
if
(
executeNoBlobs
(
tExecType
,
abortOption
,
forceSend
)
==
-
1
)
ret
=
-
1
;
ret
=
-
1
;
#ifndef VM_TRACE
#ifndef VM_TRACE
...
@@ -362,6 +383,7 @@ NdbConnection::execute(ExecType aTypeOfExec,
...
@@ -362,6 +383,7 @@ NdbConnection::execute(ExecType aTypeOfExec,
tOp
=
tOp
->
next
();
tOp
=
tOp
->
next
();
}
}
}
}
// add saved prepared ops if batch
// add saved prepared ops if batch
if
(
tPrepOp
!=
NULL
&&
tRestOp
!=
NULL
)
{
if
(
tPrepOp
!=
NULL
&&
tRestOp
!=
NULL
)
{
if
(
theFirstOpInList
==
NULL
)
if
(
theFirstOpInList
==
NULL
)
...
@@ -373,6 +395,18 @@ NdbConnection::execute(ExecType aTypeOfExec,
...
@@ -373,6 +395,18 @@ NdbConnection::execute(ExecType aTypeOfExec,
assert
(
theFirstOpInList
==
NULL
||
tExecType
==
NoCommit
);
assert
(
theFirstOpInList
==
NULL
||
tExecType
==
NoCommit
);
}
while
(
theFirstOpInList
!=
NULL
||
tExecType
!=
aTypeOfExec
);
}
while
(
theFirstOpInList
!=
NULL
||
tExecType
!=
aTypeOfExec
);
if
(
tCompletedFirstOp
!=
NULL
)
{
tCompletedLastOp
->
next
(
theCompletedFirstOp
);
theCompletedFirstOp
=
tCompletedFirstOp
;
if
(
theCompletedLastOp
==
NULL
)
theCompletedLastOp
=
tCompletedLastOp
;
}
#if ndb_api_count_completed_ops_after_blob_execute
{
NdbOperation
*
tOp
;
unsigned
n
=
0
;
for
(
tOp
=
theCompletedFirstOp
;
tOp
!=
NULL
;
tOp
=
tOp
->
next
())
n
++
;
ndbout
<<
"completed ops: "
<<
n
<<
endl
;
}
#endif
DBUG_RETURN
(
ret
);
DBUG_RETURN
(
ret
);
}
}
...
@@ -894,6 +928,7 @@ NdbConnection::releaseOperations()
...
@@ -894,6 +928,7 @@ NdbConnection::releaseOperations()
releaseOps
(
theFirstExecOpInList
);
releaseOps
(
theFirstExecOpInList
);
theCompletedFirstOp
=
NULL
;
theCompletedFirstOp
=
NULL
;
theCompletedLastOp
=
NULL
;
theFirstOpInList
=
NULL
;
theFirstOpInList
=
NULL
;
theFirstExecOpInList
=
NULL
;
theFirstExecOpInList
=
NULL
;
theLastOpInList
=
NULL
;
theLastOpInList
=
NULL
;
...
@@ -909,6 +944,7 @@ NdbConnection::releaseCompletedOperations()
...
@@ -909,6 +944,7 @@ NdbConnection::releaseCompletedOperations()
{
{
releaseOps
(
theCompletedFirstOp
);
releaseOps
(
theCompletedFirstOp
);
theCompletedFirstOp
=
NULL
;
theCompletedFirstOp
=
NULL
;
theCompletedLastOp
=
NULL
;
}
//NdbConnection::releaseOperations()
}
//NdbConnection::releaseOperations()
/******************************************************************************
/******************************************************************************
...
...
ndb/test/ndbapi/testBlobs.cpp
View file @
ee54423a
This diff is collapsed.
Click to expand it.
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