Changeset: 0dfbd50876a1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0dfbd50876a1
Added Files:
sql/test/BugTracker-2017/Tests/side-effect.Bug-6397.stable.out.single
sql/test/BugTracker-2018/Tests/sqlitelogictest-algebra-join-not-in.Bug-6519.stable.err
sql/test/BugTracker-2018/Tests/sqlitelogictest-algebra-join-not-in.Bug-6519.stable.out
sql/test/BugTracker-2018/Tests/sqlitelogictest-case-subquery-missing.Bug-6523.sql
sql/test/BugTracker-2018/Tests/sqlitelogictest-count-not-in.Bug-6518.stable.err
sql/test/BugTracker-2018/Tests/sqlitelogictest-count-not-in.Bug-6518.stable.out
sql/test/BugTracker-2018/Tests/sqlitelogictest-group-by-having-in-count.Bug-6524.sql
sql/test/BugTracker-2018/Tests/sqlitelogictest-in-single-column.Bug-6522.sql
sql/test/BugTracker-2018/Tests/update-with-correlated-subquery.Bug-6520.sql
sql/test/BugTracker-2018/Tests/update-with-correlated-subquery.Bug-6520.stable.err
sql/test/BugTracker-2018/Tests/update-with-correlated-subquery.Bug-6520.stable.out
Modified Files:
clients/mapiclient/mclient.c
common/utils/mcrypt.c
configure.ag
monetdb5/mal/mal_authorize.c
monetdb5/mal/mal_profiler.c
monetdb5/modules/atoms/xml.c
monetdb5/modules/mal/mal_mapi.c
monetdb5/modules/mal/pcre.c
sql/backends/monet5/sql_upgrades.c
sql/backends/monet5/sql_user.c
sql/scripts/51_sys_schema_extension.sql
sql/scripts/97_comments.sql
sql/server/rel_rel.c
sql/server/rel_select.c
sql/test/BugTracker-2017/Tests/crash_correlated_subqueries_in_select.Bug-6254.stable.out
sql/test/BugTracker-2018/Tests/All
sql/test/Dependencies/Tests/Dependencies.stable.out
sql/test/Dependencies/Tests/Dependencies.stable.out.int128
sql/test/Dependencies/Tests/dependency_loop.stable.out
sql/test/Dependencies/Tests/dependency_loop.stable.out.int128
sql/test/Tests/systemfunctions.stable.out
sql/test/Tests/systemfunctions.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.32bit
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.32bit
sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
sql/test/emptydb/Tests/check.SQL.py
sql/test/emptydb/Tests/check.stable.out
sql/test/emptydb/Tests/check.stable.out.32bit
sql/test/emptydb/Tests/check.stable.out.int128
sql/test/sql_xml/Tests/All
sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
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.int128
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
tools/merovingian/daemon/argvcmds.c
tools/merovingian/daemon/client.c
Branch: trails
Log Message:
Merge with default
diffs (truncated from 5736 to 300 lines):
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -2154,7 +2154,7 @@ showCommands(void)
mnstr_printf(toConsole, "\\q - terminate session\n");
}
-/* These values must match those used in sys.describe_all_objects() */
+/* These values must match those used in view sys.describe_all_objects */
#define MD_TABLE 1
#define MD_VIEW 2
#define MD_SEQ 4
@@ -2500,7 +2500,7 @@ doFile(Mapi mid, stream *fp, int useinse
* | "data.my*" | no
| fullname LIKE 'data.my%' |
* | "*a.my*" | no
| fullname LIKE '%a.my%' |
*/
- q += snprintf(q, endq - q,
"SELECT type, fullname, remark FROM sys.describe_all_objects()\n");
+ q += snprintf(q, endq - q,
"SELECT type, fullname, remark FROM sys.describe_all_objects\n");
q += snprintf(q, endq - q,
"WHERE (ntype & %u) > 0\n", x);
if (!wantsSystem) {
q += snprintf(q, endq -
q, "AND NOT system\n");
diff --git a/common/utils/mcrypt.c b/common/utils/mcrypt.c
--- a/common/utils/mcrypt.c
+++ b/common/utils/mcrypt.c
@@ -82,13 +82,15 @@ mcrypt_MD5Sum(const char *string, size_t
MD5_Final(md, &c);
ret = malloc(MD5_DIGEST_LENGTH * 2 + 1);
- snprintf(ret, MD5_DIGEST_LENGTH * 2 + 1,
- "%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x%02x%02x",
- md[0], md[1], md[2], md[3],
- md[4], md[5], md[6], md[7],
- md[8], md[9], md[10], md[11],
- md[12], md[13], md[14], md[15]);
+ if(ret) {
+ snprintf(ret, MD5_DIGEST_LENGTH * 2 + 1,
+ "%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x%02x%02x%02x%02x",
+ md[0], md[1], md[2], md[3],
+ md[4], md[5], md[6], md[7],
+ md[8], md[9], md[10], md[11],
+ md[12], md[13], md[14], md[15]);
+ }
return ret;
#else
@@ -118,13 +120,15 @@ mcrypt_SHA1Sum(const char *string, size_
SHA1_Final(md, &c);
ret = malloc(SHA_DIGEST_LENGTH * 2 + 1);
- snprintf(ret, SHA_DIGEST_LENGTH * 2 + 1,
- "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
- md[0], md[1], md[2], md[3], md[4],
- md[5], md[6], md[7], md[8], md[9],
- md[10], md[11], md[12], md[13], md[14],
- md[15], md[16], md[17], md[18], md[19]);
+ if(ret) {
+ snprintf(ret, SHA_DIGEST_LENGTH * 2 + 1,
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+ md[0], md[1], md[2], md[3], md[4],
+ md[5], md[6], md[7], md[8], md[9],
+ md[10], md[11], md[12], md[13], md[14],
+ md[15], md[16], md[17], md[18], md[19]);
+ }
return ret;
#else
@@ -154,16 +158,18 @@ mcrypt_SHA224Sum(const char *string, siz
SHA224_Final(md, &c);
ret = malloc(SHA224_DIGEST_LENGTH * 2 + 1);
- snprintf(ret, SHA224_DIGEST_LENGTH * 2 + 1,
- "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x%02x%02x",
- md[0], md[1], md[2], md[3], md[4],
- md[5], md[6], md[7], md[8], md[9],
- md[10], md[11], md[12], md[13], md[14],
- md[15], md[16], md[17], md[18], md[19],
- md[20], md[21], md[22], md[23], md[24],
- md[25], md[26], md[27]);
+ if(ret) {
+ snprintf(ret, SHA224_DIGEST_LENGTH * 2 + 1,
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x%02x%02x%02x%02x",
+ md[0], md[1], md[2], md[3], md[4],
+ md[5], md[6], md[7], md[8], md[9],
+ md[10], md[11], md[12], md[13], md[14],
+ md[15], md[16], md[17], md[18], md[19],
+ md[20], md[21], md[22], md[23], md[24],
+ md[25], md[26], md[27]);
+ }
return ret;
#else
@@ -193,18 +199,20 @@ mcrypt_SHA256Sum(const char *string, siz
SHA256_Final(md, &c);
ret = malloc(SHA256_DIGEST_LENGTH * 2 + 1);
- snprintf(ret, SHA256_DIGEST_LENGTH * 2 + 1,
- "%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x%02x%02x",
- md[0], md[1], md[2], md[3], md[4],
- md[5], md[6], md[7], md[8], md[9],
- md[10], md[11], md[12], md[13], md[14],
- md[15], md[16], md[17], md[18], md[19],
- md[20], md[21], md[22], md[23], md[24],
- md[25], md[26], md[27], md[28], md[29],
- md[30], md[31]);
+ if(ret) {
+ snprintf(ret, SHA256_DIGEST_LENGTH * 2 + 1,
+ "%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x%02x%02x%02x%02x",
+ md[0], md[1], md[2], md[3], md[4],
+ md[5], md[6], md[7], md[8], md[9],
+ md[10], md[11], md[12], md[13], md[14],
+ md[15], md[16], md[17], md[18], md[19],
+ md[20], md[21], md[22], md[23], md[24],
+ md[25], md[26], md[27], md[28], md[29],
+ md[30], md[31]);
+ }
return ret;
#else
@@ -234,22 +242,24 @@ mcrypt_SHA384Sum(const char *string, siz
SHA384_Final(md, &c);
ret = malloc(SHA384_DIGEST_LENGTH * 2 + 1);
- snprintf(ret, SHA384_DIGEST_LENGTH * 2 + 1,
- "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x%02x%02x",
- md[0], md[1], md[2], md[3], md[4],
- md[5], md[6], md[7], md[8], md[9],
- md[10], md[11], md[12], md[13], md[14],
- md[15], md[16], md[17], md[18], md[19],
- md[20], md[21], md[22], md[23], md[24],
- md[25], md[26], md[27], md[28], md[29],
- md[30], md[31], md[32], md[33], md[34],
- md[35], md[36], md[37], md[38], md[39],
- md[40], md[41], md[42], md[43], md[44],
- md[45], md[46], md[47]);
+ if(ret) {
+ snprintf(ret, SHA384_DIGEST_LENGTH * 2 + 1,
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x%02x%02x%02x%02x",
+ md[0], md[1], md[2], md[3], md[4],
+ md[5], md[6], md[7], md[8], md[9],
+ md[10], md[11], md[12], md[13], md[14],
+ md[15], md[16], md[17], md[18], md[19],
+ md[20], md[21], md[22], md[23], md[24],
+ md[25], md[26], md[27], md[28], md[29],
+ md[30], md[31], md[32], md[33], md[34],
+ md[35], md[36], md[37], md[38], md[39],
+ md[40], md[41], md[42], md[43], md[44],
+ md[45], md[46], md[47]);
+ }
return ret;
#else
@@ -279,27 +289,29 @@ mcrypt_SHA512Sum(const char *string, siz
SHA512_Final(md, &c);
ret = malloc(SHA512_DIGEST_LENGTH * 2 + 1);
- snprintf(ret, SHA512_DIGEST_LENGTH * 2 + 1,
- "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x",
- md[0], md[1], md[2], md[3], md[4],
- md[5], md[6], md[7], md[8], md[9],
- md[10], md[11], md[12], md[13], md[14],
- md[15], md[16], md[17], md[18], md[19],
- md[20], md[21], md[22], md[23], md[24],
- md[25], md[26], md[27], md[28], md[29],
- md[30], md[31], md[32], md[33], md[34],
- md[35], md[36], md[37], md[38], md[39],
- md[40], md[41], md[42], md[43], md[44],
- md[45], md[46], md[47], md[48], md[49],
- md[50], md[51], md[52], md[53], md[54],
- md[55], md[56], md[57], md[58], md[59],
- md[60], md[61], md[62], md[63]);
+ if(ret) {
+ snprintf(ret, SHA512_DIGEST_LENGTH * 2 + 1,
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x",
+ md[0], md[1], md[2], md[3], md[4],
+ md[5], md[6], md[7], md[8], md[9],
+ md[10], md[11], md[12], md[13], md[14],
+ md[15], md[16], md[17], md[18], md[19],
+ md[20], md[21], md[22], md[23], md[24],
+ md[25], md[26], md[27], md[28], md[29],
+ md[30], md[31], md[32], md[33], md[34],
+ md[35], md[36], md[37], md[38], md[39],
+ md[40], md[41], md[42], md[43], md[44],
+ md[45], md[46], md[47], md[48], md[49],
+ md[50], md[51], md[52], md[53], md[54],
+ md[55], md[56], md[57], md[58], md[59],
+ md[60], md[61], md[62], md[63]);
+ }
return ret;
#else
@@ -329,13 +341,15 @@ mcrypt_RIPEMD160Sum(const char *string,
RIPEMD160_Final(md, &c);
ret = malloc(RIPEMD160_DIGEST_LENGTH * 2 + 1);
- snprintf(ret, RIPEMD160_DIGEST_LENGTH * 2 + 1,
- "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
- md[0], md[1], md[2], md[3], md[4],
- md[5], md[6], md[7], md[8], md[9],
- md[10], md[11], md[12], md[13], md[14],
- md[15], md[16], md[17], md[18], md[19]);
+ if(ret) {
+ snprintf(ret, RIPEMD160_DIGEST_LENGTH * 2 + 1,
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+ md[0], md[1], md[2], md[3], md[4],
+ md[5], md[6], md[7], md[8], md[9],
+ md[10], md[11], md[12], md[13], md[14],
+ md[15], md[16], md[17], md[18], md[19]);
+ }
return ret;
#else
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -1756,16 +1756,9 @@ AC_ARG_WITH([libxml2],
[have_libxml2=$withval])
AS_VAR_IF([have_libxml2], [no], [], [
PKG_CHECK_MODULES([libxml2], [libxml-2.0], [have_libxml2="yes"],
[have_libxml2="no"; why_have_libxml2="(libxml2 not found)"])
- AS_CASE([$enable_monetdb5-$have_libxml2],
- [yes-no], [
- AC_MSG_ERROR([libxml2 library not found but required for
MonetDB5])],
- [auto-no], [
- enable_monetdb5=no
- AS_VAR_IF([disable_monetdb5], [], [
- disable_monetdb5="(libxml2 library not found but
required for MonetDB5)"])])
AS_VAR_IF([have_libxml2], [yes], [
AC_DEFINE([HAVE_LIBXML], 1, [Define if you have the xml
library])])])
-AM_CONDITIONAL([HAVE_LIBXML], [test x"$have_liblxml2" != xno])
+AM_CONDITIONAL([HAVE_LIBXML], [test x"$have_libxml2" != xno])
org_have_curl=yes
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
@@ -238,6 +238,8 @@ AUTHinitTables(const char *passwd) {
if (passwd == NULL)
passwd = "monetdb"; /* default password */
pw = mcrypt_BackendSum(passwd, strlen(passwd));
+ if(!pw)
+ throw(MAL, "initTables", SQLSTATE(42000) "Crypt backend
hash not found");
msg = AUTHaddUser(&uid, c, "monetdb", pw);
free(pw);
if (msg)
@@ -299,6 +301,8 @@ AUTHcheckCredentials(
/* generate the hash as the client should have done */
hash = mcrypt_hashPassword(algo, pwd, challenge);
GDKfree(pwd);
+ if(!hash)
+ throw(MAL, "checkCredentials", "hash '%s' backend not found",
algo);
/* and now we have it, compare it to what was given to us */
if (strcmp(passwd, hash) != 0) {
/* of course we DO NOT print the password here */
diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c
--- a/monetdb5/mal/mal_profiler.c
+++ b/monetdb5/mal/mal_profiler.c
@@ -444,7 +444,7 @@ profilerHeartbeatEvent(char *alter)
char cpuload[BUFSIZ];
char logbuffer[LOGLEN], *logbase;
int loglen;
- static uint64_t serial = 0;
+ lng usec = GDKusec();
if (ATOMIC_GET(hbdelay, mal_beatLock) == 0 || eventstream == NULL)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list