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
c3b9a42a
Commit
c3b9a42a
authored
Jul 22, 2005
by
ndbdev@dl145b.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1
parents
5712bf6d
21edad59
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
7 deletions
+73
-7
storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
+3
-3
storage/ndb/test/include/HugoOperations.hpp
storage/ndb/test/include/HugoOperations.hpp
+4
-0
storage/ndb/test/ndbapi/testNdbApi.cpp
storage/ndb/test/ndbapi/testNdbApi.cpp
+25
-3
storage/ndb/test/src/HugoOperations.cpp
storage/ndb/test/src/HugoOperations.cpp
+41
-1
No files found.
storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
View file @
c3b9a42a
...
...
@@ -4849,16 +4849,16 @@ Uint32 Dbacc::executeNextOperation(Signal* signal)
else
if
(
operationRecPtr
.
p
->
operation
==
ZWRITE
)
{
jam
();
operationRecPtr
.
p
->
operation
=
Z
INSERT
;
operationRecPtr
.
p
->
operation
=
Z
UPDATE
;
if
(
operationRecPtr
.
p
->
prevParallelQue
!=
RNIL
)
{
OperationrecPtr
prevOpPtr
;
jam
();
prevOpPtr
.
i
=
operationRecPtr
.
p
->
prevParallelQue
;
ptrCheckGuard
(
prevOpPtr
,
coprecsize
,
operationrec
);
if
(
prevOpPtr
.
p
->
operation
!
=
ZDELETE
)
if
(
prevOpPtr
.
p
->
operation
=
=
ZDELETE
)
{
jam
();
operationRecPtr
.
p
->
operation
=
Z
UPDATE
;
operationRecPtr
.
p
->
operation
=
Z
INSERT
;
}
}
}
...
...
storage/ndb/test/include/HugoOperations.hpp
View file @
c3b9a42a
...
...
@@ -46,6 +46,10 @@ public:
int
numRecords
=
1
,
int
updatesValue
=
0
);
int
pkWritePartialRecord
(
Ndb
*
,
int
recordNo
,
int
numRecords
=
1
);
int
pkReadRecord
(
Ndb
*
,
int
recordNo
,
int
numRecords
=
1
,
...
...
storage/ndb/test/ndbapi/testNdbApi.cpp
View file @
c3b9a42a
...
...
@@ -1037,7 +1037,7 @@ int runCheckGetNdbErrorOperation(NDBT_Context* ctx, NDBT_Step* step){
return
result
;
}
#define C2(x) { int _x= (x); if(_x == 0)
return NDBT_FAILED;
}
#define C2(x) { int _x= (x); if(_x == 0)
{ ndbout << "line: " << __LINE__ << endl; return NDBT_FAILED;}
}
int
runBug_11133
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
...
...
@@ -1046,7 +1046,6 @@ int runBug_11133(NDBT_Context* ctx, NDBT_Step* step){
HugoOperations
hugoOps
(
*
pTab
);
Ndb
*
pNdb
=
GETNDB
(
step
);
C2
(
hugoOps
.
startTransaction
(
pNdb
)
==
0
);
C2
(
hugoOps
.
pkInsertRecord
(
pNdb
,
0
,
1
)
==
0
);
C2
(
hugoOps
.
execute_NoCommit
(
pNdb
)
==
0
);
...
...
@@ -1098,7 +1097,7 @@ int runBug_11133(NDBT_Context* ctx, NDBT_Step* step){
C2
(
hugoOps
.
pkInsertRecord
(
pNdb
,
0
,
1
)
==
0
);
C2
(
hugoOps
.
execute_NoCommit
(
pNdb
)
==
0
);
C2
(
hugoOps2
.
startTransaction
(
&
ndb2
)
==
0
);
C2
(
hugoOps2
.
pkWrite
Record
(
&
ndb2
,
0
,
1
)
==
0
);
C2
(
hugoOps2
.
pkWrite
PartialRecord
(
&
ndb2
,
0
)
==
0
);
C2
(
hugoOps2
.
execute_async
(
&
ndb2
,
NdbTransaction
::
NoCommit
)
==
0
);
C2
(
hugoOps
.
execute_Commit
(
pNdb
)
==
0
);
C2
(
hugoOps2
.
wait_async
(
&
ndb2
)
==
0
);
...
...
@@ -1113,6 +1112,29 @@ int runBug_11133(NDBT_Context* ctx, NDBT_Step* step){
C2
(
hugoOps2
.
execute_async
(
&
ndb2
,
NdbTransaction
::
NoCommit
)
==
0
);
C2
(
hugoOps
.
execute_Commit
(
pNdb
)
==
0
);
C2
(
hugoOps2
.
wait_async
(
&
ndb2
)
==
0
);
C2
(
hugoOps2
.
execute_Commit
(
pNdb
)
==
0
);
C2
(
hugoOps
.
closeTransaction
(
pNdb
)
==
0
);
C2
(
hugoOps2
.
closeTransaction
(
&
ndb2
)
==
0
);
C2
(
hugoOps
.
startTransaction
(
pNdb
)
==
0
);
C2
(
hugoOps
.
pkUpdateRecord
(
pNdb
,
0
,
1
)
==
0
);
C2
(
hugoOps
.
execute_NoCommit
(
pNdb
)
==
0
);
C2
(
hugoOps2
.
startTransaction
(
&
ndb2
)
==
0
);
C2
(
hugoOps2
.
pkWritePartialRecord
(
&
ndb2
,
0
)
==
0
);
C2
(
hugoOps2
.
execute_async
(
&
ndb2
,
NdbTransaction
::
NoCommit
)
==
0
);
C2
(
hugoOps
.
execute_Commit
(
pNdb
)
==
0
);
C2
(
hugoOps2
.
wait_async
(
&
ndb2
)
==
0
);
C2
(
hugoOps
.
closeTransaction
(
pNdb
)
==
0
);
C2
(
hugoOps2
.
closeTransaction
(
&
ndb2
)
==
0
);
C2
(
hugoOps
.
startTransaction
(
pNdb
)
==
0
);
C2
(
hugoOps
.
pkDeleteRecord
(
pNdb
,
0
,
1
)
==
0
);
C2
(
hugoOps
.
execute_NoCommit
(
pNdb
)
==
0
);
C2
(
hugoOps2
.
startTransaction
(
&
ndb2
)
==
0
);
C2
(
hugoOps2
.
pkWritePartialRecord
(
&
ndb2
,
0
)
==
0
);
C2
(
hugoOps2
.
execute_async
(
&
ndb2
,
NdbTransaction
::
NoCommit
)
==
0
);
C2
(
hugoOps
.
execute_Commit
(
pNdb
)
==
0
);
C2
(
hugoOps2
.
wait_async
(
&
ndb2
)
!=
0
);
C2
(
hugoOps
.
closeTransaction
(
pNdb
)
==
0
);
C2
(
hugoOps2
.
closeTransaction
(
&
ndb2
)
==
0
);
...
...
storage/ndb/test/src/HugoOperations.cpp
View file @
c3b9a42a
...
...
@@ -267,6 +267,37 @@ int HugoOperations::pkWriteRecord(Ndb* pNdb,
return
NDBT_OK
;
}
int
HugoOperations
::
pkWritePartialRecord
(
Ndb
*
pNdb
,
int
recordNo
,
int
numRecords
){
int
a
,
check
;
for
(
int
r
=
0
;
r
<
numRecords
;
r
++
){
NdbOperation
*
pOp
=
pTrans
->
getNdbOperation
(
tab
.
getName
());
if
(
pOp
==
NULL
)
{
ERR
(
pTrans
->
getNdbError
());
return
NDBT_FAILED
;
}
check
=
pOp
->
writeTuple
();
if
(
check
==
-
1
)
{
ERR
(
pTrans
->
getNdbError
());
return
NDBT_FAILED
;
}
// Define primary keys
for
(
a
=
0
;
a
<
tab
.
getNoOfColumns
();
a
++
){
if
(
tab
.
getColumn
(
a
)
->
getPrimaryKey
()
==
true
){
if
(
equalForAttr
(
pOp
,
a
,
r
+
recordNo
)
!=
0
){
ERR
(
pTrans
->
getNdbError
());
return
NDBT_FAILED
;
}
}
}
}
return
NDBT_OK
;
}
int
HugoOperations
::
pkDeleteRecord
(
Ndb
*
pNdb
,
int
recordNo
,
int
numRecords
){
...
...
@@ -419,7 +450,14 @@ HugoOperations::callback(int res, NdbTransaction* pCon)
{
assert
(
pCon
==
pTrans
);
m_async_reply
=
1
;
m_async_return
=
res
;
if
(
res
)
{
m_async_return
=
pCon
->
getNdbError
().
code
;
}
else
{
m_async_return
=
0
;
}
}
int
...
...
@@ -444,6 +482,8 @@ HugoOperations::wait_async(Ndb* pNdb, int timeout)
if
(
m_async_reply
)
{
if
(
m_async_return
)
ndbout
<<
"ERROR: "
<<
pNdb
->
getNdbError
(
m_async_return
)
<<
endl
;
return
m_async_return
;
}
ndbout_c
(
"wait returned nothing..."
);
...
...
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