Changeset: 9b5f3fb18ec9 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9b5f3fb18ec9
Modified Files:
Branch: sciql
Log Message:
merged with default
diffs (truncated from 609 to 300 lines):
diff --git a/NT/installer32/MonetDB5-SQL-Installer.vdproj
b/NT/installer32/MonetDB5-SQL-Installer.vdproj
--- a/NT/installer32/MonetDB5-SQL-Installer.vdproj
+++ b/NT/installer32/MonetDB5-SQL-Installer.vdproj
@@ -573,12 +573,6 @@
}
"Entry"
{
- "MsmKey" = "8:_7F9C47C139394604A78AD5B95A87B3E8"
- "OwnerKey" = "8:_UNDEFINED"
- "MsmSig" = "8:_UNDEFINED"
- }
- "Entry"
- {
"MsmKey" = "8:_7FDA7780804D42D693497FADFFBE6ABD"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@@ -3083,26 +3077,6 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
-
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7F9C47C139394604A78AD5B95A87B3E8"
- {
- "SourcePath" = "8:etc\\monetdb5.conf"
- "TargetName" = "8:monetdb5.conf"
- "Tag" = "8:"
- "Folder" = "8:_B5DFB5D13EE441F8B42616036AACB603"
- "Condition" = "8:"
- "Transitive" = "11:FALSE"
- "Vital" = "11:TRUE"
- "ReadOnly" = "11:FALSE"
- "Hidden" = "11:FALSE"
- "System" = "11:FALSE"
- "Permanent" = "11:FALSE"
- "SharedLegacy" = "11:FALSE"
- "PackageAs" = "3:1"
- "Register" = "3:1"
- "Exclude" = "11:FALSE"
- "IsDependency" = "11:FALSE"
- "IsolateTo" = "8:"
- }
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7FDA7780804D42D693497FADFFBE6ABD"
{
"SourcePath" = "8:lib\\monetdb5\\createdb\\23_skyserver.sql"
diff --git a/NT/installer64/MonetDB5-SQL-Installer.vdproj
b/NT/installer64/MonetDB5-SQL-Installer.vdproj
--- a/NT/installer64/MonetDB5-SQL-Installer.vdproj
+++ b/NT/installer64/MonetDB5-SQL-Installer.vdproj
@@ -573,12 +573,6 @@
}
"Entry"
{
- "MsmKey" = "8:_7F9C47C139394604A78AD5B95A87B3E8"
- "OwnerKey" = "8:_UNDEFINED"
- "MsmSig" = "8:_UNDEFINED"
- }
- "Entry"
- {
"MsmKey" = "8:_7FDA7780804D42D693497FADFFBE6ABD"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@@ -3083,26 +3077,6 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
-
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7F9C47C139394604A78AD5B95A87B3E8"
- {
- "SourcePath" = "8:etc\\monetdb5.conf"
- "TargetName" = "8:monetdb5.conf"
- "Tag" = "8:"
- "Folder" = "8:_B5DFB5D13EE441F8B42616036AACB603"
- "Condition" = "8:"
- "Transitive" = "11:FALSE"
- "Vital" = "11:TRUE"
- "ReadOnly" = "11:FALSE"
- "Hidden" = "11:FALSE"
- "System" = "11:FALSE"
- "Permanent" = "11:FALSE"
- "SharedLegacy" = "11:FALSE"
- "PackageAs" = "3:1"
- "Register" = "3:1"
- "Exclude" = "11:FALSE"
- "IsDependency" = "11:FALSE"
- "IsolateTo" = "8:"
- }
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7FDA7780804D42D693497FADFFBE6ABD"
{
"SourcePath" = "8:lib\\monetdb5\\createdb\\23_skyserver.sql"
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -60,7 +60,7 @@
#define DIR_SEP_STR "\\"
/* architecture-dependent files */
-#define EXEC_PREFIX "${prefix}"
+#define EXEC_PREFIX PREFIX
/* Define to 1 if you have `alloca', as a function or macro. */
#define HAVE_ALLOCA 1
@@ -641,10 +641,10 @@
#endif
/* object code libraries */
-#define LIBDIR "${exec_prefix}\\lib"
+#define LIBDIR EXEC_PREFIX "\\lib"
/* modifiable single-machine data */
-#define LOCALSTATEDIR "${prefix}\\var"
+#define LOCALSTATEDIR PREFIX "\\var"
#define lstat stat
#define S_ISREG(mode) (((mode) & _S_IFMT) == _S_IFREG)
@@ -813,7 +813,7 @@
#define STDC_HEADERS 1
/* read-only single-machine data */
-#define SYSCONFDIR "${prefix}\\etc"
+#define SYSCONFDIR PREFIX "\\etc"
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
/* #undef TIME_WITH_SYS_TIME */
diff --git a/clients/mapiclient/ReadlineTools.c
b/clients/mapiclient/ReadlineTools.c
--- a/clients/mapiclient/ReadlineTools.c
+++ b/clients/mapiclient/ReadlineTools.c
@@ -73,7 +73,7 @@
if (!state) {
seekpos = 0;
len = strlen(text);
- if ((table_hdl = mapi_query(_mid, "SELECT \"name\" FROM
\"sys\".\"tables\"")) == NULL || mapi_error(_mid)) {
+ if ((table_hdl = mapi_query(_mid, "SELECT t.\"name\",
s.\"name\" FROM \"sys\".\"tables\" t, \"sys\".\"schemas\" s where t.schema_id =
s.id")) == NULL || mapi_error(_mid)) {
if (table_hdl) {
mapi_explain_query(table_hdl, stderr);
mapi_close_handle(table_hdl);
@@ -89,8 +89,17 @@
mapi_seek_row(table_hdl, seekpos++, MAPI_SEEK_SET);
mapi_fetch_row(table_hdl);
name = mapi_fetch_field(table_hdl, 0);
- if (strncmp(name, text, len) == 0)
- return strdup(name);
+ if (strncmp(name, text, len) == 0) {
+ char *s, *schema = mapi_fetch_field(table_hdl, 1);
+ int l1 = strlen(name), l2 = strlen(schema);
+
+ s = malloc(l1 + l2 + 2);
+ s[0] = 0;
+ strcat(s, schema);
+ strcat(s, ".");
+ strcat(s, name);
+ return s;
+ }
}
return NULL;
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -4223,8 +4223,7 @@
if (hdl->query == NULL) {
size_t sz = size;
- if (sz > 512)
- sz = 512;
+ sz = 512;
hdl->query = malloc(sz + 1);
assert(hdl->query);
hdl->query[0] = '\0';
@@ -4235,7 +4234,6 @@
if (sz > 0) {
if (size < sz)
sz = size;
- hdl->query = realloc(hdl->query, ln + sz + 1);
assert(hdl->query);
strncat(hdl->query, query, sz);
}
diff --git a/common/utils/mutils.c b/common/utils/mutils.c
--- a/common/utils/mutils.c
+++ b/common/utils/mutils.c
@@ -22,6 +22,10 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
+#ifdef HAVE_EXECINFO_H
+#include <execinfo.h>
+#endif
+
#include "mutils.h"
#ifdef NATIVE_WIN32
@@ -278,3 +282,32 @@
}
#endif
+
+#ifdef HAVE_EXECINFO_H
+
+/* Obtain a backtrace and print it to stdout. */
+void
+print_trace (void)
+{
+ void *array[10];
+ size_t size;
+ char **strings;
+ size_t i;
+
+ size = backtrace (array, 10);
+ strings = backtrace_symbols (array, size);
+
+ printf ("Obtained %zd stack frames.\n", size);
+
+ for (i = 0; i < size; i++)
+ printf ("%s\n", strings[i]);
+
+ free (strings);
+}
+#else
+void
+print_trace(void)
+{
+ printf("back traces are not supported on this platform\n");
+}
+#endif
diff --git a/common/utils/mutils.h b/common/utils/mutils.h
--- a/common/utils/mutils.h
+++ b/common/utils/mutils.h
@@ -72,4 +72,6 @@
mutils_export int MT_lockf(char *filename, int mode, off_t off, off_t len);
+mutils_export void print_trace(void);
+
#endif /* _MUTILS_H_ */
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -2507,6 +2507,7 @@
# NOTE: these header files are in alphabetical order to ease maintenance
AC_CHECK_HEADERS([crypt.h \
dlfcn.h \
+ execinfo.h \
fcntl.h \
getopt.h \
iconv.h \
diff --git a/monetdb5/modules/atoms/mtime.mx b/monetdb5/modules/atoms/mtime.mx
--- a/monetdb5/modules/atoms/mtime.mx
+++ b/monetdb5/modules/atoms/mtime.mx
@@ -581,6 +581,12 @@
command batmtime.seconds(d:bat[:any_1,:daytime]):bat[:any_1,:int]
address MTIMEdaytime_extract_seconds_bulk;
+command sql_seconds(d:daytime) :int
+address MTIMEdaytime_extract_sql_seconds
+comment "extracts seconds (with fractional milliseconds) from daytime";
+command batmtime.sql_seconds(d:bat[:any_1,:daytime]):bat[:any_1,:int]
+address MTIMEdaytime_extract_sql_seconds_bulk;
+
command milliseconds(d:daytime) :int
address MTIMEdaytime_extract_milliseconds
comment "extracts milliseconds from daytime";
@@ -771,6 +777,8 @@
address MTIMEtimestamp_minutes;
command seconds(t:timestamp):int
address MTIMEtimestamp_seconds;
+command sql_seconds(t:timestamp):int
+address MTIMEtimestamp_sql_seconds;
command milliseconds(t:timestamp):int
address MTIMEtimestamp_milliseconds;
@@ -986,6 +994,7 @@
mtime_export str MTIMEdaytime_extract_hours(int *ret, daytime *v);
mtime_export str MTIMEdaytime_extract_minutes(int *ret, daytime *v);
mtime_export str MTIMEdaytime_extract_seconds(int *ret, daytime *v);
+mtime_export str MTIMEdaytime_extract_sql_seconds(int *ret, daytime *v);
mtime_export str MTIMEdaytime_extract_milliseconds(int *ret, daytime *v);
mtime_export str MTIMEtimestamp_extract_daytime(daytime *ret, timestamp *t,
tzone *z);
mtime_export str MTIMEtimestamp_extract_daytime_default(daytime *ret,
timestamp *t);
@@ -1012,6 +1021,7 @@
mtime_export str MTIMEtimestamp_hours(int *ret, timestamp *t);
mtime_export str MTIMEtimestamp_minutes(int *ret, timestamp *t);
mtime_export str MTIMEtimestamp_seconds(int *ret, timestamp *t);
+mtime_export str MTIMEtimestamp_sql_seconds(int *ret, timestamp *t);
mtime_export str MTIMEtimestamp_milliseconds(int *ret, timestamp *t);
mtime_export str MTIMEsql_year(int *ret, int *t);
mtime_export str MTIMEsql_month(int *ret, int *t);
@@ -1093,6 +1103,7 @@
@:ExtractExport(daytime,hours)@
@:ExtractExport(daytime,minutes)@
@:ExtractExport(daytime,seconds)@
+@:ExtractExport(daytime,sql_seconds)@
@:ExtractExport(daytime,milliseconds)@
@@ -2302,6 +2313,20 @@
return GDK_SUCCEED;
}
+/* extracts (milli) seconds from daytime (value between 0 and 59000) */
+static inline int
+daytime_extract_sql_seconds(int *ret, daytime *v)
+{
+ int sec, milli;
+ if (*v == daytime_nil) {
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list