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
477f1e2f
Commit
477f1e2f
authored
Jun 13, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/jonas/src/mysql-5.0
parents
b85705cc
a2037c67
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
221 additions
and
64 deletions
+221
-64
mysql-test/r/ndb_subquery.result
mysql-test/r/ndb_subquery.result
+19
-0
mysql-test/t/ndb_subquery.test
mysql-test/t/ndb_subquery.test
+23
-0
ndb/include/ndbapi/Ndb.hpp
ndb/include/ndbapi/Ndb.hpp
+1
-1
ndb/src/common/logger/Logger.cpp
ndb/src/common/logger/Logger.cpp
+2
-2
ndb/src/cw/cpcd/main.cpp
ndb/src/cw/cpcd/main.cpp
+3
-6
ndb/src/ndbapi/Ndb.cpp
ndb/src/ndbapi/Ndb.cpp
+9
-0
ndb/src/ndbapi/NdbScanOperation.cpp
ndb/src/ndbapi/NdbScanOperation.cpp
+5
-1
ndb/src/ndbapi/Ndbif.cpp
ndb/src/ndbapi/Ndbif.cpp
+3
-5
ndb/src/ndbapi/Ndbinit.cpp
ndb/src/ndbapi/Ndbinit.cpp
+1
-1
ndb/src/ndbapi/Ndblist.cpp
ndb/src/ndbapi/Ndblist.cpp
+2
-9
ndb/test/ndbapi/testBlobs.cpp
ndb/test/ndbapi/testBlobs.cpp
+5
-5
ndb/test/ndbapi/testNdbApi.cpp
ndb/test/ndbapi/testNdbApi.cpp
+101
-0
ndb/test/run-test/daily-basic-tests.txt
ndb/test/run-test/daily-basic-tests.txt
+4
-0
ndb/test/run-test/make-config.sh
ndb/test/run-test/make-config.sh
+17
-17
ndb/test/run-test/ndb-autotest.sh
ndb/test/run-test/ndb-autotest.sh
+9
-8
ndb/tools/restore/consumer_restore.cpp
ndb/tools/restore/consumer_restore.cpp
+16
-8
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+1
-1
No files found.
mysql-test/r/ndb_subquery.result
View file @
477f1e2f
...
@@ -40,3 +40,22 @@ p u o
...
@@ -40,3 +40,22 @@ p u o
5 5 5
5 5 5
drop table t1;
drop table t1;
drop table t2;
drop table t2;
create table t1 (p int not null primary key, u int not null) engine=ndb;
insert into t1 values (1,1),(2,2),(3,3);
create table t2 as
select t1.*
from t1 as t1, t1 as t2, t1 as t3, t1 as t4, t1 as t5, t1 as t6, t1 as t7, t1 as t8
where t1.u = t2.u
and t2.u = t3.u
and t3.u = t4.u
and t4.u = t5.u
and t5.u = t6.u
and t6.u = t7.u
and t7.u = t8.u;
select * from t2 order by 1;
p u
1 1
2 2
3 3
drop table t1;
drop table t2;
mysql-test/t/ndb_subquery.test
View file @
477f1e2f
...
@@ -37,3 +37,26 @@ drop table t1;
...
@@ -37,3 +37,26 @@ drop table t1;
drop
table
t2
;
drop
table
t2
;
# bug#5367
# bug#5367
##########
##########
###
# bug#11205
create
table
t1
(
p
int
not
null
primary
key
,
u
int
not
null
)
engine
=
ndb
;
insert
into
t1
values
(
1
,
1
),(
2
,
2
),(
3
,
3
);
create
table
t2
as
select
t1
.*
from
t1
as
t1
,
t1
as
t2
,
t1
as
t3
,
t1
as
t4
,
t1
as
t5
,
t1
as
t6
,
t1
as
t7
,
t1
as
t8
where
t1
.
u
=
t2
.
u
and
t2
.
u
=
t3
.
u
and
t3
.
u
=
t4
.
u
and
t4
.
u
=
t5
.
u
and
t5
.
u
=
t6
.
u
and
t6
.
u
=
t7
.
u
and
t7
.
u
=
t8
.
u
;
select
*
from
t2
order
by
1
;
drop
table
t1
;
drop
table
t2
;
ndb/include/ndbapi/Ndb.hpp
View file @
477f1e2f
...
@@ -1614,7 +1614,7 @@ private:
...
@@ -1614,7 +1614,7 @@ private:
Uint32
theNoOfPreparedTransactions
;
Uint32
theNoOfPreparedTransactions
;
Uint32
theNoOfSentTransactions
;
Uint32
theNoOfSentTransactions
;
Uint32
theNoOfCompletedTransactions
;
Uint32
theNoOfCompletedTransactions
;
Uint32
the
NoOfAllocated
Transactions
;
Uint32
the
RemainingStart
Transactions
;
Uint32
theMaxNoOfTransactions
;
Uint32
theMaxNoOfTransactions
;
Uint32
theMinNoOfEventsToWakeUp
;
Uint32
theMinNoOfEventsToWakeUp
;
...
...
ndb/src/common/logger/Logger.cpp
View file @
477f1e2f
...
@@ -352,11 +352,11 @@ Logger::log(LoggerLevel logLevel, const char* pMsg, va_list ap) const
...
@@ -352,11 +352,11 @@ Logger::log(LoggerLevel logLevel, const char* pMsg, va_list ap) const
{
{
if
(
m_logLevels
[
LL_ON
]
&&
m_logLevels
[
logLevel
])
if
(
m_logLevels
[
LL_ON
]
&&
m_logLevels
[
logLevel
])
{
{
char
buf
[
MAX_LOG_MESSAGE_SIZE
];
BaseString
::
vsnprintf
(
buf
,
sizeof
(
buf
),
pMsg
,
ap
);
LogHandler
*
pHandler
=
NULL
;
LogHandler
*
pHandler
=
NULL
;
while
(
(
pHandler
=
m_pHandlerList
->
next
())
!=
NULL
)
while
(
(
pHandler
=
m_pHandlerList
->
next
())
!=
NULL
)
{
{
char
buf
[
MAX_LOG_MESSAGE_SIZE
];
BaseString
::
vsnprintf
(
buf
,
sizeof
(
buf
),
pMsg
,
ap
);
pHandler
->
append
(
m_pCategory
,
logLevel
,
buf
);
pHandler
->
append
(
m_pCategory
,
logLevel
,
buf
);
}
}
}
}
...
...
ndb/src/cw/cpcd/main.cpp
View file @
477f1e2f
...
@@ -32,10 +32,9 @@
...
@@ -32,10 +32,9 @@
#include "common.hpp"
#include "common.hpp"
static
const
char
*
work_dir
=
CPCD_DEFAULT_WORK_DIR
;
static
const
char
*
work_dir
=
CPCD_DEFAULT_WORK_DIR
;
static
short
unsigned
int
port
;
static
int
unsigned
port
;
static
int
use_syslog
;
static
int
use_syslog
;
static
const
char
*
logfile
=
NULL
;
static
const
char
*
logfile
=
NULL
;
static
const
char
*
config_file
=
CPCD_DEFAULT_CONFIG_FILE
;
static
const
char
*
user
=
0
;
static
const
char
*
user
=
0
;
static
struct
my_option
my_long_options
[]
=
static
struct
my_option
my_long_options
[]
=
...
@@ -55,9 +54,6 @@ static struct my_option my_long_options[] =
...
@@ -55,9 +54,6 @@ static struct my_option my_long_options[] =
{
"debug"
,
'D'
,
"Enable debug mode"
,
{
"debug"
,
'D'
,
"Enable debug mode"
,
(
gptr
*
)
&
debug
,
(
gptr
*
)
&
debug
,
0
,
(
gptr
*
)
&
debug
,
(
gptr
*
)
&
debug
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"config"
,
'c'
,
"Config file"
,
(
gptr
*
)
&
config_file
,
(
gptr
*
)
&
config_file
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"user"
,
'u'
,
"Run as user"
,
{
"user"
,
'u'
,
"Run as user"
,
(
gptr
*
)
&
user
,
(
gptr
*
)
&
user
,
0
,
(
gptr
*
)
&
user
,
(
gptr
*
)
&
user
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
...
@@ -142,7 +138,8 @@ int main(int argc, char** argv){
...
@@ -142,7 +138,8 @@ int main(int argc, char** argv){
SocketServer
*
ss
=
new
SocketServer
();
SocketServer
*
ss
=
new
SocketServer
();
CPCDAPIService
*
serv
=
new
CPCDAPIService
(
cpcd
);
CPCDAPIService
*
serv
=
new
CPCDAPIService
(
cpcd
);
if
(
!
ss
->
setup
(
serv
,
&
port
)){
unsigned
short
real_port
=
port
;
// correct type
if
(
!
ss
->
setup
(
serv
,
&
real_port
)){
logger
.
critical
(
"Cannot setup server: %s"
,
strerror
(
errno
));
logger
.
critical
(
"Cannot setup server: %s"
,
strerror
(
errno
));
sleep
(
1
);
sleep
(
1
);
delete
ss
;
delete
ss
;
...
...
ndb/src/ndbapi/Ndb.cpp
View file @
477f1e2f
...
@@ -425,12 +425,20 @@ Ndb::startTransactionLocal(Uint32 aPriority, Uint32 nodeId)
...
@@ -425,12 +425,20 @@ Ndb::startTransactionLocal(Uint32 aPriority, Uint32 nodeId)
DBUG_ENTER
(
"Ndb::startTransactionLocal"
);
DBUG_ENTER
(
"Ndb::startTransactionLocal"
);
DBUG_PRINT
(
"enter"
,
(
"nodeid: %d"
,
nodeId
));
DBUG_PRINT
(
"enter"
,
(
"nodeid: %d"
,
nodeId
));
if
(
unlikely
(
theRemainingStartTransactions
==
0
))
{
theError
.
code
=
4006
;
DBUG_RETURN
(
0
);
}
NdbTransaction
*
tConnection
;
NdbTransaction
*
tConnection
;
Uint64
tFirstTransId
=
theFirstTransId
;
Uint64
tFirstTransId
=
theFirstTransId
;
tConnection
=
doConnect
(
nodeId
);
tConnection
=
doConnect
(
nodeId
);
if
(
tConnection
==
NULL
)
{
if
(
tConnection
==
NULL
)
{
DBUG_RETURN
(
NULL
);
DBUG_RETURN
(
NULL
);
}
//if
}
//if
theRemainingStartTransactions
--
;
NdbTransaction
*
tConNext
=
theTransactionList
;
NdbTransaction
*
tConNext
=
theTransactionList
;
tConnection
->
init
();
tConnection
->
init
();
theTransactionList
=
tConnection
;
// into a transaction list.
theTransactionList
=
tConnection
;
// into a transaction list.
...
@@ -481,6 +489,7 @@ Ndb::closeTransaction(NdbTransaction* aConnection)
...
@@ -481,6 +489,7 @@ Ndb::closeTransaction(NdbTransaction* aConnection)
CHECK_STATUS_MACRO_VOID
;
CHECK_STATUS_MACRO_VOID
;
tCon
=
theTransactionList
;
tCon
=
theTransactionList
;
theRemainingStartTransactions
++
;
DBUG_PRINT
(
"info"
,(
"close trans: 0x%x transid: 0x%llx"
,
DBUG_PRINT
(
"info"
,(
"close trans: 0x%x transid: 0x%llx"
,
aConnection
,
aConnection
->
getTransactionId
()));
aConnection
,
aConnection
->
getTransactionId
()));
...
...
ndb/src/ndbapi/NdbScanOperation.cpp
View file @
477f1e2f
...
@@ -89,15 +89,18 @@ int
...
@@ -89,15 +89,18 @@ int
NdbScanOperation
::
init
(
const
NdbTableImpl
*
tab
,
NdbTransaction
*
myConnection
)
NdbScanOperation
::
init
(
const
NdbTableImpl
*
tab
,
NdbTransaction
*
myConnection
)
{
{
m_transConnection
=
myConnection
;
m_transConnection
=
myConnection
;
//NdbTransaction* aScanConnection = theNdb->startTransaction(myConnection);
//NdbConnection* aScanConnection = theNdb->startTransaction(myConnection);
theNdb
->
theRemainingStartTransactions
++
;
// will be checked in hupp...
NdbTransaction
*
aScanConnection
=
theNdb
->
hupp
(
myConnection
);
NdbTransaction
*
aScanConnection
=
theNdb
->
hupp
(
myConnection
);
if
(
!
aScanConnection
){
if
(
!
aScanConnection
){
theNdb
->
theRemainingStartTransactions
--
;
setErrorCodeAbort
(
theNdb
->
getNdbError
().
code
);
setErrorCodeAbort
(
theNdb
->
getNdbError
().
code
);
return
-
1
;
return
-
1
;
}
}
// NOTE! The hupped trans becomes the owner of the operation
// NOTE! The hupped trans becomes the owner of the operation
if
(
NdbOperation
::
init
(
tab
,
aScanConnection
)
!=
0
){
if
(
NdbOperation
::
init
(
tab
,
aScanConnection
)
!=
0
){
theNdb
->
theRemainingStartTransactions
--
;
return
-
1
;
return
-
1
;
}
}
...
@@ -675,6 +678,7 @@ void NdbScanOperation::close(bool forceSend, bool releaseOp)
...
@@ -675,6 +678,7 @@ void NdbScanOperation::close(bool forceSend, bool releaseOp)
tCon
->
theScanningOp
=
0
;
tCon
->
theScanningOp
=
0
;
theNdb
->
closeTransaction
(
tCon
);
theNdb
->
closeTransaction
(
tCon
);
theNdb
->
theRemainingStartTransactions
--
;
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
...
...
ndb/src/ndbapi/Ndbif.cpp
View file @
477f1e2f
...
@@ -107,12 +107,10 @@ Ndb::init(int aMaxNoOfTransactions)
...
@@ -107,12 +107,10 @@ Ndb::init(int aMaxNoOfTransactions)
goto
error_handler
;
goto
error_handler
;
}
}
tMaxNoOfTransactions
=
aMaxNoOfTransactions
*
3
;
if
(
tMaxNoOfTransactions
>
1024
)
{
tMaxNoOfTransactions
=
aMaxNoOfTransactions
;
tMaxNoOfTransactions
=
1024
;
}
//if
theMaxNoOfTransactions
=
tMaxNoOfTransactions
;
theMaxNoOfTransactions
=
tMaxNoOfTransactions
;
theRemainingStartTransactions
=
tMaxNoOfTransactions
;
thePreparedTransactionsArray
=
new
NdbTransaction
*
[
tMaxNoOfTransactions
];
thePreparedTransactionsArray
=
new
NdbTransaction
*
[
tMaxNoOfTransactions
];
theSentTransactionsArray
=
new
NdbTransaction
*
[
tMaxNoOfTransactions
];
theSentTransactionsArray
=
new
NdbTransaction
*
[
tMaxNoOfTransactions
];
theCompletedTransactionsArray
=
new
NdbTransaction
*
[
tMaxNoOfTransactions
];
theCompletedTransactionsArray
=
new
NdbTransaction
*
[
tMaxNoOfTransactions
];
...
...
ndb/src/ndbapi/Ndbinit.cpp
View file @
477f1e2f
...
@@ -59,7 +59,7 @@ void Ndb::setup(Ndb_cluster_connection *ndb_cluster_connection,
...
@@ -59,7 +59,7 @@ void Ndb::setup(Ndb_cluster_connection *ndb_cluster_connection,
theNoOfPreparedTransactions
=
0
;
theNoOfPreparedTransactions
=
0
;
theNoOfSentTransactions
=
0
;
theNoOfSentTransactions
=
0
;
theNoOfCompletedTransactions
=
0
;
theNoOfCompletedTransactions
=
0
;
the
NoOfAllocated
Transactions
=
0
;
the
RemainingStart
Transactions
=
0
;
theMaxNoOfTransactions
=
0
;
theMaxNoOfTransactions
=
0
;
theMinNoOfEventsToWakeUp
=
0
;
theMinNoOfEventsToWakeUp
=
0
;
theConIdleList
=
NULL
;
theConIdleList
=
NULL
;
...
...
ndb/src/ndbapi/Ndblist.cpp
View file @
477f1e2f
...
@@ -93,7 +93,6 @@ Ndb::createConIdleList(int aNrOfCon)
...
@@ -93,7 +93,6 @@ Ndb::createConIdleList(int aNrOfCon)
}
}
tNdbCon
->
Status
(
NdbTransaction
::
NotConnected
);
tNdbCon
->
Status
(
NdbTransaction
::
NotConnected
);
}
}
theNoOfAllocatedTransactions
=
aNrOfCon
;
return
aNrOfCon
;
return
aNrOfCon
;
}
}
...
@@ -193,14 +192,8 @@ Ndb::getNdbCon()
...
@@ -193,14 +192,8 @@ Ndb::getNdbCon()
{
{
NdbTransaction
*
tNdbCon
;
NdbTransaction
*
tNdbCon
;
if
(
theConIdleList
==
NULL
)
{
if
(
theConIdleList
==
NULL
)
{
if
(
theNoOfAllocatedTransactions
<
theMaxNoOfTransactions
)
{
tNdbCon
=
new
NdbTransaction
(
this
);
tNdbCon
=
new
NdbTransaction
(
this
);
if
(
tNdbCon
==
NULL
)
{
if
(
tNdbCon
==
NULL
)
{
return
NULL
;
}
//if
theNoOfAllocatedTransactions
++
;
}
else
{
ndbout
<<
"theNoOfAllocatedTransactions = "
<<
theNoOfAllocatedTransactions
<<
" theMaxNoOfTransactions = "
<<
theMaxNoOfTransactions
<<
endl
;
return
NULL
;
return
NULL
;
}
//if
}
//if
tNdbCon
->
next
(
NULL
);
tNdbCon
->
next
(
NULL
);
...
...
ndb/test/ndbapi/testBlobs.cpp
View file @
477f1e2f
...
@@ -1543,11 +1543,11 @@ testperf()
...
@@ -1543,11 +1543,11 @@ testperf()
}
}
if
(
n
!=
0
)
{
if
(
n
!=
0
)
{
CHK
(
g_con
->
execute
(
Commit
)
==
0
);
CHK
(
g_con
->
execute
(
Commit
)
==
0
);
g_ndb
->
closeTransaction
(
g_con
);
g_con
=
0
;
n
=
0
;
n
=
0
;
}
}
g_bh1
=
0
;
g_bh1
=
0
;
g_opr
=
0
;
g_opr
=
0
;
g_con
=
0
;
}
}
// pk read char (one trans)
// pk read char (one trans)
{
{
...
@@ -1571,7 +1571,7 @@ testperf()
...
@@ -1571,7 +1571,7 @@ testperf()
t1
.
off
(
g_opt
.
m_rowsperf
);
t1
.
off
(
g_opt
.
m_rowsperf
);
DBG
(
t1
.
time
());
DBG
(
t1
.
time
());
g_opr
=
0
;
g_opr
=
0
;
g_con
=
0
;
g_
ndb
->
closeTransaction
(
g_con
);
g_
con
=
0
;
}
}
// pk read text (one trans)
// pk read text (one trans)
{
{
...
@@ -1596,7 +1596,7 @@ testperf()
...
@@ -1596,7 +1596,7 @@ testperf()
CHK
(
g_con
->
execute
(
Commit
)
==
0
);
CHK
(
g_con
->
execute
(
Commit
)
==
0
);
t2
.
off
(
g_opt
.
m_rowsperf
);
t2
.
off
(
g_opt
.
m_rowsperf
);
DBG
(
t2
.
time
());
DBG
(
t2
.
time
());
g_opr
=
0
;
g_
ndb
->
closeTransaction
(
g_con
);
g_
opr
=
0
;
g_con
=
0
;
g_con
=
0
;
}
}
// pk read overhead
// pk read overhead
...
@@ -1629,7 +1629,7 @@ testperf()
...
@@ -1629,7 +1629,7 @@ testperf()
CHK
(
n
==
g_opt
.
m_rowsperf
);
CHK
(
n
==
g_opt
.
m_rowsperf
);
t1
.
off
(
g_opt
.
m_rowsperf
);
t1
.
off
(
g_opt
.
m_rowsperf
);
DBG
(
t1
.
time
());
DBG
(
t1
.
time
());
g_ops
=
0
;
g_
ndb
->
closeTransaction
(
g_con
);
g_
ops
=
0
;
g_con
=
0
;
g_con
=
0
;
}
}
// scan read text
// scan read text
...
@@ -1662,7 +1662,7 @@ testperf()
...
@@ -1662,7 +1662,7 @@ testperf()
DBG
(
t2
.
time
());
DBG
(
t2
.
time
());
g_bh1
=
0
;
g_bh1
=
0
;
g_ops
=
0
;
g_ops
=
0
;
g_con
=
0
;
g_
ndb
->
closeTransaction
(
g_con
);
g_
con
=
0
;
}
}
// scan read overhead
// scan read overhead
DBG
(
"scan read overhead: "
<<
t2
.
over
(
t1
));
DBG
(
"scan read overhead: "
<<
t2
.
over
(
t1
));
...
...
ndb/test/ndbapi/testNdbApi.cpp
View file @
477f1e2f
...
@@ -1269,6 +1269,101 @@ int runBug_11133(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -1269,6 +1269,101 @@ int runBug_11133(NDBT_Context* ctx, NDBT_Step* step){
return
result
;
return
result
;
}
}
int
runScan_4006
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
const
Uint32
max
=
5
;
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
Ndb
*
pNdb
=
new
Ndb
(
&
ctx
->
m_cluster_connection
,
"TEST_DB"
);
if
(
pNdb
==
NULL
){
ndbout
<<
"pNdb == NULL"
<<
endl
;
return
NDBT_FAILED
;
}
if
(
pNdb
->
init
(
max
)){
ERR
(
pNdb
->
getNdbError
());
delete
pNdb
;
return
NDBT_FAILED
;
}
NdbConnection
*
pCon
=
pNdb
->
startTransaction
();
if
(
pCon
==
NULL
){
pNdb
->
closeTransaction
(
pCon
);
delete
pNdb
;
return
NDBT_FAILED
;
}
Uint32
i
;
Vector
<
NdbScanOperation
*>
scans
;
for
(
i
=
0
;
i
<
10
*
max
;
i
++
)
{
NdbScanOperation
*
pOp
=
pCon
->
getNdbScanOperation
(
pTab
->
getName
());
if
(
pOp
==
NULL
){
ERR
(
pCon
->
getNdbError
());
pNdb
->
closeTransaction
(
pCon
);
delete
pNdb
;
return
NDBT_FAILED
;
}
if
(
pOp
->
readTuples
()
!=
0
){
pNdb
->
closeTransaction
(
pCon
);
ERR
(
pOp
->
getNdbError
());
delete
pNdb
;
return
NDBT_FAILED
;
}
scans
.
push_back
(
pOp
);
}
// Dont' call any equal or setValues
// Execute should not work
int
check
=
pCon
->
execute
(
NoCommit
);
if
(
check
==
0
){
ndbout
<<
"execute worked"
<<
endl
;
}
else
{
ERR
(
pCon
->
getNdbError
());
}
for
(
i
=
0
;
i
<
scans
.
size
();
i
++
)
{
NdbScanOperation
*
pOp
=
scans
[
i
];
while
((
check
=
pOp
->
nextResult
())
==
0
);
if
(
check
!=
1
)
{
ERR
(
pOp
->
getNdbError
());
pNdb
->
closeTransaction
(
pCon
);
delete
pNdb
;
return
NDBT_FAILED
;
}
}
pNdb
->
closeTransaction
(
pCon
);
Vector
<
NdbConnection
*>
cons
;
for
(
i
=
0
;
i
<
10
*
max
;
i
++
)
{
pCon
=
pNdb
->
startTransaction
();
if
(
pCon
)
cons
.
push_back
(
pCon
);
else
break
;
}
for
(
i
=
0
;
i
<
cons
.
size
();
i
++
)
{
cons
[
i
]
->
close
();
}
if
(
cons
.
size
()
!=
max
)
{
result
=
NDBT_FAILED
;
}
delete
pNdb
;
return
result
;
}
template
class
Vector
<
NdbScanOperation
*
>;
NDBT_TESTSUITE
(
testNdbApi
);
NDBT_TESTSUITE
(
testNdbApi
);
...
@@ -1351,6 +1446,12 @@ TESTCASE("Bug_11133",
...
@@ -1351,6 +1446,12 @@ TESTCASE("Bug_11133",
INITIALIZER
(
runBug_11133
);
INITIALIZER
(
runBug_11133
);
FINALIZER
(
runClearTable
);
FINALIZER
(
runClearTable
);
}
}
TESTCASE
(
"Scan_4006"
,
"Check that getNdbScanOperation does not get 4006
\n
"
){
INITIALIZER
(
runLoadTable
);
INITIALIZER
(
runScan_4006
);
FINALIZER
(
runClearTable
);
}
NDBT_TESTSUITE_END
(
testNdbApi
);
NDBT_TESTSUITE_END
(
testNdbApi
);
int
main
(
int
argc
,
const
char
**
argv
){
int
main
(
int
argc
,
const
char
**
argv
){
...
...
ndb/test/run-test/daily-basic-tests.txt
View file @
477f1e2f
...
@@ -520,6 +520,10 @@ max-time: 500
...
@@ -520,6 +520,10 @@ max-time: 500
cmd: testNdbApi
cmd: testNdbApi
args: -n Bug_11133 T1
args: -n Bug_11133 T1
max-time: 500
cmd: testNdbApi
args: -n Scan_4006 T1
#max-time: 500
#max-time: 500
#cmd: testInterpreter
#cmd: testInterpreter
#args: T1
#args: T1
...
...
ndb/test/run-test/make-config.sh
View file @
477f1e2f
...
@@ -20,40 +20,40 @@ add_procs(){
...
@@ -20,40 +20,40 @@ add_procs(){
}
}
add_proc
(){
add_proc
(){
dir
=
""
conf
=
""
case
$type
in
case
$type
in
mgm
)
mgm
)
dir
=
"ndb_mgmd"
echo
"
$proc_no
.ndb_mgmd"
>>
$dir_file
conf
=
"[ndb_mgmd]
\n
Id:
$node_id
\n
HostName:
$2
\n
"
echo
"[ndb_mgmd]"
>>
$config_file
echo
"Id:
$node_id
"
>>
$config_file
echo
"HostName:
$2
"
>>
$config_file
node_id
=
`
expr
$node_id
+ 1
`
node_id
=
`
expr
$node_id
+ 1
`
;;
;;
api
)
api
)
dir
=
"ndb_api"
echo
"
$proc_no
.ndb_api"
>>
$dir_file
conf
=
"[api]
\n
Id:
$node_id
\n
HostName:
$2
\n
"
echo
"[api]"
>>
$config_file
echo
"Id:
$node_id
"
>>
$config_file
echo
"HostName:
$2
"
>>
$config_file
node_id
=
`
expr
$node_id
+ 1
`
node_id
=
`
expr
$node_id
+ 1
`
;;
;;
ndb
)
ndb
)
dir
=
"ndbd"
echo
"
$proc_no
.ndbd"
>>
$dir_file
conf
=
"[ndbd]
\n
Id:
$node_id
\n
HostName:
$2
\n
"
echo
"[ndbd]"
>>
$config_file
echo
"Id:
$node_id
"
>>
$config_file
echo
"HostName:
$2
"
>>
$config_file
node_id
=
`
expr
$node_id
+ 1
`
node_id
=
`
expr
$node_id
+ 1
`
;;
;;
mysqld
)
mysqld
)
dir
=
"mysqld"
echo
"
$proc_no
.mysqld"
>>
$dir_file
conf
=
"[mysqld]
\n
Id:
$node_id
\n
HostName:
$2
\n
"
echo
"[ndb_mgmd]"
>>
$config_file
echo
"Id:
$node_id
"
>>
$config_file
echo
"HostName:
$2
"
>>
$config_file
node_id
=
`
expr
$node_id
+ 1
`
node_id
=
`
expr
$node_id
+ 1
`
;;
;;
mysql
)
mysql
)
dir
=
"mysql"
echo
"
$proc_no
.mysql"
>>
$dir_file
;;
;;
esac
esac
dir
=
"
$proc_no
.
$dir
"
proc_no
=
`
expr
$proc_no
+ 1
`
proc_no
=
`
expr
$proc_no
+ 1
`
echo
-e
$dir
>>
$dir_file
if
[
"
$conf
"
]
then
echo
-e
$conf
>>
$config_file
fi
}
}
...
...
ndb/test/run-test/ndb-autotest.sh
View file @
477f1e2f
...
@@ -66,7 +66,7 @@ done
...
@@ -66,7 +66,7 @@ done
if
[
-f
$conf
]
if
[
-f
$conf
]
then
then
.
$conf
.
./
$conf
else
else
echo
"Can't find config file:
$conf
"
echo
"Can't find config file:
$conf
"
exit
exit
...
@@ -131,8 +131,10 @@ echo "$DATE $RUN" > $LOCK
...
@@ -131,8 +131,10 @@ echo "$DATE $RUN" > $LOCK
# trap them, and remove the #
# trap them, and remove the #
# Lock file before exit #
# Lock file before exit #
#############################
#############################
if
[
`
uname
-s
`
!=
"SunOS"
]
trap
"rm -f
$LOCK
"
ERR
then
trap
"rm -f
$LOCK
"
ERR
fi
# You can add more to this path#
# You can add more to this path#
################################
################################
...
@@ -191,7 +193,7 @@ then
...
@@ -191,7 +193,7 @@ then
else
else
echo
$VERSION
>
/tmp/version.
$$
echo
$VERSION
>
/tmp/version.
$$
fi
fi
match
=
`
grep
-c
"
$VERSION
"
/tmp/version.
$$
`
match
=
`
grep
-c
"
$VERSION
"
/tmp/version.
$$
| xargs
echo
`
rm
-f
/tmp/version.
$$
rm
-f
/tmp/version.
$$
if
[
$match
-eq
0
]
if
[
$match
-eq
0
]
then
then
...
@@ -229,7 +231,7 @@ filter(){
...
@@ -229,7 +231,7 @@ filter(){
shift
shift
while
[
$#
-gt
0
]
while
[
$#
-gt
0
]
do
do
if
[
`
grep
-c
$1
$neg
`
-eq
0
]
;
then
echo
$1
;
fi
if
[
`
grep
-c
$1
$neg
| xargs
echo
`
-eq
0
]
;
then
echo
$1
;
fi
shift
shift
done
done
}
}
...
@@ -294,13 +296,12 @@ choose_conf(){
...
@@ -294,13 +296,12 @@ choose_conf(){
if
[
-f
$test_dir
/conf-
$1
-
$HOST
.txt
]
if
[
-f
$test_dir
/conf-
$1
-
$HOST
.txt
]
then
then
echo
"
$test_dir
/conf-
$1
-
$HOST
.txt"
echo
"
$test_dir
/conf-
$1
-
$HOST
.txt"
echo
"
$test_dir
/conf-
$1
-
$host
.txt"
elif
[
-f
$test_dir
/conf-
$1
.txt
]
elif
[
-f
$test_dir
/conf-
$1
.txt
]
then
then
echo
"
$test_dir
/conf-
$1
.txt"
echo
"
$test_dir
/conf-
$1
.txt"
else
else
echo
"Unable to find conf file looked for"
1>&2
echo
"Unable to find conf file looked for"
1>&2
echo
"
$testdir
/conf-
$1
-
host
.txt and"
1>&2
echo
"
$testdir
/conf-
$1
-
$HOST
.txt and"
1>&2
echo
"
$testdir
/conf-
$1
.txt"
1>&2
echo
"
$testdir
/conf-
$1
.txt"
1>&2
exit
exit
fi
fi
...
@@ -343,7 +344,7 @@ start(){
...
@@ -343,7 +344,7 @@ start(){
count_hosts
(){
count_hosts
(){
cnt
=
`
grep
"CHOOSE_host"
$1
|
awk
'{for(i=1; i<=NF;i++) \
cnt
=
`
grep
"CHOOSE_host"
$1
|
awk
'{for(i=1; i<=NF;i++) \
if(
match
($i, "CHOOSE_host") > 0) print $i;}'
|
sort
|
uniq
|
wc
-l
`
if(
index
($i, "CHOOSE_host") > 0) print $i;}'
|
sort
|
uniq
|
wc
-l
`
echo
$cnt
echo
$cnt
}
}
#######################################################
#######################################################
...
...
ndb/tools/restore/consumer_restore.cpp
View file @
477f1e2f
...
@@ -301,12 +301,11 @@ void BackupRestore::tuple_a(restore_callback_t *cb)
...
@@ -301,12 +301,11 @@ void BackupRestore::tuple_a(restore_callback_t *cb)
cb
->
connection
=
m_ndb
->
startTransaction
();
cb
->
connection
=
m_ndb
->
startTransaction
();
if
(
cb
->
connection
==
NULL
)
if
(
cb
->
connection
==
NULL
)
{
{
/*
if
(
errorHandler
(
cb
))
if (errorHandler(cb))
{
{
m_ndb
->
sendPollNdb
(
3000
,
1
);
continue
;
continue
;
}
}
*/
exitHandler
();
exitHandler
();
}
// if
}
// if
...
@@ -423,9 +422,17 @@ void BackupRestore::cback(int result, restore_callback_t *cb)
...
@@ -423,9 +422,17 @@ void BackupRestore::cback(int result, restore_callback_t *cb)
*/
*/
bool
BackupRestore
::
errorHandler
(
restore_callback_t
*
cb
)
bool
BackupRestore
::
errorHandler
(
restore_callback_t
*
cb
)
{
{
NdbError
error
=
cb
->
connection
->
getNdbError
();
NdbError
error
;
m_ndb
->
closeTransaction
(
cb
->
connection
);
if
(
cb
->
connection
)
cb
->
connection
=
0
;
{
error
=
cb
->
connection
->
getNdbError
();
m_ndb
->
closeTransaction
(
cb
->
connection
);
cb
->
connection
=
0
;
}
else
{
error
=
m_ndb
->
getNdbError
();
}
Uint32
sleepTime
=
100
+
cb
->
retries
*
300
;
Uint32
sleepTime
=
100
+
cb
->
retries
*
300
;
...
@@ -440,6 +447,7 @@ bool BackupRestore::errorHandler(restore_callback_t *cb)
...
@@ -440,6 +447,7 @@ bool BackupRestore::errorHandler(restore_callback_t *cb)
break
;
break
;
case
NdbError
:
:
TemporaryError
:
case
NdbError
:
:
TemporaryError
:
err
<<
"Temporary error: "
<<
error
<<
endl
;
NdbSleep_MilliSleep
(
sleepTime
);
NdbSleep_MilliSleep
(
sleepTime
);
return
true
;
return
true
;
// RETRY
// RETRY
...
...
sql/ha_ndbcluster.cc
View file @
477f1e2f
...
@@ -41,7 +41,7 @@ static const int parallelism= 0;
...
@@ -41,7 +41,7 @@ static const int parallelism= 0;
// Default value for max number of transactions
// Default value for max number of transactions
// createable against NDB from this handler
// createable against NDB from this handler
static
const
int
max_transactions
=
2
56
;
static
const
int
max_transactions
=
2
;
static
const
char
*
ha_ndb_ext
=
".ndb"
;
static
const
char
*
ha_ndb_ext
=
".ndb"
;
...
...
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