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

updated all examples to use mysql c-api create table

This commit is contained in:
tomas@poseidon.ndb.mysql.com
2005-01-04 13:36:53 +01:00
parent c1cfd9b446
commit abb926c3c9
7 changed files with 295 additions and 349 deletions

View File

@@ -141,8 +141,8 @@ static void create_table(MYSQL &mysql)
if (mysql_query(&mysql,
"CREATE TABLE"
" MYTABLENAME"
" (ATTR1 INT UNSIGNED PRIMARY KEY,"
" ATTR2 INT UNSIGNED)"
" (ATTR1 INT UNSIGNED NOT NULL PRIMARY KEY,"
" ATTR2 INT UNSIGNED NOT NULL)"
" ENGINE=NDB"))
MYSQLERROR(mysql);
}
@@ -234,7 +234,7 @@ static void do_read(Ndb &myNdb)
NdbOperation *myOperation= myTransaction->getNdbOperation("MYTABLENAME");
if (myOperation == NULL) APIERROR(myTransaction->getNdbError());
myOperation->readTuple();
myOperation->readTuple(NdbOperation::LM_Read);
myOperation->equal("ATTR1", i);
NdbRecAttr *myRecAttr= myOperation->getValue("ATTR2", NULL);