MonetDB: config_rss - Add some temporary diagnostics to figure o...
Changeset: edbff8128a66 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=edbff8128a66 Modified Files: sql/test/configurable_rss/Tests/rss.py Branch: config_rss Log Message: Add some temporary diagnostics to figure out source of failing tests. diffs (12 lines): diff --git a/sql/test/configurable_rss/Tests/rss.py b/sql/test/configurable_rss/Tests/rss.py --- a/sql/test/configurable_rss/Tests/rss.py +++ b/sql/test/configurable_rss/Tests/rss.py @@ -39,7 +39,7 @@ end; call loop_insert(100); -- it seems that it requires an analytical query to keep memory in ram. -select getrss() {compare_sign} {cap_in_kB} as resident_set_size_is_{compare_string}_then_{cap_in_kB}_kB, quantile(c/a, 0.8) * 0 from test; +select getrss() as resident_set_size, getrss() {compare_sign} {cap_in_kB} as resident_set_size_is_{compare_string}_then_{cap_in_kB}_kB, quantile(c/a, 0.8) * 0 from test; drop table test cascade; drop function getrss; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: remote_auth - Merge with default
Changeset: 8249da4cd9d1 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8249da4cd9d1 Added Files: sql/test/BugTracker-2018/Tests/multiple-insertinto-table-Bug-6578.stable.err sql/test/BugTracker-2018/Tests/multiple-insertinto-table-Bug-6578.stable.out sql/test/BugTracker-2018/Tests/sqlitelogictest-not-between-wrong.Bug-6569.stable.err sql/test/BugTracker-2018/Tests/sqlitelogictest-not-between-wrong.Bug-6569.stable.out Modified Files: gdk/gdk_batop.c gdk/gdk_select.c monetdb5/modules/kernel/Tests/select.malC monetdb5/modules/kernel/Tests/select.stable.out Branch: remote_auth Log Message: Merge with default diffs (truncated from 1736 to 300 lines): diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -531,9 +531,6 @@ BATappend(BAT *b, BAT *n, BAT *s, bit fo } } - if (BATcount(b) == 0) - BAThseqbase(b, s ? s->hseqbase : n->hseqbase); - if (b->tunique) { /* if b has the unique bit set, only insert values * from n that don't already occur in b, and make sure diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -28,7 +28,7 @@ A = (oid *) Tloc((B), 0); \ } \ A[(I)] = (V); \ - } while (0) + } while (false) BAT * virtualize(BAT *bn) @@ -38,13 +38,13 @@ virtualize(BAT *bn) (((bn->ttype == TYPE_void && !is_oid_nil(bn->tseqbase)) || bn->ttype == TYPE_oid) && bn->tkey && bn->tsorted)); - /* since bn has unique and strictly ascending tail values, we -* can easily check whether the tail is dense */ + /* since bn has unique and strictly ascending values, we can +* easily check whether the column is dense */ if (bn && bn->ttype == TYPE_oid && (BATcount(bn) <= 1 || * (const oid *) Tloc(bn, 0) + BATcount(bn) - 1 == * (const oid *) Tloc(bn, BUNlast(bn) - 1))) { - /* tail is dense, replace by virtual oid */ + /* column is dense, replace by virtual oid */ ALGODEBUG fprintf(stderr, "#virtualize(bn=%s#"BUNFMT",seq="OIDFMT")\n", BATgetId(bn), BATcount(bn), BATcount(bn) > 0 ? * (const oid *) Tloc(bn, 0) : 0); @@ -56,7 +56,7 @@ virtualize(BAT *bn) bn->theap.storage = bn->theap.newstorage = STORE_MEM; bn->theap.size = 0; bn->ttype = TYPE_void; - bn->tvarsized = 1; + bn->tvarsized = true; bn->twidth = 0; bn->tshift = 0; } @@ -85,11 +85,11 @@ doublerange(oid l1, oid h1, oid l2, oid *p++ = l1++; while (l2 < h2) *p++ = l2++; - bn->tkey = 1; - bn->tsorted = 1; + bn->tkey = true; + bn->tsorted = true; bn->trevsorted = BATcount(bn) <= 1; - bn->tnil = 0; - bn->tnonil = 1; + bn->tnil = false; + bn->tnonil = true; return bn; } @@ -119,11 +119,11 @@ doubleslice(BAT *b, BUN l1, BUN h1, BUN o = (const oid *) Tloc(b, l2); while (l2++ < h2) *p++ = *o++; - bn->tkey = 1; - bn->tsorted = 1; + bn->tkey = true; + bn->tsorted = true; bn->trevsorted = BATcount(bn) <= 1; - bn->tnil = 0; - bn->tnonil = 1; + bn->tnil = false; + bn->tnonil = true; return virtualize(bn); } @@ -221,7 +221,7 @@ BAT_hashselect(BAT *b, BAT *s, BAT *bn, } } BATsetcount(bn, cnt); - bn->tkey = 1; + bn->tkey = true; if (cnt > 1) { /* hash chains produce results in the order high to * low, so we just need to reverse */ @@ -231,7 +231,7 @@ BAT_hashselect(BAT *b, BAT *s, BAT *bn, dst[h] = o; } } - bn->tsorted = 1; + bn->tsorted = true; bn->trevsorted = bn->batCount <= 1; bn->tseqbase = bn->batCount == 0 ? 0 : bn->batCount == 1 ? *dst : oid_nil; return bn; @@ -240,37 +240,37 @@ BAT_hashselect(BAT *b, BAT *s, BAT *bn, /* Imprints select code */ /* inner check */ -#define impscheck(CAND,TEST,ADD) \ -do { \ - e = (BUN) (i+limit-pr_off+off); \ - if (im[icnt] & mask) { \ - if ((im[icnt] & ~innermask) == 0) { \ - while (p < q && o < e) {\ - v = src[o-off]; \ - ADD;\
MonetDB: remote_auth - Some todo items in comments
Changeset: 1a7503cfb2be for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1a7503cfb2be Modified Files: monetdb5/mal/mal_authorize.c monetdb5/modules/mal/remote.c Branch: remote_auth Log Message: Some todo items in comments Previous commits in this branch broke the sql/test/ifexists test. We need to fix it. diffs (44 lines): diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c --- a/monetdb5/mal/mal_authorize.c +++ b/monetdb5/mal/mal_authorize.c @@ -823,6 +823,8 @@ AUTHverifyPassword(const char *passwd) #endif } +/* change name to remote table uri, add client to check that the user + * has permissions */ str AUTHgetRemoteTableCredentials(const char *name, str *username, str *password) { @@ -844,6 +846,7 @@ AUTHgetRemoteTableCredentials(const char return MAL_SUCCEED; } +/* change name to remote table uri, add local user */ str AUTHaddRemoteTableCredentials(const char *name, const char *user, const char *pass, bool pw_encrypted) { diff --git a/monetdb5/modules/mal/remote.c b/monetdb5/modules/mal/remote.c --- a/monetdb5/modules/mal/remote.c +++ b/monetdb5/modules/mal/remote.c @@ -56,6 +56,8 @@ #include "monetdb_config.h" #include "remote.h" +#include "mal_authorize.h" + /* * Technically, these methods need to be serialised per connection, * hence a scheduler that interleaves e.g. multiple get calls, simply @@ -160,6 +162,11 @@ str RMTconnectScen( /* just make sure the return isn't garbage */ *ret = 0; + /* TODO: +* 1. remote user and password from arg list +* 2. use AUTHgetRemoteTableCredentials(uri, client) +*/ + if (ouri == NULL || *ouri == NULL || strcmp(*ouri, (str)str_nil) == 0) throw(ILLARG, "remote.connect", ILLEGAL_ARGUMENT ": database uri " "is NULL or nil"); ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: remote_auth - Add functions to manage remote table cred...
Changeset: bc29cc9d1c25 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bc29cc9d1c25 Modified Files: monetdb5/mal/mal_authorize.c monetdb5/mal/mal_authorize.h sql/server/rel_psm.c sql/server/rel_schema.c sql/server/rel_schema.h Branch: remote_auth Log Message: Add functions to manage remote table credentials in vault Added two temporary functions that add and read the credentials from the vault. For now the functions just record the username and hashed password in a fixed file in /tmp/. The AUTHaddRemoteTableCredentials is currently used when a remote table is created. diffs (195 lines): diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c --- a/monetdb5/mal/mal_authorize.c +++ b/monetdb5/mal/mal_authorize.c @@ -822,3 +822,55 @@ AUTHverifyPassword(const char *passwd) MONETDB5_PASSWDHASH); #endif } + +str +AUTHgetRemoteTableCredentials(const char *name, str *username, str *password) +{ + FILE *fp = fopen("/tmp/remote_table_auth.txt", "r"); + char buf[BUFSIZ]; + char *p, *q; + + (void)name; + fread(buf, 1, BUFSIZ, fp); + + p = strchr(buf, '\n'); + *p = '\0'; + *username = strdup(buf); + q = strchr(p + 1, '\n'); + *q = '\0'; + *password = strdup(p + 1); + + fclose(fp); + return MAL_SUCCEED; +} + +str +AUTHaddRemoteTableCredentials(const char *name, const char *user, const char *pass, bool pw_encrypted) +{ + /* Work in Progress */ + FILE *fp = fopen("/tmp/remote_table_auth.txt", "w"); + char *password = NULL; + bool free_pw = false; + + (void)name; + + if (pass == NULL) { + AUTHgetPasswordHash(, NULL, user); + } + else { + free_pw = true; + if (pw_encrypted) { + password = strdup(pass); + } + else { + password = mcrypt_BackendSum(pass, strlen(pass)); + } + } + fprintf(fp, "%s\n%s\n", user, password); + fclose(fp); + + if (free_pw) { + free(password); + } + return MAL_SUCCEED; +} diff --git a/monetdb5/mal/mal_authorize.h b/monetdb5/mal/mal_authorize.h --- a/monetdb5/mal/mal_authorize.h +++ b/monetdb5/mal/mal_authorize.h @@ -27,6 +27,9 @@ mal_export str AUTHgetPasswordHash(str * mal_export str AUTHinitTables(const char *passwd); +mal_export str AUTHaddRemoteTableCredentials(const char *name, const char *user, const char *pass, bool pw_encrypted); +mal_export str AUTHgetRemoteTableCredentials(const char *name, str *username, str *password); + /* * Authorisation is based on a password. The passwords are stored hashed diff --git a/sql/server/rel_psm.c b/sql/server/rel_psm.c --- a/sql/server/rel_psm.c +++ b/sql/server/rel_psm.c @@ -214,7 +214,7 @@ rel_psm_declare_table(mvc *sql, dnode *n assert(n->next->next->next->type == type_int); - rel = rel_create_table(sql, cur_schema(sql), SQL_DECLARED_TABLE, NULL, name, n->next->next->data.sym, n->next->next->next->data.i_val, NULL, NULL, NULL, 0); + rel = rel_create_table(sql, cur_schema(sql), SQL_DECLARED_TABLE, NULL, name, n->next->next->data.sym, n->next->next->next->data.i_val, NULL, NULL, NULL, false, 0); if (!rel || rel->op != op_ddl || rel->flag != DDL_CREATE_TABLE) return NULL; diff --git a/sql/server/rel_schema.c b/sql/server/rel_schema.c --- a/sql/server/rel_schema.c +++ b/sql/server/rel_schema.c @@ -18,6 +18,8 @@ #include "sql_parser.h" #include "sql_privileges.h" +#include "mal_authorize.h" + #define qname_index(qname) qname_table(qname) #define qname_func(qname) qname_table(qname) #define qname_type(qname) qname_table(qname) @@ -896,7 +898,7 @@ table_element(mvc *sql, symbol *s, sql_s } sql_rel * -rel_create_table(mvc *sql, sql_schema *ss, int temp, const char *sname, const char *name, symbol *table_elements_or_subquery, int commit_action, const char *loc, const char *username, const char *password, int if_not_exists) +rel_create_table(mvc *sql, sql_schema *ss, int temp, const char *sname, const char *name, symbol *table_elements_or_subquery, int commit_action, const char *loc, const char *username, const char *password, bool pw_encrypted, int if_not_exists) { sql_schema *s = NULL; @@ -909,15 +911,13 @@ rel_create_table(mvc *sql, sql_schema *s (temp == SQL_REPLICA_TABLE)?tt_replica_table:tt_table; (void)create; - (void)username; - (void)password; if (sname && !(s = mvc_bind_schema(sql, sname))) return sql_error(sql, 02, SQLSTATE(3F000) "CREATE TABLE: no such schema '%s'", sname); - if (temp != SQL_PERSIST && tt == tt_table && + if (temp != SQL_PERSIST && tt == tt_table && commit_action == CA_COMMIT) commit_action = CA_DELETE; -
MonetDB: remote_auth - Assume that if no password is given, it i...
Changeset: cb0aa1c0e0eb for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cb0aa1c0e0eb Modified Files: sql/server/sql_parser.y Branch: remote_auth Log Message: Assume that if no password is given, it is encrypted diffs (12 lines): diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y --- a/sql/server/sql_parser.y +++ b/sql/server/sql_parser.y @@ -1434,7 +1434,7 @@ with_opt_credentials: /* empty */ { $$ = append_string(L(), NULL); - append_int($$, SQL_PW_UNENCRYPTED); + append_int($$, SQL_PW_ENCRYPTED); append_string($$, NULL); } | WITH USER string opt_encrypted PASSWORD string ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: remote_auth - Move function from sql_semantic.c into re...
Changeset: 7e7ecea3db9d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7e7ecea3db9d Modified Files: sql/server/rel_schema.c sql/server/sql_semantic.c sql/server/sql_semantic.h Branch: remote_auth Log Message: Move function from sql_semantic.c into rel_schema.c diffs (108 lines): diff --git a/sql/server/rel_schema.c b/sql/server/rel_schema.c --- a/sql/server/rel_schema.c +++ b/sql/server/rel_schema.c @@ -2254,6 +2254,39 @@ rel_comment_on(sql_allocator *sa, sqlid return rel; } +static char * +credentials_username(dlist *credentials) +{ + if (credentials == NULL) { + return NULL; + } + assert(credentials->h); + + if (credentials->h->data.sval != NULL) { + return credentials->h->data.sval; + } + + // No username specified. + return NULL; +} + +static char * +credentials_password(dlist *credentials) +{ + if (credentials == NULL) { + return NULL; + } + assert(credentials->h); + + char *password = credentials->h->next->next->data.sval;; + if (password != NULL && credentials->h->next->data.i_val == SQL_PW_UNENCRYPTED) { + password = mcrypt_BackendSum(password, strlen(password)); + } + + return password; +} + + sql_rel * rel_schemas(mvc *sql, symbol *s) { @@ -2298,7 +2331,7 @@ rel_schemas(mvc *sql, symbol *s) username = stack_get_string(sql, "current_user"); } if (password == NULL) { - // No username specified, get the current user's password from the vault. + // No password specified, get the current user's password from the vault. // TODO password = NULL; } diff --git a/sql/server/sql_semantic.c b/sql/server/sql_semantic.c --- a/sql/server/sql_semantic.c +++ b/sql/server/sql_semantic.c @@ -194,40 +194,6 @@ qname_catalog(dlist *qname) return NULL; } -char * -credentials_username(dlist *credentials) -{ - if (credentials == NULL) { - return NULL; - } - assert(credentials->h); - - if (credentials->h->data.sval != NULL) { - return credentials->h->data.sval; - } - - // No username specified. - return NULL; -} - -char * -credentials_password(dlist *credentials) { - if (credentials == NULL) { - return NULL; - } - assert(credentials->h); - - if (credentials->h->next->data.i_val == SQL_PW_ENCRYPTED) { - return credentials->h->next->next->data.sval; - } - else if (credentials->h->next->next->data.sval != NULL) { - // We have an unencrypted password. Encrypt and return - // TODO - return NULL; - } - - return NULL; -} int set_type_param(mvc *sql, sql_subtype *type, int nr) diff --git a/sql/server/sql_semantic.h b/sql/server/sql_semantic.h --- a/sql/server/sql_semantic.h +++ b/sql/server/sql_semantic.h @@ -24,8 +24,6 @@ extern sql_schema *tmp_schema(mvc *sql); extern char *qname_schema(dlist *qname); extern char *qname_table(dlist *qname); extern char *qname_catalog(dlist *qname); -extern char *credentials_username(dlist *credentials); -extern char *credentials_password(dlist *credentials); #define qname_module(qname) qname_schema(qname) #define qname_fname(qname) qname_table(qname) ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: remote_auth - Merge branch 'master' into branches/remot...
Changeset: cbf07f4ecaba for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cbf07f4ecaba Added Files: sql/test/BugTracker-2018/Tests/create-temp-table-ordered-index-error.Bug-6574.sql sql/test/BugTracker-2018/Tests/create-temp-table-ordered-index-error.Bug-6574.stable.err sql/test/BugTracker-2018/Tests/create-temp-table-ordered-index-error.Bug-6574.stable.out sql/test/BugTracker-2018/Tests/multiple-insertinto-table-Bug-6578.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.stable.err sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.stable.out sql/test/BugTracker-2018/Tests/sqlitelogictest-missing-bulk-implementation.Bug-6575.stable.err sql/test/BugTracker-2018/Tests/sqlitelogictest-missing-bulk-implementation.Bug-6575.stable.out sql/test/BugTracker-2018/Tests/sqlitelogictest-select-nullif-case.Bug-6579.sql Modified Files: NT/rules.msc clients/mapiclient/dump.c sql/backends/monet5/rel_bin.c sql/server/rel_optimizer.c sql/server/sql_mvc.c sql/server/sql_mvc.h sql/test/BugTracker-2017/Tests/type-resolution-error.Bugs-6313.stable.err sql/test/BugTracker-2018/Tests/All sql/test/Tests/comment-on.sql sql/test/Tests/comment-on.stable.err sql/test/Tests/comment-on.stable.out Branch: remote_auth Log Message: Merge branch 'master' into branches/remote_auth diffs (truncated from 1037 to 300 lines): diff --git a/NT/rules.msc b/NT/rules.msc --- a/NT/rules.msc +++ b/NT/rules.msc @@ -39,12 +39,6 @@ BITSMCHN=X64 !ENDIF !IFDEF DEBUG -DEBUGLIB=d -!ELSE -DEBUGLIB= -!ENDIF - -!IFDEF DEBUG # force W_CFLAGS off in debug builds: using icc, you get way more # warnings about casts which results in the code being uncompilable W_CFLAGS = @@ -98,7 +92,7 @@ PYTHON_LIBDIR=$(PYTHON3_LIBDIR) !IFNDEF LIBPCRE LIBPCRE = C:\Program Files\PCRE !ENDIF -pcre_LIBS = "$(LIBPCRE)\lib\pcre$(DEBUGLIB).lib" +pcre_LIBS = "$(LIBPCRE)\lib\pcre.lib" pcre_CFLAGS = -DHAVE_LIBPCRE "-I$(LIBPCRE)\include" !ENDIF @@ -116,7 +110,7 @@ openssl_CFLAGS = -DHAVE_OPENSSL "-I$(LIB !IFNDEF LIBICONV LIBICONV = C:\iconv-1.9.2.win$(bits) !ENDIF -LTLIBICONV = "$(LIBICONV)\lib\iconv$(DEBUGLIB).lib" +LTLIBICONV = "$(LIBICONV)\lib\iconv.lib" ICONV_CFLAGS = -DHAVE_ICONV "-I$(LIBICONV)\include" !ENDIF @@ -135,7 +129,7 @@ LIBZLIB = C:\zlib-1.2.3.win$(bits) !IFNDEF LIBZLIBFILE LIBZLIBFILE=zlib1 !ENDIF -zlib_LIBS = "$(LIBZLIB)\lib\$(LIBZLIBFILE)$(DEBUGLIB).lib" +zlib_LIBS = "$(LIBZLIB)\lib\$(LIBZLIBFILE).lib" zlib_CFLAGS = -DHAVE_LIBZ "-I$(LIBZLIB)\include" !ENDIF @@ -144,7 +138,7 @@ zlib_CFLAGS = -DHAVE_LIBZ "-I$(LIBZLIB)\ !IFNDEF LIBBZIP2 LIBBZIP2 = C:\bzip2-1.0.5.win$(bits) !ENDIF -BZ_LIBS = "$(LIBBZIP2)\lib\libbz2$(DEBUGLIB).lib" +BZ_LIBS = "$(LIBBZIP2)\lib\libbz2.lib" BZ_CFLAGS = -DHAVE_LIBBZ2 "-I$(LIBBZIP2)\include" !ENDIF @@ -154,17 +148,13 @@ BZ_CFLAGS = -DHAVE_LIBBZ2 "-I$(LIBBZIP2) LIBXML2 = C:\libxml2-2.6.30.win$(bits) !ENDIF libxml2_CFLAGS = -DHAVE_LIBXML "-I$(LIBXML2)\include" $(zlib_CFLAGS) $(ICONV_CFLAGS) -libxml2_LIBS = "$(LIBXML2)\lib\libxml2$(DEBUGLIB).lib" $(zlib_LIBS) $(ICONV_LIBS) +libxml2_LIBS = "$(LIBXML2)\lib\libxml2.lib" $(zlib_LIBS) $(ICONV_LIBS) !ENDIF !IFNDEF LIBGEOS LIBGEOS = C:\geos-3.0.win$(bits) !ENDIF -!IFDEF DEBUG -GEOS_LIBS = $(LIBGEOS)\lib\geos_c_i$(GEOSDEBUGLIB).lib -!ELSE GEOS_LIBS = $(LIBGEOS)\lib\geos_c_i.lib -!ENDIF GEOS_INCS = -I$(LIBGEOS)\include !IFDEF HAVE_LIBR diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c --- a/clients/mapiclient/dump.c +++ b/clients/mapiclient/dump.c @@ -947,21 +947,22 @@ describe_table(Mapi mid, const char *sch } mapi_close_handle(hdl); hdl = NULL; - snprintf(query, maxquerylen, -"SELECT col.name, com.remark FROM sys._columns col, sys.comments com WHERE col.id = com.id AND col.table_id = (SELECT id FROM sys._tables WHERE schema_id = (SELECT id FROM sys.schemas WHERE name = '%s') AND name = '%s') ORDER BY number", schema, tname); - if ((hdl = mapi_query(mid, query)) == NULL || mapi_error(mid)) - goto bailout; - while (mapi_fetch_row(hdl) != 0) { - comment_on(toConsole, "COLUMN", schema, tname, - mapi_fetch_field(hdl, 0), - mapi_fetch_field(hdl, 1)); - } - mapi_close_handle(hdl); - hdl = NULL; - if (mapi_error(mid)) - goto bailout; } + snprintf(query, maxquerylen, +"SELECT col.name, com.remark FROM sys._columns col, sys.comments com WHERE col.id = com.id
MonetDB: default - Merge with Mar2018 branch.
Changeset: 2704de9856ab for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2704de9856ab Added Files: sql/test/BugTracker-2018/Tests/multiple-insertinto-table-Bug-6578.stable.err sql/test/BugTracker-2018/Tests/multiple-insertinto-table-Bug-6578.stable.out sql/test/BugTracker-2018/Tests/sqlitelogictest-not-between-wrong.Bug-6569.stable.err sql/test/BugTracker-2018/Tests/sqlitelogictest-not-between-wrong.Bug-6569.stable.out Modified Files: gdk/gdk_batop.c gdk/gdk_select.c monetdb5/modules/kernel/Tests/select.malC monetdb5/modules/kernel/Tests/select.stable.out Branch: default Log Message: Merge with Mar2018 branch. diffs (truncated from 1736 to 300 lines): diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -531,9 +531,6 @@ BATappend(BAT *b, BAT *n, BAT *s, bit fo } } - if (BATcount(b) == 0) - BAThseqbase(b, s ? s->hseqbase : n->hseqbase); - if (b->tunique) { /* if b has the unique bit set, only insert values * from n that don't already occur in b, and make sure diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -28,7 +28,7 @@ A = (oid *) Tloc((B), 0); \ } \ A[(I)] = (V); \ - } while (0) + } while (false) BAT * virtualize(BAT *bn) @@ -38,13 +38,13 @@ virtualize(BAT *bn) (((bn->ttype == TYPE_void && !is_oid_nil(bn->tseqbase)) || bn->ttype == TYPE_oid) && bn->tkey && bn->tsorted)); - /* since bn has unique and strictly ascending tail values, we -* can easily check whether the tail is dense */ + /* since bn has unique and strictly ascending values, we can +* easily check whether the column is dense */ if (bn && bn->ttype == TYPE_oid && (BATcount(bn) <= 1 || * (const oid *) Tloc(bn, 0) + BATcount(bn) - 1 == * (const oid *) Tloc(bn, BUNlast(bn) - 1))) { - /* tail is dense, replace by virtual oid */ + /* column is dense, replace by virtual oid */ ALGODEBUG fprintf(stderr, "#virtualize(bn=%s#"BUNFMT",seq="OIDFMT")\n", BATgetId(bn), BATcount(bn), BATcount(bn) > 0 ? * (const oid *) Tloc(bn, 0) : 0); @@ -56,7 +56,7 @@ virtualize(BAT *bn) bn->theap.storage = bn->theap.newstorage = STORE_MEM; bn->theap.size = 0; bn->ttype = TYPE_void; - bn->tvarsized = 1; + bn->tvarsized = true; bn->twidth = 0; bn->tshift = 0; } @@ -85,11 +85,11 @@ doublerange(oid l1, oid h1, oid l2, oid *p++ = l1++; while (l2 < h2) *p++ = l2++; - bn->tkey = 1; - bn->tsorted = 1; + bn->tkey = true; + bn->tsorted = true; bn->trevsorted = BATcount(bn) <= 1; - bn->tnil = 0; - bn->tnonil = 1; + bn->tnil = false; + bn->tnonil = true; return bn; } @@ -119,11 +119,11 @@ doubleslice(BAT *b, BUN l1, BUN h1, BUN o = (const oid *) Tloc(b, l2); while (l2++ < h2) *p++ = *o++; - bn->tkey = 1; - bn->tsorted = 1; + bn->tkey = true; + bn->tsorted = true; bn->trevsorted = BATcount(bn) <= 1; - bn->tnil = 0; - bn->tnonil = 1; + bn->tnil = false; + bn->tnonil = true; return virtualize(bn); } @@ -221,7 +221,7 @@ BAT_hashselect(BAT *b, BAT *s, BAT *bn, } } BATsetcount(bn, cnt); - bn->tkey = 1; + bn->tkey = true; if (cnt > 1) { /* hash chains produce results in the order high to * low, so we just need to reverse */ @@ -231,7 +231,7 @@ BAT_hashselect(BAT *b, BAT *s, BAT *bn, dst[h] = o; } } - bn->tsorted = 1; + bn->tsorted = true; bn->trevsorted = bn->batCount <= 1; bn->tseqbase = bn->batCount == 0 ? 0 : bn->batCount == 1 ? *dst : oid_nil; return bn; @@ -240,37 +240,37 @@ BAT_hashselect(BAT *b, BAT *s, BAT *bn, /* Imprints select code */ /* inner check */ -#define impscheck(CAND,TEST,ADD) \ -do { \ - e = (BUN) (i+limit-pr_off+off); \ - if (im[icnt] & mask) { \ - if ((im[icnt] & ~innermask) == 0) { \ - while (p < q && o < e) {\ - v = src[o-off]; \ - ADD;
MonetDB: Mar2018 - Updated some comments.
Changeset: b2cb230ecebf for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b2cb230ecebf Modified Files: gdk/gdk_select.c Branch: Mar2018 Log Message: Updated some comments. diffs (95 lines): diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -38,13 +38,13 @@ virtualize(BAT *bn) (((bn->ttype == TYPE_void && !is_oid_nil(bn->tseqbase)) || bn->ttype == TYPE_oid) && bn->tkey && bn->tsorted)); - /* since bn has unique and strictly ascending tail values, we -* can easily check whether the tail is dense */ + /* since bn has unique and strictly ascending values, we can +* easily check whether the column is dense */ if (bn && bn->ttype == TYPE_oid && (BATcount(bn) <= 1 || * (const oid *) Tloc(bn, 0) + BATcount(bn) - 1 == * (const oid *) Tloc(bn, BUNlast(bn) - 1))) { - /* tail is dense, replace by virtual oid */ + /* column is dense, replace by virtual oid */ ALGODEBUG fprintf(stderr, "#virtualize(bn=%s#"BUNFMT",seq="OIDFMT")\n", BATgetId(bn), BATcount(bn), BATcount(bn) > 0 ? * (const oid *) Tloc(bn, 0) : 0); @@ -1000,24 +1000,24 @@ BAT_scanselect(BAT *b, BAT *s, BAT *bn, /* generic range select * - * Return a dense-headed BAT with the OID values of b in the tail for - * qualifying tuples. The return BAT is sorted on the tail value - * (i.e. in the same order as the input BAT). + * Return a BAT with the OID values of b for qualifying tuples. The + * return BAT is sorted (i.e. in the same order as the input BAT). * - * If s[dense,OID] is specified, its tail column is a list of - * candidates. s should be sorted on the tail value. + * If s is non-NULL, it is a list of candidates. s must be sorted. * * tl may not be NULL, li, hi, and anti must be either 0 or 1. * * If th is NULL, hi is ignored. * - * If anti is 0, qualifying tuples are those whose tail value is - * between tl and th. If li or hi is 1, the respective boundary is - * inclusive, otherwise exclusive. If th is NULL it is taken to be - * equal to tl, turning this into an equi- or point-select. Note that - * for a point select to return anything, li (and hi if th was not - * NULL) must be 1. There is a special case if tl is nil and th is - * NULL. This is the only way to select for nil values. + * If anti is 0, qualifying tuples are those whose value is between tl + * and th (as in x >[=] tl && x <[=] th, where equality depends on li + * and hi--so if tl > th, nothing will be returned). If li or hi is + * 1, the respective boundary is inclusive, otherwise exclusive. If + * th is NULL it is taken to be equal to tl, turning this into an + * equi- or point-select. Note that for a point select to return + * anything, li (and hi if th was not NULL) must be 1. There is a + * special case if tl is nil and th is NULL. This is the only way to + * select for nil values. * * If anti is 1, the result is the complement of what the result would * be if anti were 0, except that nils are filtered out. @@ -1562,8 +1562,8 @@ BATselect(BAT *b, BAT *s, const void *tl if (s) { /* restrict first, last so * that they refer to existing -* head values of b whose tail -* is not nil */ +* head values of b whose +* value is not nil */ oid o = (oid) first + b->hseqbase; BUN last; first = SORTfndfirst(s, ); @@ -1586,8 +1586,8 @@ BATselect(BAT *b, BAT *s, const void *tl if (s) { /* restrict first, last so * that they refer to existing -* head values of b whose tail -* is not nil */ +* head values of b whose +* value is not nil */ oid o = (oid) last + b->hseqbase; BUN first; last = SORTfndfirst(s, ); @@ -1825,12 +1825,10 @@ BATselect(BAT *b, BAT *s, const void *tl /* theta select * - * Returns a dense-headed BAT with the OID values of b in the tail for - * qualifying tuples. The return BAT is sorted on the tail value - * (i.e. in the same order as the input BAT). + * Returns a BAT with the OID values of b for qualifying tuples. The + * return BAT is sorted (i.e. in
MonetDB: Mar2018 - Keep hseqbase when appending to empty BAT.
Changeset: 27c9e7e92816 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=27c9e7e92816 Modified Files: gdk/gdk_batop.c Branch: Mar2018 Log Message: Keep hseqbase when appending to empty BAT. diffs (13 lines): diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -531,9 +531,6 @@ BATappend(BAT *b, BAT *n, BAT *s, bit fo } } - if (BATcount(b) == 0) - BAThseqbase(b, s ? s->hseqbase : n->hseqbase); - if (b->tunique) { /* if b has the unique bit set, only insert values * from n that don't already occur in b, and make sure ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Mar2018 - Cosmetic: use bool and layout.
Changeset: f09ae975a152 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f09ae975a152 Modified Files: gdk/gdk_select.c Branch: Mar2018 Log Message: Cosmetic: use bool and layout. diffs (truncated from 1028 to 300 lines): diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -28,7 +28,7 @@ A = (oid *) Tloc((B), 0); \ } \ A[(I)] = (V); \ - } while (0) + } while (false) BAT * virtualize(BAT *bn) @@ -52,12 +52,12 @@ virtualize(BAT *bn) bn->tseqbase = 0; else bn->tseqbase = * (const oid *) Tloc(bn, 0); - bn->tdense = 1; + bn->tdense = true; HEAPfree(>theap, 1); bn->theap.storage = bn->theap.newstorage = STORE_MEM; bn->theap.size = 0; bn->ttype = TYPE_void; - bn->tvarsized = 1; + bn->tvarsized = true; bn->twidth = 0; bn->tshift = 0; } @@ -86,11 +86,11 @@ doublerange(oid l1, oid h1, oid l2, oid *p++ = l1++; while (l2 < h2) *p++ = l2++; - bn->tkey = 1; - bn->tsorted = 1; + bn->tkey = true; + bn->tsorted = true; bn->trevsorted = BATcount(bn) <= 1; - bn->tnil = 0; - bn->tnonil = 1; + bn->tnil = false; + bn->tnonil = true; return bn; } @@ -120,11 +120,11 @@ doubleslice(BAT *b, BUN l1, BUN h1, BUN o = (const oid *) Tloc(b, l2); while (l2++ < h2) *p++ = *o++; - bn->tkey = 1; - bn->tsorted = 1; + bn->tkey = true; + bn->tsorted = true; bn->trevsorted = BATcount(bn) <= 1; - bn->tnil = 0; - bn->tnonil = 1; + bn->tnil = false; + bn->tnonil = true; return virtualize(bn); } @@ -222,7 +222,7 @@ BAT_hashselect(BAT *b, BAT *s, BAT *bn, } } BATsetcount(bn, cnt); - bn->tkey = 1; + bn->tkey = true; if (cnt > 1) { /* hash chains produce results in the order high to * low, so we just need to reverse */ @@ -232,7 +232,7 @@ BAT_hashselect(BAT *b, BAT *s, BAT *bn, dst[h] = o; } } - bn->tsorted = 1; + bn->tsorted = true; bn->tdense = bn->trevsorted = bn->batCount <= 1; if (bn->batCount == 1) bn->tseqbase = *dst; @@ -242,37 +242,37 @@ BAT_hashselect(BAT *b, BAT *s, BAT *bn, /* Imprints select code */ /* inner check */ -#define impscheck(CAND,TEST,ADD) \ -do { \ - e = (BUN) (i+limit-pr_off+off); \ - if (im[icnt] & mask) { \ - if ((im[icnt] & ~innermask) == 0) { \ - while (p < q && o < e) {\ - v = src[o-off]; \ - ADD;\ - cnt++; \ - p++;\ - if (p < q) \ - CAND; \ - } \ - } else {\ - while (p < q && o < e) {\ - v = src[o-off]; \ - ADD;\ - cnt += (TEST); \ - p++;\ - if (p < q) \ - CAND; \ - } \ - } \ - } else {\ - while (p < q && o < e) {\ - p++;\ - if (p < q) \ - CAND; \ - } \ - } \ -} while (0) +#define impscheck(CAND,TEST,ADD) \ + do {\ + e = (BUN) (i+limit-pr_off+off); \ + if (im[icnt] & mask) { \ + if ((im[icnt] & ~innermask) == 0) { \ + while (p < q && o < e) {\ + v =
MonetDB: Mar2018 - An anti-select for an empty range should retu...
Changeset: 021999eef451 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=021999eef451 Added Files: sql/test/BugTracker-2018/Tests/sqlitelogictest-not-between-wrong.Bug-6569.stable.err sql/test/BugTracker-2018/Tests/sqlitelogictest-not-between-wrong.Bug-6569.stable.out Modified Files: gdk/gdk_select.c monetdb5/modules/kernel/Tests/select.malC monetdb5/modules/kernel/Tests/select.stable.out Branch: Mar2018 Log Message: An anti-select for an empty range should return all non-nil values. This fixes bug 6569. diffs (truncated from 507 to 300 lines): diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -1330,6 +1330,18 @@ BATselect(BAT *b, BAT *s, const void *tl s ? BATgetId(s) : "NULL", s && BATtdense(s) ? "(dense)" : ""); } + } else if (ATOMcmp(t, tl, th) > 0) { + /* empty range: turn into range select for +* nil-nil range (i.e. everything but nil) */ + equi = 0; + anti = 0; + lval = 0; + hval = 0; + ALGODEBUG fprintf(stderr, "#BATselect(b=%s#" BUNFMT + ",s=%s%s,anti=0): anti-nil\n", + BATgetId(b), BATcount(b), + s ? BATgetId(s) : "NULL", + s && BATtdense(s) ? "(dense)" : ""); } } diff --git a/monetdb5/modules/kernel/Tests/select.malC b/monetdb5/modules/kernel/Tests/select.malC --- a/monetdb5/modules/kernel/Tests/select.malC +++ b/monetdb5/modules/kernel/Tests/select.malC @@ -247,23 +247,23 @@ io.print("nothing"); x := algebra.select(b, nil:bat[:oid], 7, 3, true, true, true); z := algebra.projection(x, b); z := algebra.sort(z, false, true); -io.print(z);# nothing -io.print("nothing"); +io.print(z);# 0,1,2,3,4,5,6,7,8,9 +io.print("0,1,2,3,4,5,6,7,8,9"); x := algebra.select(b, nil:bat[:oid], 7, 3, true, false, true); z := algebra.projection(x, b); z := algebra.sort(z, false, true); -io.print(z);# nothing -io.print("nothing"); +io.print(z);# 0,1,2,3,4,5,6,7,8,9 +io.print("0,1,2,3,4,5,6,7,8,9"); x := algebra.select(b, nil:bat[:oid], 7, 3, false, true, true); z := algebra.projection(x, b); z := algebra.sort(z, false, true); -io.print(z);# nothing -io.print("nothing"); +io.print(z);# 0,1,2,3,4,5,6,7,8,9 +io.print("0,1,2,3,4,5,6,7,8,9"); x := algebra.select(b, nil:bat[:oid], 7, 3, false, false, true); z := algebra.projection(x, b); z := algebra.sort(z, false, true); -io.print(z);# nothing -io.print("nothing"); +io.print(z);# 0,1,2,3,4,5,6,7,8,9 +io.print("0,1,2,3,4,5,6,7,8,9"); bat.orderidx(b,3); @@ -497,23 +497,23 @@ io.print("nothing"); x := algebra.select(b, nil:bat[:oid], 7, 3, true, true, true); z := algebra.projection(x, b); z := algebra.sort(z, false, true); -io.print(z);# nothing -io.print("nothing"); +io.print(z);# 0,1,2,3,4,5,6,7,8,9 +io.print("0,1,2,3,4,5,6,7,8,9"); x := algebra.select(b, nil:bat[:oid], 7, 3, true, false, true); z := algebra.projection(x, b); z := algebra.sort(z, false, true); -io.print(z);# nothing -io.print("nothing"); +io.print(z);# 0,1,2,3,4,5,6,7,8,9 +io.print("0,1,2,3,4,5,6,7,8,9"); x := algebra.select(b, nil:bat[:oid], 7, 3, false, true, true); z := algebra.projection(x, b); z := algebra.sort(z, false, true); -io.print(z);# nothing -io.print("nothing"); +io.print(z);# 0,1,2,3,4,5,6,7,8,9 +io.print("0,1,2,3,4,5,6,7,8,9"); x := algebra.select(b, nil:bat[:oid], 7, 3, false, false, true); z := algebra.projection(x, b); z := algebra.sort(z, false, true); -io.print(z);# nothing -io.print("nothing"); +io.print(z);# 0,1,2,3,4,5,6,7,8,9 +io.print("0,1,2,3,4,5,6,7,8,9"); x := algebra.select(s, nil:bat[:oid], nil:int, nil:int, true, true, false); @@ -744,23 +744,23 @@ io.print("nothing"); x := algebra.select(s, nil:bat[:oid], 7, 3, true, true, true); z := algebra.projection(x, s); z := algebra.sort(z, false, true); -io.print(z);# nothing -io.print("nothing"); +io.print(z);# 0,1,2,3,4,5,6,7,8,9 +io.print("0,1,2,3,4,5,6,7,8,9"); x := algebra.select(s, nil:bat[:oid], 7, 3, true, false, true); z := algebra.projection(x, s); z := algebra.sort(z, false, true); -io.print(z);# nothing -io.print("nothing"); +io.print(z);# 0,1,2,3,4,5,6,7,8,9 +io.print("0,1,2,3,4,5,6,7,8,9"); x :=
MonetDB: data-vaults - Merge with default
Changeset: c19ec2dbab60 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c19ec2dbab60 Added Files: sql/test/BugTracker-2018/Tests/create-temp-table-ordered-index-error.Bug-6574.sql sql/test/BugTracker-2018/Tests/create-temp-table-ordered-index-error.Bug-6574.stable.err sql/test/BugTracker-2018/Tests/create-temp-table-ordered-index-error.Bug-6574.stable.out sql/test/BugTracker-2018/Tests/multiple-insertinto-table-Bug-6578.sql sql/test/BugTracker-2018/Tests/ordered-index-error.Bug-6572.sql sql/test/BugTracker-2018/Tests/ordered-index-error.Bug-6572.stable.err sql/test/BugTracker-2018/Tests/ordered-index-error.Bug-6572.stable.out sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.stable.err sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.stable.out sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case.Bug-6568.stable.err sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case.Bug-6568.stable.out sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case.Bug-6573.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case.Bug-6573.stable.err sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case.Bug-6573.stable.out sql/test/BugTracker-2018/Tests/sqlitelogictest-missing-bulk-implementation.Bug-6575.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-missing-bulk-implementation.Bug-6575.stable.err sql/test/BugTracker-2018/Tests/sqlitelogictest-missing-bulk-implementation.Bug-6575.stable.out sql/test/BugTracker-2018/Tests/sqlitelogictest-select-nullif-case.Bug-6579.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-undefined-calc.Bug-6570.stable.err sql/test/BugTracker-2018/Tests/sqlitelogictest-undefined-calc.Bug-6570.stable.out Modified Files: NT/rules.msc clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/mapiclient/dump.c monetdb5/optimizer/opt_mergetable.c sql/backends/monet5/generator/Tests/generator00.stable.out sql/backends/monet5/generator/Tests/generator03.stable.out sql/backends/monet5/generator/Tests/joins01.stable.out sql/backends/monet5/generator/generator.c sql/backends/monet5/generator/generator.mal sql/backends/monet5/generator/generator_hge.mal sql/backends/monet5/rel_bin.c sql/server/rel_exp.c sql/server/rel_exp.h sql/server/rel_optimizer.c sql/server/rel_select.c sql/server/sql_mvc.c sql/server/sql_mvc.h sql/test/BugTracker-2017/Tests/type-resolution-error.Bugs-6313.stable.err sql/test/BugTracker-2018/Tests/All sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-nullif-coalesce.Bug-6565.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-mal-calc-undefined.Bug-6566.sql sql/test/Tests/comment-on.sql sql/test/Tests/comment-on.stable.err sql/test/Tests/comment-on.stable.out sql/test/mergetables/Tests/mergequery.stable.out sql/test/mergetables/Tests/part-elim.stable.out Branch: data-vaults Log Message: Merge with default diffs (truncated from 2399 to 300 lines): diff --git a/NT/rules.msc b/NT/rules.msc --- a/NT/rules.msc +++ b/NT/rules.msc @@ -39,12 +39,6 @@ BITSMCHN=X64 !ENDIF !IFDEF DEBUG -DEBUGLIB=d -!ELSE -DEBUGLIB= -!ENDIF - -!IFDEF DEBUG # force W_CFLAGS off in debug builds: using icc, you get way more # warnings about casts which results in the code being uncompilable W_CFLAGS = @@ -98,7 +92,7 @@ PYTHON_LIBDIR=$(PYTHON3_LIBDIR) !IFNDEF LIBPCRE LIBPCRE = C:\Program Files\PCRE !ENDIF -pcre_LIBS = "$(LIBPCRE)\lib\pcre$(DEBUGLIB).lib" +pcre_LIBS = "$(LIBPCRE)\lib\pcre.lib" pcre_CFLAGS = -DHAVE_LIBPCRE "-I$(LIBPCRE)\include" !ENDIF @@ -116,7 +110,7 @@ openssl_CFLAGS = -DHAVE_OPENSSL "-I$(LIB !IFNDEF LIBICONV LIBICONV = C:\iconv-1.9.2.win$(bits) !ENDIF -LTLIBICONV = "$(LIBICONV)\lib\iconv$(DEBUGLIB).lib" +LTLIBICONV = "$(LIBICONV)\lib\iconv.lib" ICONV_CFLAGS = -DHAVE_ICONV "-I$(LIBICONV)\include" !ENDIF @@ -135,7 +129,7 @@ LIBZLIB = C:\zlib-1.2.3.win$(bits) !IFNDEF LIBZLIBFILE LIBZLIBFILE=zlib1 !ENDIF -zlib_LIBS = "$(LIBZLIB)\lib\$(LIBZLIBFILE)$(DEBUGLIB).lib" +zlib_LIBS = "$(LIBZLIB)\lib\$(LIBZLIBFILE).lib" zlib_CFLAGS = -DHAVE_LIBZ "-I$(LIBZLIB)\include" !ENDIF @@ -144,7 +138,7 @@ zlib_CFLAGS = -DHAVE_LIBZ "-I$(LIBZLIB)\ !IFNDEF LIBBZIP2 LIBBZIP2 = C:\bzip2-1.0.5.win$(bits) !ENDIF -BZ_LIBS = "$(LIBBZIP2)\lib\libbz2$(DEBUGLIB).lib" +BZ_LIBS = "$(LIBBZIP2)\lib\libbz2.lib" BZ_CFLAGS = -DHAVE_LIBBZ2 "-I$(LIBBZIP2)\include" !ENDIF @@ -154,17 +148,13 @@ BZ_CFLAGS = -DHAVE_LIBBZ2 "-I$(LIBBZIP2) LIBXML2 =
MonetDB: data-vaults - Approve output
Changeset: 5129fe99ed67 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5129fe99ed67 Modified Files: sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.err sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.out sql/backends/monet5/vaults/lidar/Tests/lidar-single-file.stable.err sql/backends/monet5/vaults/lidar/Tests/lidar-single-file.stable.out Branch: data-vaults Log Message: Approve output diffs (146 lines): diff --git a/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.err b/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.err --- a/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.err +++ b/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.err @@ -21,13 +21,14 @@ stderr of test 'lidar-directory` in dire # cmdline opt mapi_usock = /var/tmp/mtest-10899/.s.monetdb.34483 # cmdline opt monet_prompt = # cmdline opt gdk_dbpath = /home/kutsurak/work/monet/sources/MonetDB/build/install/var/MonetDB/mTests_sql_backends_monet5_vaults_lidar -# cmdline opt gdk_debug = 536870922 -Params: XYZainrcpedM -Initial table name: tbl1 +# cmdline opt embedded_c = true +# cmdline opt gdk_debug = 553648138 +# Params: XYZainrcpedM +# Initial table name: tbl1 #file: /home/kutsurak/work/monet/sources/monetdb-test-data/lidar/directory_loading/lidar1.las 2 #file: /home/kutsurak/work/monet/sources/monetdb-test-data/lidar/directory_loading/lidar2.las 2 -tname: tbl1 -tablename: tbl1 +# tname: tbl1 +# tablename: tbl1 #- # Header Summary @@ -68,11 +69,11 @@ tablename: tbl1 # User: 'liblas' - Description: 'OGR variant of OpenGIS WKT SRS' # ID: 2112 Length: 720 -Scale: 0.01 0.01 0.01 -Decimal type scale: 2 2 2 -Decimal type precision: 6 6 3 -decimal digits: 2 2 2 -total digits: 8 8 5 +# Scale: 0.01 0.01 0.01 +# Decimal type scale: 2 2 2 +# Decimal type precision: 6 6 3 +# decimal digits: 2 2 2 +# total digits: 8 8 5 #- # Header Summary @@ -113,22 +114,22 @@ total digits: 8 8 5 # User: 'liblas' - Description: 'OGR variant of OpenGIS WKT SRS' # ID: 2112 Length: 720 -Scale: 0.01 0.01 0.01 -Decimal type scale: 2 2 2 -Decimal type precision: 6 6 3 -decimal digits: 2 2 2 -total digits: 8 8 5 -count: 2 -id, rid: 0 2 +# Scale: 0.01 0.01 0.01 +# Decimal type scale: 2 2 2 +# Decimal type precision: 6 6 3 +# decimal digits: 2 2 2 +# total digits: 8 8 5 +# count: 2 +# id, rid: 0 2 #Loading 106 rows -LIDARloadTable_ called, creating reader -#File loaded in 1 ms id, rid: 1 3 +# LIDARloadTable_ called, creating reader +#File loaded in 1 ms # id, rid: 1 3 #Loading 106 rows -LIDARloadTable_ called, creating reader -#File loaded in 1 ms -# 16:54:25 > -# 16:54:25 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-10899" "--port=34483" -# 16:54:25 > +# LIDARloadTable_ called, creating reader +#File loaded in 0 ms +# 08:51:09 > +# 08:51:09 > "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-25522" "--port=33181" +# 08:51:09 > # 16:54:25 > diff --git a/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.out b/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.out --- a/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.out +++ b/sql/backends/monet5/vaults/lidar/Tests/lidar-directory.stable.out @@ -260,7 +260,7 @@ Ready. [ 638627.40, 853357.38, 419.52, 104,104,1, 104,104, 104,104,6, 104 ] [ 637857.41, 853213.98, 424.87, 105,105,1, 105,105, 105,105,12, 105 ] #select count(*) from tbl1; -% sys.L4 # table_name +% sys.L3 # table_name % L3 # name % bigint # type % 3 # length diff --git a/sql/backends/monet5/vaults/lidar/Tests/lidar-single-file.stable.err b/sql/backends/monet5/vaults/lidar/Tests/lidar-single-file.stable.err --- a/sql/backends/monet5/vaults/lidar/Tests/lidar-single-file.stable.err +++ b/sql/backends/monet5/vaults/lidar/Tests/lidar-single-file.stable.err @@ -21,11 +21,12 @@ stderr of test 'lidar-single-file` in di # cmdline opt mapi_usock = /var/tmp/mtest-10899/.s.monetdb.34483 # cmdline opt monet_prompt = # cmdline opt gdk_dbpath = /home/kutsurak/work/monet/sources/MonetDB/build/install/var/MonetDB/mTests_sql_backends_monet5_vaults_lidar -# cmdline opt gdk_debug = 536870922 -Params: XYZauinrcpedM -Initial table name: tbl0 -tname: tbl0 -tablename: tbl0 +# cmdline opt embedded_c = true +# cmdline opt gdk_debug = 553648138 +# Params: XYZauinrcpedM +# Initial table name: tbl0 +# tname: tbl0 +# tablename: tbl0 #- # Header Summary @@ -66,15 +67,15 @@ tablename: tbl0 # User: 'liblas' -
MonetDB: data-vaults - Add comments to the test output
Changeset: 34d30965e14f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=34d30965e14f Modified Files: sql/backends/monet5/vaults/lidar/lidar.c Branch: data-vaults Log Message: Add comments to the test output diffs (91 lines): diff --git a/sql/backends/monet5/vaults/lidar/lidar.c b/sql/backends/monet5/vaults/lidar/lidar.c --- a/sql/backends/monet5/vaults/lidar/lidar.c +++ b/sql/backends/monet5/vaults/lidar/lidar.c @@ -831,7 +831,7 @@ LIDARattach(Client cntxt, MalBlkPtr mb, tname = *getArgReference_str(stk, pci, 2); params = *getArgReference_str(stk, pci, 3); #ifndef NDEBUG - fprintf(stderr, "Params: %s\n", params); + fprintf(stderr, "# Params: %s\n", params); #endif break; default: @@ -841,7 +841,7 @@ LIDARattach(Client cntxt, MalBlkPtr mb, #ifndef NDEBUG if (tname != NULL) { - fprintf(stderr, "Initial table name: %s\n", tname); + fprintf(stderr, "# Initial table name: %s\n", tname); } #endif @@ -879,7 +879,7 @@ LIDARattach(Client cntxt, MalBlkPtr mb, } #ifndef NDEBUG - fprintf(stderr, "tname: %s\n", tname); + fprintf(stderr, "# tname: %s\n", tname); #endif /* extract the file name from the absolute path */ @@ -909,7 +909,7 @@ LIDARattach(Client cntxt, MalBlkPtr mb, } #ifndef NDEBUG - fprintf(stderr, "tablename: %s\n", tname_low); + fprintf(stderr, "# tablename: %s\n", tname_low); #endif /* check table name for existence in the lidar catalog */ @@ -966,22 +966,22 @@ LIDARattach(Client cntxt, MalBlkPtr mb, precisionZ = scaleZ + (int)ceil(log(header.maxZ)/log(10)); #ifndef NDEBUG - fprintf(stderr, "Scale: %f %f %f\n", + fprintf(stderr, "# Scale: %f %f %f\n", header.scaleX, header.scaleY, header.scaleZ); - fprintf(stderr, "Decimal type scale: %d %d %d\n", + fprintf(stderr, "# Decimal type scale: %d %d %d\n", (int)ceil(-log(header.scaleX)/log(10)), (int)ceil(-log(header.scaleY)/log(10)), (int)ceil(-log(header.scaleZ)/log(10))); - fprintf(stderr, "Decimal type precision: %d %d %d\n", + fprintf(stderr, "# Decimal type precision: %d %d %d\n", (int)ceil(log(header.maxX)/log(10)), (int)ceil(log(header.maxY)/log(10)), (int)ceil(log(header.maxZ)/log(10))); - fprintf(stderr, "decimal digits: %d %d %d\n", scaleX, scaleY, scaleZ); - fprintf(stderr, "total digits: %d %d %d\n", precisionX, precisionY, precisionZ); + fprintf(stderr, "# decimal digits: %d %d %d\n", scaleX, scaleY, scaleZ); + fprintf(stderr, "# total digits: %d %d %d\n", precisionX, precisionY, precisionZ); #endif /* Parse the input parameters */ @@ -1629,7 +1629,7 @@ LIDARloadTable_(mvc *m, sql_schema *sch, fname = (char *)table_funcs.column_find_value(m->session->tr, col, frid); #ifndef NDEBUG - fprintf(stderr, "LIDARloadTable_ called, creating reader\n"); + fprintf(stderr, "# LIDARloadTable_ called, creating reader\n"); #endif MT_lock_set(_lidar_lock); LASError_Reset(); @@ -1864,12 +1864,12 @@ str LIDARloadTable(Client cntxt, MalBlkP goto loadtable_cleanup; } #ifndef NDEBUG - fprintf(stderr, "count: " OIDFMT "\n", cnt); + fprintf(stderr, "# count: " OIDFMT "\n", cnt); #endif for (id = 0; id < cnt; id++) { int rid = *(int*)BUNtail(fs_rid, id); #ifndef NDEBUG - fprintf(stderr, "id, rid: " OIDFMT " %d\n", id, rid); + fprintf(stderr, "# id, rid: " OIDFMT " %d\n", id, rid); #endif msg = LIDARloadTable_(m, sch, lidar_tbl, tbl, rid - 1); if (msg != MAL_SUCCEED) { ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list