Changeset: a51ba923eb39 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a51ba923eb39 Added Files: clients/mapiclient/dotmonetdb.c clients/mapiclient/dotmonetdb.h Modified Files: .hgtags MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/Tests/exports.stable.out clients/mapiclient/Makefile.ag clients/mapiclient/dump.c clients/mapiclient/mclient.1 clients/mapiclient/mclient.c clients/mapiclient/msqldump.c clients/mapiclient/stethoscope.c clients/mapiclient/tomograph.c clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc clients/python/setup.py clients/python3/setup.py common/options/monet_options.c common/utils/msabaoth.c common/utils/msabaoth.h configure.ag debian/changelog debian/control gdk/gdk.h gdk/gdk_logger.c gdk/gdk_logger.h gdk/gdk_mapreduce.c gdk/gdk_mapreduce.h gdk/gdk_utils.c gdk/libbat.rc libversions monetdb5/ChangeLog monetdb5/NT/M5server.bat monetdb5/extras/jaql/Tests/transform00.stable.out monetdb5/extras/jaql/jaql.c monetdb5/extras/jaql/jaql.h monetdb5/extras/jaql/jaql.mal monetdb5/extras/jaql/jaqlfunc.mal monetdb5/extras/jaql/jaqlgencode.c monetdb5/extras/jaql/jaqlscenario.c monetdb5/extras/jaql/jaqltests/Tests/calculations.jaql monetdb5/extras/jaql/jaqltests/Tests/calculations.stable.out monetdb5/extras/jaql/jaqltree.h monetdb5/extras/jaql/parser/jaql.l monetdb5/extras/jaql/parser/jaql.y monetdb5/mal/Tests/tst605.stable.out monetdb5/mal/mal_box.c monetdb5/mal/mal_instruction.c monetdb5/mal/mal_profiler.c monetdb5/mal/mal_sabaoth.c monetdb5/mal/mal_sabaoth.h monetdb5/mal/mal_session.c monetdb5/modules/kernel/alarm.c monetdb5/modules/kernel/logger.c monetdb5/modules/kernel/logger.mal monetdb5/modules/mal/Tests/remote99.mal monetdb5/modules/mal/Tests/remote99.stable.out monetdb5/modules/mal/bbp.mal monetdb5/modules/mal/const.c monetdb5/modules/mal/joinpath.c monetdb5/modules/mal/mal_io.mal monetdb5/modules/mal/trader.c monetdb5/optimizer/opt_joinpath.c monetdb5/optimizer/opt_pipes.c monetdb5/optimizer/opt_prelude.c monetdb5/optimizer/opt_prelude.h monetdb5/optimizer/optimizer.mal monetdb5/tests/BugsViaSourgeforce/Tests/ID.905495s monetdb5/tests/BugsViaSourgeforce/Tests/ID.905495s.bat monetdb5/tools/Tests/mserver5--help.stable.err monetdb5/tools/libmonetdb5.rc sql/backends/monet5/embeddedclient.h sql/backends/monet5/prog.c sql/backends/monet5/sql_optimizer.c sql/backends/monet5/sql_scenario.c sql/backends/monet5/vaults/vault.c sql/jdbc/tests/Tests/All sql/server/sql_mvc.c sql/server/sql_mvc.h sql/storage/bat/bat_logger.c sql/storage/restrict/restrict_logger.c sql/storage/sql_storage.h sql/storage/store.c sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.err sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.out sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090.stable.out sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.out sql/test/Tests/systemfunctions.stable.out sql/test/Tests/systemfunctions_nogeom.stable.out sql/test/leaks/Tests/check0.stable.out sql/test/leaks/Tests/check0_nogeom.stable.out sql/test/leaks/Tests/check1.stable.out sql/test/leaks/Tests/check1_nogeom.stable.out sql/test/leaks/Tests/check2.stable.out sql/test/leaks/Tests/check2_nogeom.stable.out sql/test/leaks/Tests/check3.stable.out sql/test/leaks/Tests/check3_nogeom.stable.out sql/test/leaks/Tests/check4.stable.out sql/test/leaks/Tests/check4_nogeom.stable.out sql/test/leaks/Tests/check5.stable.out sql/test/leaks/Tests/check5_nogeom.stable.out sql/test/mapi/Tests/php_monetdb.stable.out sql/test/mapi/Tests/php_monetdb_nogeom.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out testing/Mtest.py.in testing/process.py tools/merovingian/ChangeLog tools/merovingian/client/monetdb.1 tools/merovingian/client/monetdb.c tools/merovingian/daemon/forkmserver.c tools/merovingian/daemon/merovingian.c tools/mserver/mserver5.1 tools/mserver/mserver5.c vertoo.data Branch: rdf Log Message:
Merge with default branch diffs (truncated from 4864 to 300 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -506,4 +506,9 @@ d762ae2e83bd42a48aebf0ebb051a643f77f77d7 6f4501510506b9f074351d5b592a2a745b296571 Oct2012_3 4233be3c7f49f704e5ed466d2c1836c9dcfbb9f7 Oct2012_release 3c157ea4be5369d5718c7d578f10c0b934fbf2e6 Oct2012_release +<<<<<<< /export/scratch2/duc/work/MonetRDF/MonetDB-hg/.hgtags 525f227382ddb8f5377114d11c3b030865493f42 RDF_Module_with_Raptor2 +======= +55c1892e82a764a7a6003dded13a6228de3d1661 Oct2012_5 +5ba19bc11f7691610501c95ba8d0f1d9e5083a94 Oct2012_SP1_release +>>>>>>> /tmp/.hgtags~other.n2Hc7T diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -27,7 +27,7 @@ Vendor: MonetDB BV <i...@monetdb.org> Group: Applications/Databases License: MPL - http://www.monetdb.org/Legal/MonetDBLicense URL: http://www.monetdb.org/ -Source: http://dev.monetdb.org/downloads/sources/Oct2012/%{name}-%{version}.tar.bz2 +Source: http://dev.monetdb.org/downloads/sources/Oct2012-SP1/%{name}-%{version}.tar.bz2 BuildRequires: bison BuildRequires: bzip2-devel @@ -695,6 +695,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libmonet rm -fr $RPM_BUILD_ROOT %changelog +* Fri Nov 16 2012 Sjoerd Mullender <sjo...@acm.org> - 11.13.5-20121116 +- Rebuilt. + * Tue Oct 16 2012 Fabian Groffen <fab...@monetdb.org> - 11.13.3-20121016 - Rebuilt. 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 @@ -415,7 +415,7 @@ int log_tstart(logger *lg); log_bid logger_add_bat(logger *lg, BAT *b, char *name); size_t logger_changes(logger *lg); int logger_cleanup(logger *lg); -logger *logger_create(int debug, char *fn, char *logdir, char *dbname, int version, preversionfix_fptr prefuncp, postversionfix_fptr postfuncp); +logger *logger_create(int debug, char *fn, char *logdir, int version, preversionfix_fptr prefuncp, postversionfix_fptr postfuncp); void logger_del_bat(logger *lg, log_bid bid); void logger_destroy(logger *lg); int logger_exit(logger *lg); @@ -429,6 +429,8 @@ char *mo_find_option(opt *set, int setle void mo_free_options(opt *set, int setlen); void mo_print_options(opt *set, int setlen); int mo_system_config(opt **Set, int setlen); +void msab_dbfarminit(const char *dbfarm); +void msab_dbpathinit(const char *dbpath); char *msab_deserialise(sabdb **ret, char *sabdb); char *msab_freeStatus(sabdb **ret); char *msab_getDBfarm(char **ret); @@ -436,7 +438,6 @@ char *msab_getDBname(char **ret); char *msab_getMyStatus(sabdb **ret); char *msab_getStatus(sabdb **ret, char *dbname); char *msab_getUplogInfo(sabuplog *ret, const sabdb *db); -void msab_init(char *dbfarm, char *dbname); char *msab_marchConnection(const char *host, const int port); char *msab_marchScenario(const char *lang); char *msab_registerStarted(void); @@ -2146,7 +2147,6 @@ str SABAOTHgetLocalConnection(str *ret); str SABAOTHgetMyStatus(sabdb **ret); str SABAOTHgetStatus(sabdb **ret, str dbname); str SABAOTHgetUplogInfo(sabuplog *ret, sabdb *db); -void SABAOTHinit(str dbfarm, str dbname); str SABAOTHmarchConnection(int *ret, str *host, int *port); str SABAOTHmarchScenario(int *ret, str *lang); str SABAOTHretreatScenario(int *ret, str *lang); @@ -2790,7 +2790,7 @@ int log_tstart_wrap(logger *L); int logger_add_bat_wrap(int *bid, logger *L, BAT *b, str nme); int logger_changes_wrap(int *r, logger *L); int logger_cleanup_wrap(logger *L); -str logger_create_wrap(logger *L, int *debug, str *fn, str *dirname, str *dbname, int *version); +str logger_create_wrap(logger *L, int *debug, str *fn, str *dirname, int *version); int logger_del_bat_wrap(logger *L, int *bid); str logger_destroy_wrap(logger *L); int logger_exit_wrap(logger *L); diff --git a/clients/mapiclient/Makefile.ag b/clients/mapiclient/Makefile.ag --- a/clients/mapiclient/Makefile.ag +++ b/clients/mapiclient/Makefile.ag @@ -20,7 +20,7 @@ INCLUDES = ../mapilib ../../common/optio lib_mcutil = { NOINST - SOURCES = dump.c prompt.c + SOURCES = dump.c prompt.c dotmonetdb.c } bin_mclient = { @@ -61,6 +61,6 @@ bin_mnc = { man_MANS = mclient.1 msqldump.1 -EXTRA_DIST = msqldump.h mprompt.h $(man_MANS) +EXTRA_DIST = msqldump.h mprompt.h dotmonetdb.h $(man_MANS) EXTRA_DIST_DIR = Tests diff --git a/clients/mapiclient/dotmonetdb.c b/clients/mapiclient/dotmonetdb.c new file mode 100644 --- /dev/null +++ b/clients/mapiclient/dotmonetdb.c @@ -0,0 +1,143 @@ +/* + * The contents of this file are subject to the MonetDB Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.monetdb.org/Legal/MonetDBLicense + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is the MonetDB Database System. + * + * The Initial Developer of the Original Code is CWI. + * Portions created by CWI are Copyright (C) 1997-July 2008 CWI. + * Copyright August 2008-2012 MonetDB B.V. + * All Rights Reserved. + */ + +#include "monetdb_config.h" +#include "dotmonetdb.h" +#include <stdio.h> +#ifdef HAVE_STRING_H +#include <string.h> +#endif +#ifdef HAVE_STRINGS_H +#include <strings.h> +#endif + +void +parse_dotmonetdb(char **user, char **passwd, char **language, int *save_history, char **output, int *pagewidth) +{ + char *cfile; + FILE *config = NULL; + char buf[1024]; + + if ((cfile = getenv("DOTMONETDBFILE")) == NULL) { + /* no environment variable: use a default */ + if ((config = fopen(".monetdb", "r")) == NULL) { + if ((cfile = getenv("HOME")) != NULL) { + snprintf(buf, sizeof(buf), "%s%c.monetdb", cfile, DIR_SEP); + config = fopen(buf, "r"); + if (config) + cfile = strdup(buf); + else + cfile = NULL; + } + } else { + cfile = strdup(".monetdb"); + } + } else if (*cfile == 0) { + /* empty environment variable: skip the file */ + cfile = NULL; + } else if ((config = fopen(cfile, "r")) == NULL) { + cfile = NULL; + fprintf(stderr, "failed to open file '%s': %s\n", + cfile, strerror(errno)); + } else { + cfile = strdup(cfile); + } + + if (user) + *user = NULL; + if (passwd) + *passwd = NULL; + if (language) + *language = NULL; + if (output) + *output = NULL; + if (save_history) + *save_history = 0; + if (pagewidth) + *pagewidth = -1; + + if (config) { + int line = 0; + char *q; + while (fgets(buf, sizeof(buf), config) != NULL) { + line++; + q = strchr(buf, '\n'); + if (q) + *q = 0; + if (buf[0] == '\0' || buf[0] == '#') + continue; + if ((q = strchr(buf, '=')) == NULL) { + fprintf(stderr, "%s:%d: syntax error: %s\n", + cfile, line, buf); + continue; + } + *q++ = '\0'; + /* this basically sucks big time, as I can't easily set + * a default, hence I only do things I think are useful + * for now, needs a better solution */ + if (strcmp(buf, "user") == 0) { + if (user) + *user = strdup(q); + q = NULL; + } else if (strcmp(buf, "password") == 0 || strcmp(buf, "passwd") == 0) { + if (passwd) + *passwd = strdup(q); + q = NULL; + } else if (strcmp(buf, "language") == 0) { + /* make sure we don't set garbage */ + if (strcmp(q, "sql") != 0 && + strcmp(q, "mal") != 0 && + strcmp(q, "jaql") != 0) { + fprintf(stderr, "%s:%d: unsupported " + "language: %s\n", + cfile, line, q); + } else if (language) + *language = strdup(q); + q = NULL; + } else if (strcmp(buf, "save_history") == 0) { + if (strcmp(q, "true") == 0 || + strcmp(q, "on") == 0) { + if (save_history) + *save_history = 1; + q = NULL; + } else if (strcmp(q, "false") == 0 || + strcmp(q, "off") == 0) { + if (save_history) + *save_history = 0; + q = NULL; + } + } else if (strcmp(buf, "format") == 0) { + if (output) + *output = strdup(q); + q = NULL; + } else if (strcmp(buf, "width") == 0) { + if (pagewidth) + *pagewidth = atoi(q); + q = NULL; + } + if (q != NULL) + fprintf(stderr, "%s:%d: unknown property: %s\n", + cfile, line, buf); + } + } + if (cfile) + free(cfile); + if (config) + fclose(config); +} diff --git a/clients/mapiclient/dotmonetdb.h b/clients/mapiclient/dotmonetdb.h new file mode 100644 --- /dev/null +++ b/clients/mapiclient/dotmonetdb.h @@ -0,0 +1,21 @@ +/* + * The contents of this file are subject to the MonetDB Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.monetdb.org/Legal/MonetDBLicense + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is the MonetDB Database System. + * + * The Initial Developer of the Original Code is CWI. + * Portions created by CWI are Copyright (C) 1997-July 2008 CWI. + * Copyright August 2008-2012 MonetDB B.V. + * All Rights Reserved. + */ + +extern void parse_dotmonetdb(char **user, char **passwd, char **language, + int *save_history, char **output, int *pagewidth); diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c --- a/clients/mapiclient/dump.c +++ b/clients/mapiclient/dump.c @@ -1934,9 +1934,9 @@ dump_version(Mapi mid, stream *toConsole "SELECT \"name\", \"value\" " "FROM sys.env() AS env " "WHERE \"name\" IN ('gdk_dbname', " - "'monet_version', " - "'monet_release', " - "'merovingian_uri')")) == NULL || + "'monet_version', " + "'monet_release', " + "'merovingian_uri')")) == NULL || mapi_error(mid)) goto cleanup; diff --git a/clients/mapiclient/mclient.1 b/clients/mapiclient/mclient.1 --- a/clients/mapiclient/mclient.1 +++ b/clients/mapiclient/mclient.1 @@ -1,4 +1,4 @@ -.TH MCLIENT 1 "APRIL 2011" MonetDB "MonetDB Applications" +.TH MCLIENT 1 "NOVEMBER 2012" MonetDB "MonetDB Applications" .SH NAME mclient \- the MonetDB command-line tool .SH SYNOPSIS _______________________________________________ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list