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
84876432
Commit
84876432
authored
Jan 04, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-5.0-ndb
parents
9457c77e
5499b0c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
15 deletions
+28
-15
ndb/examples/ndbapi_simple_index_example/ndbapi_simple_index.cpp
...mples/ndbapi_simple_index_example/ndbapi_simple_index.cpp
+3
-3
ndb/src/ndbapi/NdbTransaction.cpp
ndb/src/ndbapi/NdbTransaction.cpp
+25
-12
No files found.
ndb/examples/ndbapi_simple_index_example/ndbapi_simple_index.cpp
View file @
84876432
...
...
@@ -143,7 +143,7 @@ int main()
if
(
myTransaction
==
NULL
)
APIERROR
(
myNdb
->
getNdbError
());
NdbIndexOperation
*
myIndexOperation
=
myTransaction
->
getNdbIndexOperation
(
"MYINDEXNAME
$unique
"
,
"MYTABLENAME"
);
myTransaction
->
getNdbIndexOperation
(
"MYINDEXNAME"
,
"MYTABLENAME"
);
if
(
myIndexOperation
==
NULL
)
APIERROR
(
myTransaction
->
getNdbError
());
myIndexOperation
->
readTuple
(
NdbOperation
::
LM_Read
);
...
...
@@ -166,7 +166,7 @@ int main()
if
(
myTransaction
==
NULL
)
APIERROR
(
myNdb
->
getNdbError
());
NdbIndexOperation
*
myIndexOperation
=
myTransaction
->
getNdbIndexOperation
(
"MYINDEXNAME
$unique
"
,
"MYTABLENAME"
);
myTransaction
->
getNdbIndexOperation
(
"MYINDEXNAME"
,
"MYTABLENAME"
);
if
(
myIndexOperation
==
NULL
)
APIERROR
(
myTransaction
->
getNdbError
());
myIndexOperation
->
updateTuple
();
...
...
@@ -187,7 +187,7 @@ int main()
if
(
myTransaction
==
NULL
)
APIERROR
(
myNdb
->
getNdbError
());
NdbIndexOperation
*
myIndexOperation
=
myTransaction
->
getNdbIndexOperation
(
"MYINDEXNAME
$unique
"
,
"MYTABLENAME"
);
myTransaction
->
getNdbIndexOperation
(
"MYINDEXNAME"
,
"MYTABLENAME"
);
if
(
myIndexOperation
==
NULL
)
APIERROR
(
myTransaction
->
getNdbError
());
myIndexOperation
->
deleteTuple
();
...
...
ndb/src/ndbapi/NdbTransaction.cpp
View file @
84876432
...
...
@@ -1076,15 +1076,15 @@ NdbTransaction::getNdbScanOperation(const char* aTableName)
}
//NdbTransaction::getNdbScanOperation()
/*****************************************************************************
NdbScanOperation* getNdbScanOperation(const char* anIndexName, const char* aTableName);
NdbScanOperation* getNdb
Index
ScanOperation(const char* anIndexName, const char* aTableName);
Return Value Return a pointer to a Ndb
ScanOperation object if getNdb
ScanOperation was succesful.
Return Value Return a pointer to a Ndb
IndexScanOperation object if getNdbIndex
ScanOperation was succesful.
Return NULL : In all other case.
Parameters: anIndexName : Name of the index to use.
aTableName : Name of the database table.
Remark: Get an operation from NdbScanOperation idlelist and get the NdbTransaction object
Remark: Get an operation from Ndb
Index
ScanOperation idlelist and get the NdbTransaction object
who was fetch by startTransaction pointing to this operation
getOperation will set the theTableId in the NdbOperation object.synchronous
getOperation will set the theTableId in the Ndb
IndexScan
Operation object.synchronous
******************************************************************************/
NdbIndexScanOperation
*
NdbTransaction
::
getNdbIndexScanOperation
(
const
char
*
anIndexName
,
...
...
@@ -1134,12 +1134,12 @@ NdbTransaction::getNdbIndexScanOperation(const NdbDictionary::Index * index,
/*****************************************************************************
NdbScanOperation* getNdbScanOperation(int aTableId);
Return Value Return a pointer to a Ndb
Operation object if getNdb
Operation was succesful.
Return Value Return a pointer to a Ndb
ScanOperation object if getNdbScan
Operation was succesful.
Return NULL: In all other case.
Parameters: tableId : Id of the database table beeing deleted.
Remark: Get an operation from NdbScanOperation object idlelist and get the NdbTransaction
object who was fetch by startTransaction pointing to this operation
getOperation will set the theTableId in the NdbOperation object, synchronous.
getOperation will set the theTableId in the Ndb
Scan
Operation object, synchronous.
*****************************************************************************/
NdbIndexScanOperation
*
NdbTransaction
::
getNdbScanOperation
(
const
NdbTableImpl
*
tab
)
...
...
@@ -1203,12 +1203,12 @@ NdbTransaction::getNdbScanOperation(const NdbDictionary::Table * table)
NdbIndexOperation* getNdbIndexOperation(const char* anIndexName,
const char* aTableName);
Return Value Return a pointer to a NdbOperation object if getNdb
Scan
Operation was succesful.
Return Value Return a pointer to a NdbOperation object if getNdb
Index
Operation was succesful.
Return NULL : In all other case.
Parameters: aTableName : Name of the database table.
Remark: Get an operation from Ndb
Scan
Operation idlelist and get the NdbTransaction object
who was fetch by startTransaction pointing to this
operation
getOperation will set the theTableId in the Ndb
Scan
Operation object.synchronous
Remark: Get an operation from Ndb
Index
Operation idlelist and get the NdbTransaction object
who was fetch by startTransaction pointing to this operation
getOperation will set the theTableId in the Ndb
Index
Operation object.synchronous
******************************************************************************/
NdbIndexOperation
*
NdbTransaction
::
getNdbIndexOperation
(
const
char
*
anIndexName
,
...
...
@@ -1216,8 +1216,21 @@ NdbTransaction::getNdbIndexOperation(const char* anIndexName,
{
if
(
theCommitStatus
==
Started
)
{
NdbTableImpl
*
table
=
theNdb
->
theDictionary
->
getTable
(
aTableName
);
NdbIndexImpl
*
index
=
theNdb
->
theDictionary
->
getIndex
(
anIndexName
,
aTableName
);
NdbIndexImpl
*
index
;
if
(
table
->
m_frm
.
get_data
())
{
// This unique index is defined from SQL level
static
const
char
*
uniqueSuffix
=
"$unique"
;
char
uniqueIndexName
[
MAX_TAB_NAME_SIZE
];
strxnmov
(
uniqueIndexName
,
MAX_TAB_NAME_SIZE
,
anIndexName
,
uniqueSuffix
,
NullS
);
index
=
theNdb
->
theDictionary
->
getIndex
(
uniqueIndexName
,
aTableName
);
}
else
index
=
theNdb
->
theDictionary
->
getIndex
(
anIndexName
,
aTableName
);
if
(
table
!=
0
&&
index
!=
0
){
return
getNdbIndexOperation
(
index
,
table
);
}
...
...
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