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
d8a5305d
Commit
d8a5305d
authored
Apr 08, 2005
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1
parents
817f2c6a
72d89cc2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
4 deletions
+95
-4
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
+2
-4
ndb/test/ndbapi/testOperations.cpp
ndb/test/ndbapi/testOperations.cpp
+93
-0
No files found.
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
View file @
d8a5305d
...
...
@@ -11274,10 +11274,10 @@ void Dbacc::execACC_CHECK_SCAN(Signal* signal)
operationRecPtr
.
i
=
scanPtr
.
p
->
scanFirstQueuedOp
;
ptrCheckGuard
(
operationRecPtr
,
coprecsize
,
operationrec
);
takeOutReadyScanQueue
(
signal
);
fragrecptr
.
i
=
operationRecPtr
.
p
->
fragptr
;
ptrCheckGuard
(
fragrecptr
,
cfragmentsize
,
fragmentrec
);
if
(
operationRecPtr
.
p
->
elementIsDisappeared
==
ZTRUE
)
{
jam
();
fragrecptr
.
i
=
operationRecPtr
.
p
->
fragptr
;
ptrCheckGuard
(
fragrecptr
,
cfragmentsize
,
fragmentrec
);
if
(
fragrecptr
.
p
->
createLcp
==
ZTRUE
)
{
if
(
remainingUndoPages
()
<
ZMIN_UNDO_PAGES_AT_COMMIT
)
{
jam
();
...
...
@@ -11922,8 +11922,6 @@ void Dbacc::sendNextScanConf(Signal* signal)
return
;
}
//if
fragrecptr
.
i
=
operationRecPtr
.
p
->
fragptr
;
ptrCheckGuard
(
fragrecptr
,
cfragmentsize
,
fragmentrec
);
if
(
fragrecptr
.
p
->
keyLength
!=
0
)
{
jam
();
signal
->
theData
[
0
]
=
scanPtr
.
p
->
scanUserptr
;
...
...
ndb/test/ndbapi/testOperations.cpp
View file @
d8a5305d
...
...
@@ -530,6 +530,74 @@ runOperations(NDBT_Context* ctx, NDBT_Step* step)
return
NDBT_OK
;
}
int
runLockUpgrade1
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
// Verify that data in index match
// table data
Ndb
*
pNdb
=
GETNDB
(
step
);
HugoOperations
hugoOps
(
*
ctx
->
getTab
());
HugoTransactions
hugoTrans
(
*
ctx
->
getTab
());
if
(
hugoTrans
.
loadTable
(
pNdb
,
1
)
!=
0
){
g_err
<<
"Load table failed"
<<
endl
;
return
NDBT_FAILED
;
}
int
result
=
NDBT_OK
;
do
{
CHECK
(
hugoOps
.
startTransaction
(
pNdb
)
==
0
);
CHECK
(
hugoOps
.
pkReadRecord
(
pNdb
,
0
,
1
,
NdbOperation
::
LM_Read
)
==
0
);
CHECK
(
hugoOps
.
execute_NoCommit
(
pNdb
)
==
0
);
ctx
->
setProperty
(
"READ_DONE"
,
1
);
ctx
->
broadcast
();
ndbout_c
(
"wait 2"
);
ctx
->
getPropertyWait
(
"READ_DONE"
,
2
);
ndbout_c
(
"wait 2 - done"
);
ctx
->
setProperty
(
"READ_DONE"
,
3
);
ctx
->
broadcast
();
ndbout_c
(
"before update"
);
CHECK
(
hugoOps
.
pkUpdateRecord
(
pNdb
,
0
,
1
,
2
)
==
0
);
ndbout_c
(
"wait update"
);
CHECK
(
hugoOps
.
execute_NoCommit
(
pNdb
)
==
0
);
CHECK
(
hugoOps
.
closeTransaction
(
pNdb
));
}
while
(
0
);
return
result
;
}
int
runLockUpgrade2
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
// Verify that data in index match
// table data
Ndb
*
pNdb
=
GETNDB
(
step
);
HugoOperations
hugoOps
(
*
ctx
->
getTab
());
HugoTransactions
hugoTrans
(
*
ctx
->
getTab
());
int
result
=
NDBT_OK
;
do
{
CHECK
(
hugoOps
.
startTransaction
(
pNdb
)
==
0
);
ndbout_c
(
"wait 1"
);
ctx
->
getPropertyWait
(
"READ_DONE"
,
1
);
ndbout_c
(
"wait 1 - done"
);
CHECK
(
hugoOps
.
pkReadRecord
(
pNdb
,
0
,
1
,
NdbOperation
::
LM_Read
)
==
0
);
CHECK
(
hugoOps
.
execute_NoCommit
(
pNdb
)
==
0
);
ctx
->
setProperty
(
"READ_DONE"
,
2
);
ctx
->
broadcast
();
ndbout_c
(
"wait 3"
);
ctx
->
getPropertyWait
(
"READ_DONE"
,
3
);
ndbout_c
(
"wait 3 - done"
);
NdbSleep_MilliSleep
(
200
);
CHECK
(
hugoOps
.
execute_Commit
(
pNdb
)
==
0
);
}
while
(
0
);
return
NDBT_FAILED
;
}
int
main
(
int
argc
,
const
char
**
argv
){
ndb_init
();
...
...
@@ -538,6 +606,31 @@ main(int argc, const char** argv){
generate
(
tmp
,
5
);
NDBT_TestSuite
ts
(
"testOperations"
);
{
BaseString
name
(
"bug_9749"
);
NDBT_TestCaseImpl1
*
pt
=
new
NDBT_TestCaseImpl1
(
&
ts
,
name
.
c_str
(),
""
);
pt
->
addInitializer
(
new
NDBT_Initializer
(
pt
,
"runClearTable"
,
runClearTable
));
pt
->
addStep
(
new
NDBT_ParallelStep
(
pt
,
"thread1"
,
runLockUpgrade1
));
pt
->
addStep
(
new
NDBT_ParallelStep
(
pt
,
"thread2"
,
runLockUpgrade2
));
pt
->
addFinalizer
(
new
NDBT_Finalizer
(
pt
,
"runClearTable"
,
runClearTable
));
ts
.
addTest
(
pt
);
}
for
(
size_t
i
=
0
;
i
<
tmp
.
size
();
i
++
)
{
BaseString
name
;
...
...
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