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
a0e534c7
Commit
a0e534c7
authored
Jan 04, 2005
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed NdbConnection to NdbTransaction
parent
3410ce09
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
16 deletions
+16
-16
ndb/tools/delete_all.cpp
ndb/tools/delete_all.cpp
+1
-1
ndb/tools/restore/consumer_restore.cpp
ndb/tools/restore/consumer_restore.cpp
+5
-5
ndb/tools/restore/consumer_restorem.cpp
ndb/tools/restore/consumer_restorem.cpp
+8
-8
ndb/tools/select_all.cpp
ndb/tools/select_all.cpp
+1
-1
ndb/tools/select_count.cpp
ndb/tools/select_count.cpp
+1
-1
No files found.
ndb/tools/delete_all.cpp
View file @
a0e534c7
...
@@ -119,7 +119,7 @@ int clear_table(Ndb* pNdb, const NdbDictionary::Table* pTab, int parallelism)
...
@@ -119,7 +119,7 @@ int clear_table(Ndb* pNdb, const NdbDictionary::Table* pTab, int parallelism)
const
int
retryMax
=
10
;
const
int
retryMax
=
10
;
int
deletedRows
=
0
;
int
deletedRows
=
0
;
int
check
;
int
check
;
Ndb
Conne
ction
*
pTrans
;
Ndb
Transa
ction
*
pTrans
;
NdbScanOperation
*
pOp
;
NdbScanOperation
*
pOp
;
NdbError
err
;
NdbError
err
;
...
...
ndb/tools/restore/consumer_restore.cpp
View file @
a0e534c7
...
@@ -21,7 +21,7 @@ extern FilteredNdbOut err;
...
@@ -21,7 +21,7 @@ extern FilteredNdbOut err;
extern
FilteredNdbOut
info
;
extern
FilteredNdbOut
info
;
extern
FilteredNdbOut
debug
;
extern
FilteredNdbOut
debug
;
static
void
callback
(
int
,
Ndb
Conne
ction
*
,
void
*
);
static
void
callback
(
int
,
Ndb
Transa
ction
*
,
void
*
);
extern
const
char
*
g_connect_string
;
extern
const
char
*
g_connect_string
;
bool
bool
...
@@ -492,7 +492,7 @@ BackupRestore::logEntry(const LogEntry & tup)
...
@@ -492,7 +492,7 @@ BackupRestore::logEntry(const LogEntry & tup)
if
(
!
m_restore
)
if
(
!
m_restore
)
return
;
return
;
Ndb
Conne
ction
*
trans
=
m_ndb
->
startTransaction
();
Ndb
Transa
ction
*
trans
=
m_ndb
->
startTransaction
();
if
(
trans
==
NULL
)
if
(
trans
==
NULL
)
{
{
// Deep shit, TODO: handle the error
// Deep shit, TODO: handle the error
...
@@ -584,12 +584,12 @@ BackupRestore::endOfLogEntrys()
...
@@ -584,12 +584,12 @@ BackupRestore::endOfLogEntrys()
*
*
* (This function must have three arguments:
* (This function must have three arguments:
* - The result of the transaction,
* - The result of the transaction,
* - The Ndb
Conne
ction object, and
* - The Ndb
Transa
ction object, and
* - A pointer to an arbitrary object.)
* - A pointer to an arbitrary object.)
*/
*/
static
void
static
void
callback
(
int
result
,
Ndb
Conne
ction
*
trans
,
void
*
aObject
)
callback
(
int
result
,
Ndb
Transa
ction
*
trans
,
void
*
aObject
)
{
{
restore_callback_t
*
cb
=
(
restore_callback_t
*
)
aObject
;
restore_callback_t
*
cb
=
(
restore_callback_t
*
)
aObject
;
(
cb
->
restore
)
->
cback
(
result
,
cb
);
(
cb
->
restore
)
->
cback
(
result
,
cb
);
...
@@ -603,7 +603,7 @@ BackupRestore::tuple(const TupleS & tup)
...
@@ -603,7 +603,7 @@ BackupRestore::tuple(const TupleS & tup)
return;
return;
while (1)
while (1)
{
{
Ndb
Conne
ction * trans = m_ndb->startTransaction();
Ndb
Transa
ction * trans = m_ndb->startTransaction();
if (trans == NULL)
if (trans == NULL)
{
{
// Deep shit, TODO: handle the error
// Deep shit, TODO: handle the error
...
...
ndb/tools/restore/consumer_restorem.cpp
View file @
a0e534c7
...
@@ -21,8 +21,8 @@ extern FilteredNdbOut err;
...
@@ -21,8 +21,8 @@ extern FilteredNdbOut err;
extern
FilteredNdbOut
info
;
extern
FilteredNdbOut
info
;
extern
FilteredNdbOut
debug
;
extern
FilteredNdbOut
debug
;
static
bool
asynchErrorHandler
(
Ndb
Conne
ction
*
trans
,
Ndb
*
ndb
);
static
bool
asynchErrorHandler
(
Ndb
Transa
ction
*
trans
,
Ndb
*
ndb
);
static
void
callback
(
int
result
,
Ndb
Conne
ction
*
trans
,
void
*
aObject
);
static
void
callback
(
int
result
,
Ndb
Transa
ction
*
trans
,
void
*
aObject
);
bool
bool
BackupRestore
::
init
()
BackupRestore
::
init
()
...
@@ -371,7 +371,7 @@ BackupRestore::tuple(const TupleS & tup)
...
@@ -371,7 +371,7 @@ BackupRestore::tuple(const TupleS & tup)
return;
return;
while (1)
while (1)
{
{
Ndb
Conne
ction * trans = m_ndb->startTransaction();
Ndb
Transa
ction * trans = m_ndb->startTransaction();
if (trans == NULL)
if (trans == NULL)
{
{
// Deep shit, TODO: handle the error
// Deep shit, TODO: handle the error
...
@@ -460,7 +460,7 @@ BackupRestore::logEntry(const LogEntry & tup)
...
@@ -460,7 +460,7 @@ BackupRestore::logEntry(const LogEntry & tup)
if
(
!
m_restore
)
if
(
!
m_restore
)
return
;
return
;
Ndb
Conne
ction
*
trans
=
m_ndb
->
startTransaction
();
Ndb
Transa
ction
*
trans
=
m_ndb
->
startTransaction
();
if
(
trans
==
NULL
)
if
(
trans
==
NULL
)
{
{
// Deep shit, TODO: handle the error
// Deep shit, TODO: handle the error
...
@@ -551,7 +551,7 @@ BackupRestore::endOfLogEntrys()
...
@@ -551,7 +551,7 @@ BackupRestore::endOfLogEntrys()
*
*
******************************************/
******************************************/
static void restoreCallback(int result, // Result for transaction
static void restoreCallback(int result, // Result for transaction
Ndb
Conne
ction *object, // Transaction object
Ndb
Transa
ction *object, // Transaction object
void *anything) // Not used
void *anything) // Not used
{
{
static Uint32 counter = 0;
static Uint32 counter = 0;
...
@@ -593,12 +593,12 @@ static void restoreCallback(int result, // Result for transaction
...
@@ -593,12 +593,12 @@ static void restoreCallback(int result, // Result for transaction
*
*
* (This function must have three arguments:
* (This function must have three arguments:
* - The result of the transaction,
* - The result of the transaction,
* - The Ndb
Conne
ction object, and
* - The Ndb
Transa
ction object, and
* - A pointer to an arbitrary object.)
* - A pointer to an arbitrary object.)
*/
*/
static
void
static
void
callback
(
int
result
,
Ndb
Conne
ction
*
trans
,
void
*
aObject
)
callback
(
int
result
,
Ndb
Transa
ction
*
trans
,
void
*
aObject
)
{
{
restore_callback_t
*
cb
=
(
restore_callback_t
*
)
aObject
;
restore_callback_t
*
cb
=
(
restore_callback_t
*
)
aObject
;
(
cb
->
restore
)
->
cback
(
result
,
cb
);
(
cb
->
restore
)
->
cback
(
result
,
cb
);
...
@@ -610,7 +610,7 @@ callback(int result, NdbConnection* trans, void* aObject)
...
@@ -610,7 +610,7 @@ callback(int result, NdbConnection* trans, void* aObject)
* false if it is an error that generates an abort.
* false if it is an error that generates an abort.
*/
*/
static
static
bool
asynchErrorHandler
(
Ndb
Conne
ction
*
trans
,
Ndb
*
ndb
)
bool
asynchErrorHandler
(
Ndb
Transa
ction
*
trans
,
Ndb
*
ndb
)
{
{
NdbError
error
=
trans
->
getNdbError
();
NdbError
error
=
trans
->
getNdbError
();
ndb
->
closeTransaction
(
trans
);
ndb
->
closeTransaction
(
trans
);
...
...
ndb/tools/select_all.cpp
View file @
a0e534c7
...
@@ -194,7 +194,7 @@ int scanReadRecords(Ndb* pNdb,
...
@@ -194,7 +194,7 @@ int scanReadRecords(Ndb* pNdb,
int
retryAttempt
=
0
;
int
retryAttempt
=
0
;
const
int
retryMax
=
100
;
const
int
retryMax
=
100
;
int
check
;
int
check
;
Ndb
Connection
*
pTrans
;
Ndb
Transaction
*
pTrans
;
NdbScanOperation
*
pOp
;
NdbScanOperation
*
pOp
;
NdbIndexScanOperation
*
pIOp
=
0
;
NdbIndexScanOperation
*
pIOp
=
0
;
...
...
ndb/tools/select_count.cpp
View file @
a0e534c7
...
@@ -141,7 +141,7 @@ select_count(Ndb* pNdb, const NdbDictionary::Table* pTab,
...
@@ -141,7 +141,7 @@ select_count(Ndb* pNdb, const NdbDictionary::Table* pTab,
int
retryAttempt
=
0
;
int
retryAttempt
=
0
;
const
int
retryMax
=
100
;
const
int
retryMax
=
100
;
int
check
;
int
check
;
Ndb
Connection
*
pTrans
;
Ndb
Transaction
*
pTrans
;
NdbScanOperation
*
pOp
;
NdbScanOperation
*
pOp
;
while
(
true
){
while
(
true
){
...
...
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