1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-30 11:22:14 +03:00

added new methods for NdbTransaction::getNdbIndexOperation() and NdbTransaction::getNdbIndexScanOperation() as recommended

made others depricated
updated examples to use recommended
This commit is contained in:
tomas@poseidon.ndb.mysql.com
2005-01-10 16:02:36 +01:00
parent ad2550ca26
commit 793f1eebbe
13 changed files with 223 additions and 78 deletions

View File

@@ -86,12 +86,15 @@ int main()
/******************************************************
* Insert (we do two insert transactions in parallel) *
******************************************************/
const NdbDictionary::Dictionary* myDict= myNdb->getDictionary();
const NdbDictionary::Table *myTable= myDict->getTable("MYTABLENAME");
if (myTable == NULL)
APIERROR(myDict->getNdbError());
for (int i = 0; i < 2; i++) {
myNdbTransaction[i] = myNdb->startTransaction();
if (myNdbTransaction[i] == NULL) APIERROR(myNdb->getNdbError());
myNdbOperation = myNdbTransaction[i]->getNdbOperation("MYTABLENAME");
// Error check. If error, then maybe table MYTABLENAME is not in database
myNdbOperation = myNdbTransaction[i]->getNdbOperation(myTable);
if (myNdbOperation == NULL) APIERROR(myNdbTransaction[i]->getNdbError());
myNdbOperation->insertTuple();