Changeset: 18addf879076 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=18addf879076 Removed Files: clients/examples/C/sample2.c clients/examples/C/sample3.c sql/test/mapi/Tests/sample2.SQL.bat sql/test/mapi/Tests/sample2.SQL.sh sql/test/mapi/Tests/sample2.stable.err sql/test/mapi/Tests/sample2.stable.out sql/test/mapi/Tests/sample3.SQL.bat sql/test/mapi/Tests/sample3.SQL.sh sql/test/mapi/Tests/sample3.stable.err sql/test/mapi/Tests/sample3.stable.out Modified Files: MonetDB.spec clients/ChangeLog clients/Tests/exports.stable.out clients/examples/C/Makefile.ag clients/mapilib/mapi.c clients/mapilib/mapi.h debian/monetdb-client-testing.install monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out monetdb5/mal/Tests/tst661.stable.out monetdb5/mal/Tests/tst903.stable.out monetdb5/mal/mal_listing.c monetdb5/modules/mal/Tests/call00.stable.out monetdb5/modules/mal/pcre.c monetdb5/optimizer/Tests/ARexample.stable.out monetdb5/optimizer/Tests/dataflow4.stable.out monetdb5/optimizer/Tests/dataflow5.stable.out monetdb5/optimizer/Tests/inlineFunction.stable.out monetdb5/optimizer/Tests/inlineFunction2.stable.out monetdb5/optimizer/Tests/inlineFunction4.stable.out monetdb5/optimizer/Tests/projectionchain.stable.out monetdb5/optimizer/Tests/reorder00.stable.out monetdb5/optimizer/Tests/tst4004.stable.out monetdb5/optimizer/Tests/tst4030.stable.out sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.out sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.out sql/backends/monet5/sql_upgrades.c sql/server/sql_scan.c sql/test/BugTracker-2009/Tests/POWER_vs_prod.SF-2596114.stable.out sql/test/BugTracker-2009/Tests/explain_gives_crash.SF-2741829.sql sql/test/BugTracker-2009/Tests/explain_gives_crash.SF-2741829.stable.out sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.stable.out sql/test/BugTracker-2010/Tests/group-by_ordered_column.Bug-2564.stable.out sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128 sql/test/BugTracker-2011/Tests/func_iter_vs_bulk.Bug-2826.stable.out sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.stable.out sql/test/BugTracker-2013/Tests/between.Bug-3259.stable.out.int128 sql/test/BugTracker-2014/Tests/manifold.Bug-3556.stable.out sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out.single sql/test/BugTracker-2015/Tests/useless_casts.Bug-3756.stable.out sql/test/BugTracker-2016/Tests/decimal_vs_integer.Bug-3941.stable.out sql/test/BugTracker-2016/Tests/storagemodel.stable.out.32bit sql/test/BugTracker-2016/Tests/storagemodel.stable.out.int128 sql/test/BugTracker/Tests/bug_in_selection.SF-1892413.stable.err sql/test/BugTracker/Tests/explain.SF-1739353.stable.out sql/test/BugTracker/Tests/groupby_orderby_nonselected.SF-1723863.stable.err sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out sql/test/BugTracker/Tests/subquery_orderby.SF-1688915.stable.err sql/test/Dependencies/Tests/Dependencies.stable.out sql/test/Dependencies/Tests/Dependencies.stable.out.int128 sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/mapi/Tests/All sql/test/mapi/Tests/sql_int128.stable.out sql/test/mergetables/Tests/mergequery.stable.out sql/test/mosaic/Tests/compression.stable.out sql/test/mosaic/Tests/compressionRLE.stable.out sql/test/mosaic/Tests/compressionRLE2.stable.out sql/test/mosaic/Tests/mix.stable.out sql/test/mosaic/Tests/session_exit.stable.out sql/test/mosaic/Tests/xqueries.stable.out sql/test/mosaic/Tests/xqueries_delta.stable.out sql/test/mosaic/Tests/xqueries_rle.stable.out sql/test/pg_regress/Tests/comments.stable.err sql/test/pg_regress/Tests/comments.stable.out sql/test/remote/Tests/partition_elim.stable.out sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 Branch: mosaic Log Message:
Merge with default diffs (truncated from 6556 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -384,8 +384,6 @@ developer. %{_bindir}/odbcsample1 %{_bindir}/sample0 %{_bindir}/sample1 -%{_bindir}/sample2 -%{_bindir}/sample3 %{_bindir}/sample4 %{_bindir}/smack00 %{_bindir}/smack01 diff --git a/clients/ChangeLog b/clients/ChangeLog --- a/clients/ChangeLog +++ b/clients/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog file for clients # This file is updated with Maddlog +* Wed Nov 16 2016 Sjoerd Mullender <sjo...@acm.org> +- Removed the "array" and "quick" functions from the mapi library. + To be precise, the removed functions are: mapi_execute_array, + mapi_fetch_field_array, mapi_prepare_array, mapi_query_array, + mapi_quick_query, mapi_quick_query_array, and mapi_quick_response. + * Sun Oct 30 2016 Martin Kersten <m...@cwi.nl> - Added a more elaborate \help command for SQL expressions. diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -520,13 +520,11 @@ MapiMsg mapi_disconnect(Mapi mid); MapiMsg mapi_error(Mapi mid); char *mapi_error_str(Mapi mid); MapiMsg mapi_execute(MapiHdl hdl); -MapiMsg mapi_execute_array(MapiHdl hdl, char **val); MapiMsg mapi_explain(Mapi mid, FILE *fd); MapiMsg mapi_explain_query(MapiHdl hdl, FILE *fd); MapiMsg mapi_explain_result(MapiHdl hdl, FILE *fd); mapi_int64 mapi_fetch_all_rows(MapiHdl hdl); char *mapi_fetch_field(MapiHdl hdl, int fnr); -char **mapi_fetch_field_array(MapiHdl hdl); size_t mapi_fetch_field_len(MapiHdl hdl, int fnr); char *mapi_fetch_line(MapiHdl hdl); MapiMsg mapi_fetch_reset(MapiHdl hdl); @@ -572,17 +570,12 @@ MapiMsg mapi_param_string(MapiHdl hdl, i MapiMsg mapi_param_type(MapiHdl hdl, int fnr, int ctype, int sqltype, void *ptr); MapiMsg mapi_ping(Mapi mid); MapiHdl mapi_prepare(Mapi mid, const char *cmd); -MapiHdl mapi_prepare_array(Mapi mid, const char *cmd, char **val); MapiMsg mapi_prepare_handle(MapiHdl hdl, const char *cmd); MapiHdl mapi_query(Mapi mid, const char *cmd); -MapiHdl mapi_query_array(Mapi mid, const char *cmd, char **val); MapiMsg mapi_query_done(MapiHdl hdl); MapiMsg mapi_query_handle(MapiHdl hdl, const char *cmd); MapiMsg mapi_query_part(MapiHdl hdl, const char *cmd, size_t size); MapiHdl mapi_query_prep(Mapi mid); -MapiHdl mapi_quick_query(Mapi mid, const char *cmd, FILE *fd); -MapiHdl mapi_quick_query_array(Mapi mid, const char *cmd, char **val, FILE *fd); -MapiMsg mapi_quick_response(MapiHdl hdl, FILE *fd); char *mapi_quote(const char *msg, int size); MapiMsg mapi_read_response(MapiHdl hdl); MapiMsg mapi_reconnect(Mapi mid); @@ -1710,12 +1703,10 @@ int OPTvolcanoImplementation(Client cntx str OPTwrapper(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p); str PCREilike2(bit *ret, const str *s, const str *pat); str PCREilike3(bit *ret, const str *s, const str *pat, const str *esc); -str PCREilike_join_pcre(bat *l, bat *r, const bat *b, const bat *pat, const str *esc); str PCREimatch(bit *ret, const str *val, const str *pat); str PCREindex(int *ret, const pcre *pat, const str *val); str PCRElike2(bit *ret, const str *s, const str *pat); str PCRElike3(bit *ret, const str *s, const str *pat, const str *esc); -str PCRElike_join_pcre(bat *l, bat *r, const bat *b, const bat *pat, const str *esc); str PCRElikesubselect1(bat *ret, const bat *bid, const bat *cid, const str *pat, const str *esc, const bit *anti); str PCRElikesubselect2(bat *ret, const bat *bid, const bat *sid, const str *pat, const str *esc, const bit *caseignore, const bit *anti); str PCRElikesubselect3(bat *ret, const bat *bid, const bat *sid, const str *pat, const str *esc, const bit *anti); @@ -2454,7 +2445,6 @@ str partitionRef; str passRef; str pcreRef; str pcre_init(void *ret); -var_t pcre_put(Heap *h, var_t *bun, pcre *val); str pinRef; str plusRef; str postludeRef; diff --git a/clients/examples/C/Makefile.ag b/clients/examples/C/Makefile.ag --- a/clients/examples/C/Makefile.ag +++ b/clients/examples/C/Makefile.ag @@ -12,7 +12,7 @@ MAPI_LIBS = $(SOCKET_LIBS) BINS = { CONDINST = HAVE_TESTING DIR = bindir - SOURCES = sample0.c sample1.c sample2.c sample3.c sample4.c \ + SOURCES = sample0.c sample1.c sample4.c \ smack00.c smack01.c LIBS = $(MAPI_LIBS) ../../mapilib/libmapi \ $(curl_LIBS) diff --git a/clients/examples/C/sample2.c b/clients/examples/C/sample2.c deleted file mode 100644 --- a/clients/examples/C/sample2.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. - */ - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <mapi.h> - -#define die(dbh,hdl) do { \ - if (hdl) \ - mapi_explain_result(hdl,stderr); \ - else if (dbh) \ - mapi_explain(dbh,stderr); \ - else \ - fprintf(stderr,"command failed\n"); \ - exit(-1); \ - } while (0) - -int -main(int argc, char **argv) -{ - /* a parameter binding test */ - char *nme = 0; - int age = 0; - char *parm[] = { "peter", 0 }; - char *parm2[] = { "25", 0 }; - char *parm3[] = { "peter", "25", 0 }; - Mapi dbh= NULL; - MapiHdl hdl = NULL; - - if (argc != 4) { - printf("usage:%s <host> <port> <language>\n", argv[0]); - exit(-1); - } - - dbh = mapi_connect(argv[1], atoi(argv[2]), "monetdb", "monetdb", argv[3], NULL); - if (dbh == NULL || mapi_error(dbh)) - die(dbh, hdl); - - /* mapi_trace(dbh,1); */ - if (strcmp(argv[3], "sql") == 0) { - /* switch of autocommit */ - if (mapi_setAutocommit(dbh, 0) != MOK || mapi_error(dbh)) - die(dbh,NULL); - if ((hdl = mapi_query(dbh, "create table emp(name varchar(20), age int)")) == NULL || mapi_error(dbh)) - die(dbh, hdl); - if (mapi_close_handle(hdl) != MOK) - die(dbh, hdl); - if ((hdl = mapi_query_array(dbh, "insert into emp values('?', ?)", parm3)) == NULL || mapi_error(dbh)) - die(dbh, hdl); - if (mapi_close_handle(hdl) != MOK) - die(dbh, hdl); - if ((hdl = mapi_query(dbh, "select * from emp")) == NULL || mapi_error(dbh)) - die(dbh, hdl); - if (mapi_bind(hdl, 0, &nme)) - die(dbh, hdl); - if (mapi_bind_var(hdl, 1, MAPI_INT, &age)) - die(dbh, hdl); - while (mapi_fetch_row(hdl)) { - printf("%s is %d\n", nme, age); - } - } else if (strcmp(argv[3], "mal") == 0) { - if ((hdl = mapi_query(dbh, "emp := bat.new(:oid,:str);")) == NULL || mapi_error(dbh)) - die(dbh, hdl); - if ((hdl = mapi_query(dbh, "age := bat.new(:oid,:int);")) == NULL || mapi_error(dbh)) - die(dbh, hdl); - if (mapi_close_handle(hdl) != MOK) - die(dbh, hdl); - if ((hdl = mapi_query_array(dbh, "bat.append(emp,\"?\");", parm)) == NULL || mapi_error(dbh)) - die(dbh, hdl); - if ((hdl = mapi_query_array(dbh, "bat.append(age,?);", parm2)) == NULL || mapi_error(dbh)) - die(dbh, hdl); - if (mapi_close_handle(hdl) != MOK) - die(dbh, hdl); - if ((hdl = mapi_query(dbh, "io.print(emp,age);")) == NULL || mapi_error(dbh)) - die(dbh, hdl); - if (mapi_bind(hdl, 1, &nme)) - die(dbh, hdl); - if (mapi_bind_var(hdl, 2, MAPI_INT, &age)) - die(dbh, hdl); - while (mapi_fetch_row(hdl)) { - printf("%s is %d\n", nme, age); - } - } else { - fprintf(stderr, "%s: unknown language, only mal and sql supported\n", argv[0]); - exit(1); - } - - if (mapi_error(dbh)) - die(dbh, hdl); - if (mapi_close_handle(hdl) != MOK) - die(dbh, hdl); - mapi_destroy(dbh); - - return 0; -} diff --git a/clients/examples/C/sample3.c b/clients/examples/C/sample3.c deleted file mode 100644 --- a/clients/examples/C/sample3.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. - */ - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <mapi.h> -#ifdef _MSC_VER -#define LLFMT "%I64d" -#else -#define LLFMT "%lld" -#endif - -#define die(dbh,hdl) do { \ - if (hdl) \ - mapi_explain_result(hdl,stderr); \ - else if (dbh) \ - mapi_explain(dbh,stderr); \ - else \ - fprintf(stderr,"command failed\n"); \ - exit(-1); \ - } while (0) - -int -main(int argc, char **argv) -{ - Mapi dbh; - MapiHdl hdl = NULL; - mapi_int64 rows, i; - char *parm[] = { "peter", 0 }; - char *parm2[] = { "25", 0 }; - int j; - - if (argc != 4) { - printf("usage:%s <host> <port> <language>\n", argv[0]); - exit(-1); - } - - dbh = mapi_connect(argv[1], atoi(argv[2]), "monetdb", "monetdb", argv[3], NULL); - if (dbh == NULL || mapi_error(dbh)) - die(dbh, hdl); - - /* mapi_trace(dbh, 1); */ - if (strcmp(argv[3], "sql") == 0) { - /* switch of autocommit */ - if (mapi_setAutocommit(dbh, 0) != MOK || mapi_error(dbh)) - die(dbh,NULL); - if ((hdl = mapi_query(dbh, "create table emp(name varchar(20), age int)")) == NULL || mapi_error(dbh)) - die(dbh, hdl); - if (mapi_close_handle(hdl) != MOK) - die(dbh, hdl); - if ((hdl = mapi_query(dbh, "insert into emp values('John', 23)")) == NULL || mapi_error(dbh)) - die(dbh, hdl); - if (mapi_close_handle(hdl) != MOK) - die(dbh, hdl); - if ((hdl = mapi_query(dbh, "insert into emp values('Mary', 22)")) == NULL || mapi_error(dbh)) - die(dbh, hdl); - if (mapi_close_handle(hdl) != MOK) - die(dbh, hdl); - if ((hdl = mapi_query(dbh, "select * from emp")) == NULL || mapi_error(dbh)) - die(dbh, hdl); - } else if (strcmp(argv[3], "mal") == 0) { - if ((hdl = mapi_query(dbh, "emp := bat.new(:oid,:str);")) == NULL || mapi_error(dbh)) - die(dbh, hdl); - if ((hdl = mapi_query(dbh, "age := bat.new(:oid,:int);")) == NULL || mapi_error(dbh)) - die(dbh, hdl); - if (mapi_close_handle(hdl) != MOK) - die(dbh, hdl); - if ((hdl = mapi_query_array(dbh, "bat.append(emp,\"?\");", parm)) == NULL || mapi_error(dbh)) - die(dbh, hdl); - if ((hdl = mapi_query_array(dbh, "bat.append(age,?);", parm2)) == NULL || mapi_error(dbh)) - die(dbh, hdl); - if (mapi_close_handle(hdl) != MOK) - die(dbh, hdl); - if ((hdl = mapi_query(dbh, "io.print(emp,age);")) == NULL || mapi_error(dbh)) - die(dbh, hdl); - } else { - fprintf(stderr, "%s: unknown language, only mal and sql supported\n", argv[0]); - exit(1); - } - - /* Retrieve all tuples in the client cache first */ - rows = mapi_fetch_all_rows(hdl); - if (mapi_error(dbh)) - die(dbh, hdl); - printf("rows received " LLFMT " with %d fields\n", rows, mapi_get_field_count(hdl)); - - /* Interpret the cache as a two-dimensional array */ _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list