hi all
I create a table test index:
CREATE TABLE test(
ID VARCHAR(100) NOT NULL,
NUM VARCHAR(20) NOT NULL,
CALLED_NUM VARCHAR(20) NOT NULL,
PRIMARY KEY (ID, NUM)
)ENGINE NDB PARTITION BY key(NUM);
CREATE INDEX IDX_CALLED_NUM ON test(CALLED_NUM);
when use INDEX IDX_CALLED_NUM query record.
error msg: Function not implemented yet.
NDB support Support which indexs? Waiting for your reply thanks
Indexes. There are two different type of NDB indexes:
• Hash indexes are unique, but not ordered.
• B-tree indexes are ordered, but permit duplicate values.
Names of unique indexes and primary keys are handled as follows:
• For a MySQL UNIQUE index, both a B-tree and a hash index are created. The B-tree index uses the
MySQL name for the index; the name for the hash index is generated by appending '$unique' to the
index name.
• For a MySQL primary key only a B-tree index is created. This index is given the name PRIMARY.
There is no extra hash; however, the uniqueness of the primary key is guaranteed by making the
MySQL key the internal primary key of the NDB table.
test code:
const NdbDictionary::Index *myIndex= myDict->getIndex("IDX_CALLED_NUM","test");
if (myIndex == NULL)
APIERROR(myDict->getNdbError());
printf("status:%ld\n", myIndex->getObjectStatus());
// is ok
NdbTransaction *myTransaction= g_myNdb->startTransaction();
if (myTransaction == NULL) APIERROR(g_myNdb->getNdbError());
NdbIndexOperation *myIndexOperation=
myTransaction->getNdbIndexOperation(myIndex);
if (myIndexOperation == NULL) APIERROR(myTransaction->getNdbError());
// error msg: Function not implemented yet.
I create a table test index:
CREATE TABLE test(
ID VARCHAR(100) NOT NULL,
NUM VARCHAR(20) NOT NULL,
CALLED_NUM VARCHAR(20) NOT NULL,
PRIMARY KEY (ID, NUM)
)ENGINE NDB PARTITION BY key(NUM);
CREATE INDEX IDX_CALLED_NUM ON test(CALLED_NUM);
when use INDEX IDX_CALLED_NUM query record.
error msg: Function not implemented yet.
NDB support Support which indexs? Waiting for your reply thanks
Indexes. There are two different type of NDB indexes:
• Hash indexes are unique, but not ordered.
• B-tree indexes are ordered, but permit duplicate values.
Names of unique indexes and primary keys are handled as follows:
• For a MySQL UNIQUE index, both a B-tree and a hash index are created. The B-tree index uses the
MySQL name for the index; the name for the hash index is generated by appending '$unique' to the
index name.
• For a MySQL primary key only a B-tree index is created. This index is given the name PRIMARY.
There is no extra hash; however, the uniqueness of the primary key is guaranteed by making the
MySQL key the internal primary key of the NDB table.
test code:
const NdbDictionary::Index *myIndex= myDict->getIndex("IDX_CALLED_NUM","test");
if (myIndex == NULL)
APIERROR(myDict->getNdbError());
printf("status:%ld\n", myIndex->getObjectStatus());
// is ok
NdbTransaction *myTransaction= g_myNdb->startTransaction();
if (myTransaction == NULL) APIERROR(g_myNdb->getNdbError());
NdbIndexOperation *myIndexOperation=
myTransaction->getNdbIndexOperation(myIndex);
if (myIndexOperation == NULL) APIERROR(myTransaction->getNdbError());
// error msg: Function not implemented yet.