File tree 4 files changed +14
-5
lines changed
storage/ndb/ndbapi-examples
4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- Copyright (c) 2008, 2010 , Oracle and/or its affiliates. All rights reserved.
2
+ Copyright (c) 2008, 2014 , Oracle and/or its affiliates. All rights reserved.
3
3
4
4
This program is free software; you can redistribute it and/or modify
5
5
it under the terms of the GNU General Public License as published by
@@ -671,10 +671,12 @@ static void do_read(Ndb &myNdb, ApiType accessType)
671
671
APIERROR (myTransaction->getNdbError ());
672
672
673
673
if (myTransaction->getNdbError ().classification == NdbError::NoDataFound)
674
+ {
674
675
if (i == 3 )
675
676
std::cout << " Detected that deleted tuple doesn't exist!" << std::endl;
676
677
else
677
678
APIERROR (myTransaction->getNdbError ());
679
+ }
678
680
679
681
switch (accessType)
680
682
{
@@ -773,11 +775,12 @@ static void do_mixed_read(Ndb &myNdb)
773
775
APIERROR (myTransaction->getNdbError ());
774
776
775
777
if (myTransaction->getNdbError ().classification == NdbError::NoDataFound)
778
+ {
776
779
if (i == 3 )
777
780
std::cout << " Detected that deleted tuple doesn't exist!" << std::endl;
778
781
else
779
782
APIERROR (myTransaction->getNdbError ());
780
-
783
+ }
781
784
782
785
if (i !=3 ) {
783
786
printf (" %2d %2d %2d %d\n " ,
Original file line number Diff line number Diff line change 1
1
/*
2
- Copyright (c) 2005, 2010 , Oracle and/or its affiliates. All rights reserved.
2
+ Copyright (c) 2005, 2014 , Oracle and/or its affiliates. All rights reserved.
3
3
4
4
This program is free software; you can redistribute it and/or modify
5
5
it under the terms of the GNU General Public License as published by
@@ -282,10 +282,12 @@ static void do_read(Ndb &myNdb)
282
282
APIERROR (myTransaction->getNdbError ());
283
283
284
284
if (myTransaction->getNdbError ().classification == NdbError::NoDataFound)
285
+ {
285
286
if (i == 3 )
286
287
std::cout << " Detected that deleted tuple doesn't exist!" << std::endl;
287
288
else
288
289
APIERROR (myTransaction->getNdbError ());
290
+ }
289
291
290
292
if (i != 3 ) {
291
293
printf (" %2d %2d\n " , i, myRecAttr->u_32_value ());
Original file line number Diff line number Diff line change 1
1
/*
2
- Copyright (c) 2006, 2010 , Oracle and/or its affiliates. All rights reserved.
2
+ Copyright (c) 2006, 2014 , Oracle and/or its affiliates. All rights reserved.
3
3
4
4
This program is free software; you can redistribute it and/or modify
5
5
it under the terms of the GNU General Public License as published by
@@ -322,11 +322,13 @@ static void do_read(Ndb &myNdb, const char* table)
322
322
if (myRecAttr == NULL ) APIERROR (myTransaction->getNdbError ());
323
323
324
324
if (myTransaction->execute ( NdbTransaction::Commit ) == -1 )
325
+ {
325
326
if (i == 3 ) {
326
327
std::cout << " Detected that deleted tuple doesn't exist!" << std::endl;
327
328
} else {
328
329
APIERROR (myTransaction->getNdbError ());
329
330
}
331
+ }
330
332
331
333
if (i != 3 ) {
332
334
printf (" %2d %2d\n " , i, myRecAttr->u_32_value ());
Original file line number Diff line number Diff line change 1
1
/*
2
- Copyright (c) 2005, 2013 , Oracle and/or its affiliates. All rights reserved.
2
+ Copyright (c) 2005, 2014 , Oracle and/or its affiliates. All rights reserved.
3
3
4
4
This program is free software; you can redistribute it and/or modify
5
5
it under the terms of the GNU General Public License as published by
@@ -258,11 +258,13 @@ int main(int argc, char** argv)
258
258
259
259
if (myTransaction->execute ( NdbTransaction::Commit,
260
260
NdbOperation::AbortOnError ) == -1 )
261
+ {
261
262
if (i == 3 ) {
262
263
std::cout << " Detected that deleted tuple doesn't exist!\n " ;
263
264
} else {
264
265
APIERROR (myTransaction->getNdbError ());
265
266
}
267
+ }
266
268
267
269
if (i != 3 ) {
268
270
printf (" %2d %2d\n " , i, myRecAttr->u_32_value ());
You can’t perform that action at this time.
0 commit comments