mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
ndb: use Ndb_cluster_connection in test*
ndb/test/ndbapi/testBlobs.cpp: use Ndb_cluster_connection ndb/test/ndbapi/testOIBasic.cpp: use Ndb_cluster_connection
This commit is contained in:
@ -59,7 +59,7 @@ struct Opt {
|
||||
unsigned m_subloop;
|
||||
const char* m_table;
|
||||
unsigned m_threads;
|
||||
unsigned m_v;
|
||||
int m_v;
|
||||
Opt() :
|
||||
m_batch(32),
|
||||
m_bound("01234"),
|
||||
@ -672,6 +672,8 @@ tabcount = sizeof(tablist) / sizeof(tablist[0]);
|
||||
|
||||
// connections
|
||||
|
||||
static Ndb_cluster_connection* g_ncc = 0;
|
||||
|
||||
struct Con {
|
||||
Ndb* m_ndb;
|
||||
NdbDictionary::Dictionary* m_dic;
|
||||
@ -720,7 +722,7 @@ int
|
||||
Con::connect()
|
||||
{
|
||||
assert(m_ndb == 0);
|
||||
m_ndb = new Ndb("TEST_DB");
|
||||
m_ndb = new Ndb(g_ncc, "TEST_DB");
|
||||
CHKCON(m_ndb->init() == 0, *this);
|
||||
CHKCON(m_ndb->waitUntilReady(30) == 0, *this);
|
||||
m_tx = 0, m_op = 0;
|
||||
@ -3514,8 +3516,11 @@ NDB_COMMAND(testOIBasic, "testOIBasic", "testOIBasic", "testOIBasic", 65535)
|
||||
}
|
||||
{
|
||||
Par par(g_opt);
|
||||
if (runtest(par) < 0)
|
||||
g_ncc = new Ndb_cluster_connection();
|
||||
if (g_ncc->connect(30) != 0 || runtest(par) < 0)
|
||||
goto failed;
|
||||
delete g_ncc;
|
||||
g_ncc = 0;
|
||||
}
|
||||
// always exit with NDBT code
|
||||
ok:
|
||||
|
Reference in New Issue
Block a user