1 /*
2 Copyright (c) 2012, 2021, Oracle and/or its affiliates.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is also distributed with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have included with MySQL.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 */
24
25 #include "../include/ndbapi/NdbApi.hpp"
26 #include "ndbapi/NdbInfo.hpp"
27 #include "../include/util/ndb_opts.h"
28 #include "../include/util/random.h"
29 #include "../include/util/ndb_rand.h"
30 #include "../include/portlib/NdbDir.hpp"
31 #include "../include/util/Bitmask.hpp"
32
33 #include <stdio.h>
34
main(int argc,const char **)35 int main(int argc, const char**)
36 {
37 if (argc < 0)
38 {
39 /*
40 NOTE! This code should not run, it's sole purpose is
41 to check that the public functions of the NdbApi etc. can be
42 found in the ndbclient libraries
43 */
44 (void)ndb_init();
45 Ndb_cluster_connection cluster_con;
46 Ndb ndb(&cluster_con);
47 NdbDictionary::Table tab("");
48 NdbDictionary::Index idx("");
49 NdbTransaction* trans = ndb.startTransaction();
50 NdbOperation* op = trans->getNdbOperation(&tab);
51 NdbRecAttr* rec_attr = op->getValue("");
52 rec_attr->isNULL();
53 NdbScanOperation* sop = trans->getNdbScanOperation(&tab);
54 sop->readTuples();
55 NdbIndexScanOperation* isop = trans->getNdbIndexScanOperation(&idx);
56 isop->get_range_no();
57 NdbIndexOperation* iop = trans->getNdbIndexOperation(&idx);
58 iop->insertTuple();
59 NdbScanFilter scan_filter(op);
60 NdbIndexStat index_stat;
61 NdbInterpretedCode interpreted_code;
62 NdbEventOperation* eop = ndb.createEventOperation("");
63 eop->isConsistent();
64 NdbBlob* blob = op->getBlobHandle("");
65 blob->truncate();
66 NdbInfo info(&cluster_con, "");
67 ndb_std_print_version();
68 (void)myRandom48(0);
69 (void)ndb_rand_r(0);
70 (void)NdbDir::u_rwx();
71 (void)BitmaskImpl::getField(0, 0, 0, 64, 0);
72 ndb_end(0);
73 }
74 }
75